Featured FLA
» Author: Nitin Tikhe
» Title: Cart
» Description: This Animation Tut is a fun and useful for kids below 15 years. Watch the Flag, Doors, Stick and Horse movements.
» More by Nitin Tikhe
Featured Site
» Posted in the Flash Kit Links section
» Title: Banana Swimwear
» Description: This is a banana swim wear interactive catalog we designed and animated in Flash
The initialiser. I've used the following global variables:
played: It declares if the movie is stoped or not.
togle: It is used for the button to swap between the play and the stop state.
origX: It stores the original x coordinate of the slider.
origY: It stores the original y coordinate of the slider.
draged: It declares if the slider is draged or not.
factor: It is actually the desired width of the lineclip and the movement area of the slider. You decide its value.
percentage: Stores the proportion between the width of the lineclip and the total frames of the movie. Very useful.
With the last 3 lines:
I gave lineclip its width. I added the width of the slider for aesthetic reasons.
I told lineclip to go exactly at the original X coordinate of the slider.
The same for Y coordinate. I aligned it with the slider by adding 1/4 of its height to the Y coordinate, also for aesthetic reasons.