-
1. Re: setting up variables
kglad Jan 16, 2013 6:01 PM (in response to mentalcase129)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)?
-
2. Re: setting up variables
mentalcase129 Jan 16, 2013 4:26 PM (in response to kglad)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.
-
3. Re: setting up variables
kglad Jan 23, 2013 4:03 AM (in response to mentalcase129)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");
}
-
4. Re: setting up variables
mentalcase129 Jan 22, 2013 6:08 PM (in response to kglad)Okay...I think I can handle that...here's something that migth be easier. I wanna do a similar thing but instead of the object sliding in and out of frame it want it to fade on and off. I do use the fade in/fade out a movie clip feature from the code snippets fairly often. But I'm having trouble having it fade out before going to another point on the timeline. I feel like this should just be an additional line of code to function properly am I right? And if so what would that line of code be?
-
5. Re: setting up variables
kglad Jan 23, 2013 4:05 AM (in response to mentalcase129)yes, you could use the same line (Tween class) line of code you used to fade your object in. just change the start and end tween parameters.
-
6. Re: setting up variables
mentalcase129 Jan 23, 2013 4:26 PM (in response to kglad)Okay I'm not sure if that will achieve what I mean or not...I started doing it and then I realized I maybe wasn't following you. To clarify though in case I just presented my question wrong. I know how the 'fade out a movieclip' code snippet works on it's own. If I apply it to a movie clip at a certain point on the timeline the movieclip will fade away. The problem is if the user clicks a button to navigate away from the movieclip I want it to fade away and I can't simply have that fade command on a specific point on the timeline because there's no way of knowing what button the user will click on and thusly what part of the timeline they will then find themselves on. Is that possible?
-
7. Re: setting up variables
kglad Jan 23, 2013 6:49 PM (in response to mentalcase129)put the tween in your button listener function. ie, your button click calls a function and inside that function is the tween.


