-
How to write a gotoAndPlay with the addition of a variable
So I've defined my variable:
_global.current = 1;
And below i am accessing an MC called 'carousel_holder', which has an MC named 'bar' and inside this MC is a final MC named 'bar1'.
So ive tested my path and can hard code it fine, so its not a paths issue but i think my syntax is incorrect:
_root.carousel_holder+".bar"+current.gotoAndPlay(" start");
Thanks in advance.
-
Try this
Code:
carousel_holder.bar.bar1.gotoAndPlay(" start");
-
Hi ilike2,
Thanks for your reply, If i hard-code it as you suggest it works fine, but it needs to include the variable and the string as below:
_global.woteva = 1;
_root.carousel_holder+".bar"+woteva.gotoAndPlay(" start");
Thanks,
Ben.
-
so that the actual path its going to is:
_root.carousel_holder.bar1.gotoAndPlay("start");
-
fixed it:
_root.carousel_holder[woteva].gotoAndPlay("start");
Cheers,
Ben.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|