Skip to main content
Known Participant
January 10, 2013
Question

setting up variables

  • January 10, 2013
  • 1 reply
  • 1138 views

I have a section in the timeline based website I'm making with Ationscript 3 in Flash CS5.  I want a square with some content in it to slide into frame when a button it pushed but if another button is pushed I want it to slide back out of frame before the content corresponding with the other button enters.  I've seen this done before but I can't remember how.  I think it had something to do with setting up a specific variable but that's about it and it's pretty vague.  haha.

Can anybody help with that or even just point be towards a tutorial or something because I think this is done fairly frequently.

Thanks.

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
January 10, 2013

it's easiest to do that sort of thing using actionscript.  it can be done with the timeline, but it's easier if you use actionscript to tween

can you use actionscript to tween objects (using the Tween class or a 3rd party tweening class like TweenLite)?

Known Participant
January 17, 2013

My background is in animation so I usually prefer to work visually if I can as appose to using script, so I no I can't use actionscript to tween objects, lol.  I'm not apposed to learning though.

kglad
Community Expert
Community Expert
January 17, 2013

if you're going to use the timeline for that you're pretty much limited to using gotoAndPlay in your button listeners:

btn.addEventListener(MouseEvent.CLICK,btnClickF);

function btnClickF(e:MouseEvent):void{

gotoAndPlay("some frame label");

}