I dont know what this is called so I dont really know what to ask…
What I was hoping to do was something similar to this code below but dont know the syntax to update it dynamically.
ActionScript Code:
[FONT=Courier New][LEFT]sub = [COLOR=#000000]{[/COLOR]menu1:[COLOR=#000000]{[/COLOR][COLOR=#0000ff]url[/COLOR]:[COLOR=#000000][[/COLOR][COLOR=#ff0000]'this.swf'[/COLOR][COLOR=#000000]][/COLOR], targ:[COLOR=#000000][[/COLOR][COLOR=#ff0000]'my_mc'[/COLOR][COLOR=#000000]][/COLOR][COLOR=#000000]}[/COLOR], menu2:[COLOR=#000000]{[/COLOR][COLOR=#0000ff]url[/COLOR]:[COLOR=#000000][[/COLOR][COLOR=#ff0000]'this2.swf'[/COLOR][COLOR=#000000]][/COLOR], targ:[COLOR=#000000][[/COLOR][COLOR=#ff0000]'my_mc2'[/COLOR][COLOR=#000000]][/COLOR][COLOR=#000000]}[/COLOR][COLOR=#000000]}[/COLOR];
[COLOR=#0000ff]trace[/COLOR]COLOR=#000000[/COLOR]; [COLOR=#808080]*//traces my_mc2 *[/COLOR]
[/LEFT]
[/FONT]
Ive thought of two methods but neither work
eg1 ActionScript Code:
[FONT=Courier New][LEFT]sub = [COLOR=#000000]{[/COLOR][COLOR=#000000]};[/COLOR]
sub.[COLOR=#0000ff]push[/COLOR][COLOR=#000000]([/COLOR]menu1:[COLOR=#000000]{[/COLOR][COLOR=#0000ff]url[/COLOR]:[COLOR=#000000][[/COLOR][COLOR=#ff0000]‘this.swf’[/COLOR][COLOR=#000000]][/COLOR], targ:[COLOR=#000000][[/COLOR][COLOR=#ff0000]‘my_mc’[/COLOR][COLOR=#000000]][/COLOR][COLOR=#000000])[/COLOR];
[COLOR=#808080]*// generates a syntax error *[/COLOR]
[/LEFT]
[/FONT]
eg2 would probably work (bit hacky) if I knew how to destroy a string
ActionScript Code:
[FONT=Courier New][LEFT]sub = [COLOR=#000000]{[/COLOR][COLOR=#000000]};[/COLOR]
sub +=[COLOR=#ff0000]“menu1:{url:[‘this.swf’], targ:[‘my_mc’]”[/COLOR];
[/LEFT]
[/FONT]
Any ideas or links to tuts? im a little stumped :rocker: