-
gotoAndStop to a movieclip that isn't on the timeline
Hello, was wondering if anybody could help with an issue I'm having,
I'm currently working on a project in Flash which involves a heavy amount of XML/AS2, I currently have a for each style loop that is spitting out my navigation buttons that are being fed in via XML, this is done by using a movie clip that is getting called onto the stage via the AS and therefore is not physically places on the timeline...
My question is, within this movieclip (that is acting as a button) that my AS is calling in I have two frames, the second frame is what I would like the user to see when the navigation button is clicked however I'm not sure how do write a gotoAndStop command for a movieclip that doesn't have an instance, (just for the record it does have a Linkage name if that's any help)
Code:
newBut.onRelease=function(){
gotoAndStop(?????????);
}
Many thanks in advance.
-
.
Hi,
Without seeing your file try either of these,
PHP Code:
// *** If the button is the actual movieclip
newBut.onRelease = function()
{
this.gotoAndStop(2);
};
// *** If the button is within the miovieclip
newBut.onRelease = function()
{
this._parent.gotoAndStop(2);
};
if you have no luck perhaps attach your *.fla
-
Thank you so much fruitbeard, first scenario you listed seems to do the trick.
Thanks again.
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
|