Thursday, November 19, 2009

Flash Preloader


This following Script is use for Preloading flash page before use.

Action Script:
--------------------------------------------------------------

onClipEvent (load) {
total = _root.getBytesTotal();
}


onClipEvent (enterFrame) {
loaded = _root.getBytesLoaded();
percent = int(loaded/total*100);
ac = ""+percent+"%";
gotoAndStop(percent);

if (loaded == total) {
_root.gotoAndPlay(2);
}
}

Create a movie clip in the first frame and make animation for how the pre loader has to be. Then Create an Empty Dynamic text content inside the movie clip and name it as "ac" . Now right click on the movie clip and select actions. The action script page gets opened. Paste the Script mentioned above. Now Create a new layer over the Movie clip frame and give stop script in it. Place your animation from the Second frame by creating a new layer.

Thursday, October 15, 2009

On Clip Event



If you want to call an external swf file into your main movie on clip event event

Action Script:
-------------------------------------------------

onClipEvent (load) {
_root.base_mc.loadMovie("yourfile.swf");
}



Flash Button Links



To Navigate from Page to Page on clicking the buttons in Flash here are the scripts provided below.

Action Script:
----------------------------------------------------
on (press) {
getURL("nextpage.swf");
}

Apply this action script on your button.
you can replace your saved files in the place where "nextpage.swf" is given. So that you can navigate pages.


Play or Stop a particular Frame on click



This action script 2.0 will show you how to play or stop the animation in a particular frame wherever you want.

To stop at a particular frame you want use this script.

For Eg: If you want to stop your animation in frame 54.

ActionScript:
-------------------------------------------------------------
on(press) {
gotoAndplay(54);
}

Shortcut Key : Esc + on + gp


To stop at a particular frame you want use this script.

For Eg: If you want to Stop your animation in frame 54.

ActionScript:
-------------------------------------------------------------
on(click) {
gotoAndstop(54);
}

Shortcut Key : Esc + on + gs


Stop Script


hey people here i am going to show you how to stop the animation when its on play or loop using action script. Apply this Script in the Key frame where you want to stop the animation.


Action Script:
---------------------------------------------------------------------------------
stop();

Shortcut Key: Esc + st


blogger templates | Make Money Online