Quick Tweenlite Question
- Started
- Last post
- 6 Responses
- vitamins
When I place the code on my timeline, the arrow moves.
import com.greensock.*;
TweenLite.to(arrow, .5, { _y:433});When I use the following code on the button the arrow doesn't move.
on (rollOver) {
TweenLite.to(arrow, .5, { _y:433});
}Any ideas? Using AS2, exporting to a flash 8 player, using Flash 10. Thanks,
- Ancillary0
in AS2 you need to set the scope when within a button, try this:
TweenLite.to(arrow, .5, { _y:433, scope:this});off the top of my head
- vitamins0
Nope, didn't work
- Ancillary0
oh whoops I was thinking about onCompleteScope,
I think it's because your referencing the mc from within the button, try using _root.arrow or _parent.arrow
I don't know man I haven't used AS2 in ages
Can you tell I should be doing something important?
- msbert0
Try with this if the arrow is in the same timeline of the button that has the rollover action:
on (rollOver) {
TweenLite.to(_parent.arrow, .5, { _y:433});
}Try something like this in the timeline (I think is better):
function myRollover () : Void
{
TweenLite.to(arrow, .5, { _y:433});
}
myButton.onRollOver = myRollover;
- vitamins0
This worked, I gave the button a instance name and placed this code on the timeline:
import com.greensock.*;
button1.onRollOver=function(){
TweenLite.to(arrow, .5, { _y:433});
}
- cannonball19780
code is gay