amjad
August 18, 2004, 12:40pm
1
hi all
i’ve been out of touch with this site from last 6 months.
so now i want to start again learn more on actionscrip
I’ve made the following animation by using flash motion twin
But now I want to know how I can create this animation or
similar animations by using Actionscript.
Can any one plz help me out of this. :h: :sigh:
you can view my these two files by clicking the following links:
http://www.intersoft-group.com/tm/fm/formail.html
http://www.intersoft-group.com/tm/fm/formail2.html
thanks
amjad
Hi Amjad,
you could use a method called easing to move your shapes, its more smoother and doesn’t increase file size by much.
Create a shape on stage, convert it to a movie clip symbol.
Go back to the main stage and give your shape an instance name of shape.
Now on the timeline where your box is, add the following code on the frame,
MovieClip.prototype.easeX = function(to){
this.onEnterFrame = function(){
this._x = to-(to-this._x)/1.1;
if(this._x > to-1 && this._x < to+1){
this._x = to;
delete this.onEnterFrame
}
}
}
shape.easeX(550); //this is the x value to which your shape moves to,
Now if you want to move the shape up and down, change all the x’s to Y’s.
Keep experimenting with it.
hope this helps.
amjad
August 19, 2004, 5:34am
3
hi bigbadmilkman
this really helps me, thanks
hope you’ll always help me
if there are any more examples you peoples have
kindly gimme these examples.
thanks you all
amjad