Back button help
i have problem button got few weeks ago thought worked 100% , answered correct, still need (it's close).
example frame 1, frame 2, frame 3, frame 4, frame 5
i start @ frame 1 , go 2, 3, 4, , 5. let me go frame 2. if start going forward again frame 2 , go 3, 4, , 5. can go frame 3.
i think problem removes frames before entering current frame. how fix this? code i'm using (http://forums.adobe.com/message/4620868#4620868) is:
the array list of steps
define array:
var mybacklist:array=new array();
now every time it you change frame, add list (array) label name of frame
i.e.
mybuttongotofirstsection.addeventlistener(mouseevent.click, gotofirstsection)
function gotofirstsection(e:mouseevent):void{
gotoandstop("firstseccion")
mybacklist.push("firstseccion") //this add the label array
}
then code button is:
mybackbutton.addeventlistener(mouseevent.click, goback)
function goback(e:mouseevent):void{
gotoandstop(mybacklist.pop())
}
thanks in advance - john
you need add initial frame (1) array , need add "popped" frame array when use button.
More discussions in ActionScript 3
adobe
Comments
Post a Comment