Submit Your Article Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Visual Design > Flash and ActionScript

Reply
 
LinkBack Thread Tools
Old December 2nd, 2009, 05:01 PM   #1
WebForumz Member
 

Join Date: Mar 2007
Location: indiana
Age: 26
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 kidreapertronV is on a distinguished road
Detecting NULL with actionscript

Hello all,

I'm very very new to actionscript and am trying to troubleshoot a problem with a little research, but so far I've hit a wall.

I want to detect when a value is null and cause it to do one thing, and if it is not null, to do another.

This is the original code (the url_txt.htmlText is the focus of my problem):
Code:
function clickHandler3(evt:Wall3DEvent):void{
title_txt.text = " "; desc_txt.text = " "; url_txt.htmlText = ""; inLargeImage = false; trace("Disabling text"); mySource = ""; myURL = ""; close_btn.visible = false;
} wall.addEventListener(Wall3DEvent.ELEMENT_DESELECTED,clickHandler3); function clickHandler2(evt:Wall3DEvent):void{ title_txt.text = evt.element.getUserProperty("title"); desc_txt.text = evt.element.getUserProperty("description"); url_txt.htmlText = "<a target="+'"_blank"'+" href="+"'"+"http://"+(evt.element.getUserProperty("url"))+"'"+">"+(evt.element.getUserProperty("url"))+"</a>"; inLargeImage = true; myURL = evt.element.getUserProperty("url"); mySource = evt.element.src; trace("Showing Large Image and text."); wall.addEventListener(Wall3DEvent.CAMERA_MOVEMENT_COMPLETE, zoomComplete); } wall.addEventListener(Wall3DEvent.ELEMENT_SELECTED,clickHandler2);
This is what I tried:
Code:
function clickHandler3(evt:Wall3DEvent):void{
title_txt.text = " "; desc_txt.text = " "; url_txt.htmlText = ""; inLargeImage = false; trace("Disabling text"); mySource = ""; myURL = ""; close_btn.visible = false;
} wall.addEventListener(Wall3DEvent.ELEMENT_DESELECTED,clickHandler3); function clickHandler2(evt:Wall3DEvent):void{ title_txt.text = evt.element.getUserProperty("title"); desc_txt.text = evt.element.getUserProperty("description");
if (url_text.htmlText != ""){
url_txt.htmlText = "<a target="+'"_blank"'+" href="+"'"+"http://"+(evt.element.getUserProperty("url"))+"'"+">"+"View Site"+"</a>";
} else {
url_txt.htmlText = "";
}
inLargeImage = true; myURL = evt.element.getUserProperty("url"); mySource = evt.element.src; trace("Showing Large Image and text."); wall.addEventListener(Wall3DEvent.CAMERA_MOVEMENT_COMPLETE, zoomComplete); } wall.addEventListener(Wall3DEvent.ELEMENT_SELECTED,clickHandler2);
Any suggestions?

Thanks!
kidreapertronV is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP form field crashing query if NULL galahad3 PHP 1 November 29th, 2009 02:50 PM
selected is null or not an object andylonger JavaScript 0 May 17th, 2009 02:36 AM
A nonexistent window - is it null, udefined, or what? ruffy JavaScript 3 November 22nd, 2008 10:20 PM
Why is my document found to be null? ruffy JavaScript 4 July 17th, 2008 04:42 PM
[SOLVED] Column 'photo' cannot be null longstand PHP 7 December 1st, 2007 11:08 AM


Search Engine Optimization by vBSEO 3.2.0 RC8