Skip to main content
May 14, 2007
Question

Which frame the MovieClip is currently displaying

  • May 14, 2007
  • 1 reply
  • 240 views
Howdy!

I have a MovieClip ("PlanRightPopoutMenu_mc") with two framesets labelled ("closed" & "opened"); I've been trying to add some code to a button that will check which frame the MovieClip is currently displaying...

on(release) {
if (_root.Plan_mc.PlanContent.PlanRightPopoutMenu_mc._currentframe == ("closed")) {
_root.Plan_mc.PlanContent.PlanRightPopoutMenu_mc.gotoAndStop("opened");
} else if (_root.Plan_mc.PlanContent.PlanRightPopoutMenu_mc._currentframe == ("opened")) {
_root.root.Plan_mc.PlanContent.PlanRightPopoutMenu_mc.gotoAndStop("closed");
}
}

Doesn't work : (

Can someone point out what I'm doing wrong as something like this would appear to be very simple.....thanks!!

Phill
This topic has been closed for replies.

1 reply

Inspiring
May 14, 2007
I'm not sure what you mean by "framesets" but _currentframe has to be compared with a number... so if "closed" is frame 2 then use 2 etc.

http://livedocs.adobe.com/flash/8/main/00002449.html#wp349986
May 15, 2007
Frameset... as in a set of frames ; )

I thought I might have to use the frame number... annoying that it doesn't work with labels. Will give it a go now!

Thanks!