At 04:50 PM 5/19/2009, you wrote:
How can you call an initialize function on an itemrenderer and not receive a null error. I need to read the data from a loaded xml file but it appears that the data isn’t there yet when the initialized function is called, I tried to use creationComplete as well still no luck. Here’s an example of what I’m trying to do, if anyone has any suggestions I would appreciate it.

<VBox xmlns:mx”…. Initialize=”init();”>
<script>
<![CDATA[

Private function init():void{

Var myVar:Number = data.myNumber;

myVar += 2;

trace(myVar);
}

</script>

How are you loading in the XML data? If it's an HTTPService, then simply call the HTTPService's .send() method in your init() function, and put the work you need to do with the loaded data into the HTTPService's resultHandler.

Laurence MacNeill
Mableton, Georgia, USA



-------------------------------------------------------------
To unsubscribe from this list, simply email the list with unsubscribe in the 
subject line

For more info, see http://www.affug.com
Archive @ http://www.mail-archive.com/discussion%40affug.com/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------


Reply via email to