00:00
00:00
Newgrounds Background Image Theme

c82669390 just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

Need Menu/Preloader/Sc ene select!

739 Views | 2 Replies
New Topic Respond to this Topic

check out my news post for more info!

i want a clean, crisp, professional looking scene select menu screen!

http://redharvest.newgrounds.com/

pm me asap or post here!

(great opportunity for co-authorship!)


Freedom is the Right of All Sentient Beings

BBS Signature

Response to Need Menu/Preloader/Sc ene select! 2010-03-21 08:14:25


Yeah... You just import the swf's in your 'new' flash (File > Import > Import to library).

Make a scene, with a swf in the first frame. Go to the actions of that frame and type: stop() .

Repeat this for every animation.

At the first frame of every scene, select that frame, go to properties and label/name it the name of the animation.

Make a menu.

Name the first frame of the menu: "menu".

Be sure to also give 'stop()' to the menu's first frame's actions!

In the menu, make a couple of buttons, each with the actionscript:

on(release)
{
this.gotoAndPlay("***");
}

(The *** is the name of the first frame of the scene you want to visit.)
(Be sure to keep the quotemarks!!!)

Also, include such a button in each scene on the upperright with the ***'s as "menu".

Now, you have a menu + switching scenes buttons + imported animations.

THIS IS ACTIONSCRIPT 2!

Next up, I'll post how to make a preloader.


Sparkwolf

Response to Need Menu/Preloader/Sc ene select! 2010-03-21 08:29:24


To make a preloader, do this:

Make two layers: One called "actions" and one called "loader".

In the "actions" layer, create 2 blank keyframes.

In the "loader" layer, create 1 keyframe two frames long.

Now, make a movieclip of 100 frames long. The first frame is 1% and the last frame is 100%.

(I recommend making a tween)

Import the movieclip to the "loader" layer on the first and second frame. (it will already be on the second frame when imported on the first frame.)

Now, select the preloader-movieclip, go to properties and name/label it: loader .

Then, go to the "actions" layer's first frame and give it the actionscript:

loadedbytes = getBytesLoaded();
totalbytes = getBytesTotal();
percentbytes = int(loadedbytes/(totalbytes/800));
tellTarget (_root.loader) {
gotoAndStop (_root.percentbytes);
}

Now, go to the "actions" layer's second frame and give it the actionscript:

if (loadedbytes == totalbytes) {
nextScene ();
}else{
gotoAndStop (1);
}

The next scene must be the menu.

The scenes which include animations must be after the menu scene.

NOW YOU'RE DONE!

To test your preloader, press Ctrl + Enter to open the animation, and then press Ctrl + Enter again.

When you do that, Flash will start loading your animation VERY SLOWLY so that you can see the preloader loading. (except if you haven't got any material in your animation AT ALL)

THIS IS ACTIONSCRIPT 2!


Sparkwolf