Hello all,
Here I am again with new questions. So I took my framed rollover animation and made it into code with that “convert to as3” feature and it works great. The only problem is that if my animation has moved to a different area of the stage, the rollover puts it back to its original place. Ideally it would just do its rollover thing at the new location. If that wont work, then I’d like the rollover to be initiated just once.
This is the code that Flash made for me:
var card1_xml:XML = <Motion duration=“20” xmlns=“fl.motion." xmlns:geom="flash.geom.” xmlns:filters=“flash.filters.*”>
<source>
<Source frameRate=“30” x=“443.95” y=“285” scaleX=“1” scaleY=“1” rotation=“0” elementType=“movie clip” instanceName=“card1” symbolName=“silvercard”>
<dimensions>
<geom:Rectangle left=“0” top=“0” width=“181” height=“253”/>
</dimensions>
<transformationPoint>
<geom:Point x=“0.5” y=“0.5”/>
</transformationPoint>
</Source>
</source>
<Keyframe index="0" tweenSnap="true" tweenSync="true">
<tweens>
<SimpleEase ease="0"/>
</tweens>
</Keyframe>
<Keyframe index="9" tweenSnap="true" tweenSync="true" x="-10">
<color>
<Color brightness="-0.55"/>
</color>
<tweens>
<SimpleEase ease="0"/>
</tweens>
</Keyframe>
<Keyframe index="19" tweenSnap="true" tweenSync="true" x="0">
<color>
<Color/>
</color>
<tweens>
<SimpleEase ease="0"/>
</tweens>
</Keyframe>
</Motion>;
I KNOW that the reason it goes back to its original x and y position is because of the "index=“19” etc, part of the code. But I don’t know what to do about it. I also know that in order to make the rollover play just once, I need to implement a boolean. Can’t seem to figure that one out either. Any thoughts???
Thanks so much in advance!