hi, i was in new york last week, so i’m out of practice and cant seem to get this working.
i have this code on a movieclip.
on (rollOver) {
this.gotoAndPlay("in");
}
on (rollOut) {
this.gotoAndPlay("out");
}
on (releaseOutside) {
this.gotoAndPlay("out");
}
on (press) {
gotoAndPlay("main-out");
chosen = "_root.home";
}
the rollover and rollout actions work, its just that when i press, it doesnt goto frame labelled “main-out” (which is the next frame from where this code is). instead, it plays the rollout animation.
someone over at flashkit reccommended this, but it still didnt work.
on what timeline is the frame “main-out” located? if it’s within
the MC itself, try putting ‘this.’ in front of all your commands.
like this:
[AS]on (press) {
this.gotoAndPlay(“main-out”);
chosen = “_root.home”;
}[/AS]
if the frame you want to play is on the main timeline, put _root instead. hope that helps.
i have a mc called “main” which is placed on the root stage. (just to make the whole file neater :)) and in this movieclip is another mc, which is the menu button, but its a movieclip.
the label “main-out” is “main” mc, not the button mc.
so the label “in” and “out” are in the menu mc, which is why i have this.
but the “main-out” label is not on the root, but in the same stage as the menu mc, which is why _root. wont work.
hope thats help a bit. if not, i can try to upload the fla. but some people have trouble opening my fla’s as i use a mac.
this is srange, i’ve used this code before and it worked.
on (rollOver) {
this.gotoAndPlay("in");
}
on (rollOut) {
this.gotoAndPlay("out");
}
on (releaseOutside) {
this.gotoAndPlay("out");
}
on (press) {
getURL("http://www.myurl.com");
}
so it must be something to do with the gotoAndPlay code.