Hi,
I am using Flash MX.
I have a Button_mc movie clip on stage that acts as a button to move the playhead to frame lable A.
I have other movie clips on at that frame labled;
icon01_mc
icon02_mc and so on…
What I am trying to achieve is to have icon01_mc, and icon02_mc move to specific (x,y) stage coordinates, tween while moving there, scale and change alpha at the same time… and all this to occur once the playhead moves to FrameA.
The problem is that so far, in order to move the icon01 and icon02 movie clips to a location… I have had to make other movie clips that act as position markers and tell these ones to move into the same position as the markers…using the following code.
[COLOR=blue]// ‘toX’ & ‘toY’ are variables that hold x & y position to move to[/COLOR]
[COLOR=blue]// if they change the MC will move to the changed position, etc[/COLOR]
[COLOR=blue]Button_mc.onPress=function(){[/COLOR]
[COLOR=blue]icon01_mc._x-=(bmCover.x-**icon01_positionmarker_mc.**x)[/COLOR]
[COLOR=blue]icon01_mc._y-=(bmCover.y-**icon01_positionmarker_mc.**y)[/COLOR]
[COLOR=blue]}[/COLOR]
[COLOR=black]The other method uses no position markers to do the same thing[/COLOR]
[COLOR=blue]MovieClip.prototype.ease = function(tarx, tary) {[/COLOR]
[COLOR=blue]this.onEnterFrame = function() {[/COLOR]
[COLOR=blue]this._x = tarx-(tarx-this._x)/1.2;[/COLOR]
[COLOR=blue]this._y = tary-(tary-this._y)/1.2;[/COLOR]
[COLOR=blue]if (Math.abs(tarx-this._x)<1 && Math.abs(tary-this._y)<1) {[/COLOR]
[COLOR=blue]this._x = tarx;[/COLOR]
[COLOR=blue]this._y = tary;[/COLOR]
[COLOR=blue]delete this.onEnterFrame;[/COLOR]
[COLOR=blue]}[/COLOR]
[COLOR=blue]};[/COLOR]
[COLOR=blue]};[/COLOR]
[COLOR=blue]Button_mc.onRelease = function() {[/COLOR]
[COLOR=blue]icon01_mc.ease([COLOR=gray]x,y[/COLOR]);
icon02_mc.ease([COLOR=gray]x,y[/COLOR]);
};[/COLOR]
The third method is an onEnterFrame code that moves scales the movie clips and changes their alpha values but doesn’t move them around.
[COLOR=blue]onEnterFrame=function(){[/COLOR]
[COLOR=blue]icon01_mc.tween(["_alpha","_xscale", “_yscale”],[100, 100, 100], 1, “easeOutQuint”)[/COLOR]
[COLOR=blue]icon02_mc.tween(["_alpha","_xscale", “_yscale”],[100, 100, 100], 1, “easeOutQuint”)[/COLOR]
[COLOR=blue]}[/COLOR]
===============================================================
[COLOR=navy]Really what I’d like to know is how to encorporate the [/COLOR]
[COLOR=navy]_alpha[/COLOR]
[COLOR=navy]_xscale[/COLOR]
[COLOR=navy]_yscale[/COLOR]
[COLOR=navy]_xposition[/COLOR]
[COLOR=navy]_yposition[/COLOR]
[COLOR=navy]_ease value control[/COLOR]
[COLOR=navy]for each movieclip to happen both with an onRelease event and with an onEnterFrame event.[/COLOR]
Basically the Actionscript 1.0 code for each…considering that I have installed a tween class already…as indicated in the code above.
Thanks in advance for the help
Cheers.