This content has been marked as final. Show 3 replies
When the code is Compiled the associated symbol should present.
if your button appears in 200th frame then you should write this code in the 200th frame. BCZ flash don't know about the button untill it reach 200th frame. so the onRelease will not be associate to the button.
use either _root or _parent to get the cLink on "on(release)"
>>Code is in frame 1, button is not defined until frame 200-or-so. Is that
That is the issue. Code will need to be where the button is.
There is no reason you cannot use a variable somewhere. However:
var cLink:String = lv_links.link1;
If lv_links is a LoadVars instance, this isn't the normal way you'd get a
loaded link - you'd typically do it within the onLoad method of the class,
since that is when the data is guaranteed to be there.
Adobe Community Expert
Thanks for your help.
I got the method working by making lv_links a Global. It was indeed a scope issue.
BTW, I was using the onLoad method. That's how I got lv_links.link1
Thank you (and everyone else) for your invaluable help.