hello and help,
i’ve been stuck on this for ages and i can’t find any information to help me.
I need to pass the value of a attribute to a _global variable that can be accessed somewhere else in the movie.But it traces as undefined outside of onLoad.
eg.FRAME ONE
ActionScript Code:
[FONT=Courier New][LEFT][COLOR=#000000]**var**[/COLOR] [COLOR=#0000FF]xml[/COLOR]:XML = [COLOR=#000000]**new**[/COLOR] [COLOR=#0000FF]XML[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR];
[COLOR=#0000FF]xml[/COLOR].[COLOR=#0000FF]ignoreWhite[/COLOR] = [COLOR=#000000]true[/COLOR];
[COLOR=#0000FF]xml[/COLOR].[COLOR=#0000FF]onLoad[/COLOR] = [COLOR=#000000]function[/COLOR]COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]
[COLOR=#0000FF]if[/COLOR] COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]
[COLOR=#000000]var[/COLOR] theStage = [COLOR=#0000FF]this[/COLOR].[COLOR=#0000FF]firstChild[/COLOR].[COLOR=#0000FF]childNodes[/COLOR];
numOfStages = theStage.[COLOR=#0000FF]length[/COLOR];
[COLOR=#0000FF]for[/COLOR] [COLOR=#000000]([/COLOR][COLOR=#000000]var[/COLOR] i = [COLOR=#000080]0[/COLOR]; i<numOfStages; i++[COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]
[COLOR=#808080]////the attribute i’m TRYING to pass[/COLOR]
[COLOR=#000000]_global[/COLOR].[COLOR=#000080]renewalURL[/COLOR] = theStage[COLOR=#000000][[/COLOR][COLOR=#000080]1[/COLOR][COLOR=#000000]][/COLOR].[COLOR=#0000FF]attributes[/COLOR].[COLOR=#000080]pageURL[/COLOR];
[COLOR=#000000]}[/COLOR]
[COLOR=#000000]}[/COLOR]
[/LEFT]
[/FONT]
FRAME TWO
ActionScript Code:
[FONT=Courier New][LEFT][COLOR=#808080]*///// traces as undefined *[/COLOR]
[COLOR=#0000FF]trace[/COLOR]COLOR=#000000[/COLOR]
[/LEFT]
[/FONT]
please help