Be a Supporter!

Stupid Preloader!

  • 237 Views
  • 3 Replies
New Topic Respond to this Topic
yo2boy
yo2boy
  • Member since: Apr. 5, 2009
  • Offline.
Forum Stats
Member
Level 01
Blank Slate
Stupid Preloader! 2010-02-19 23:42:12 Reply

Well, I was wondering if I could add a preloader to my flash ani. I did that successfully with the .fla file BUT, when I play the flash ani, the sounds that are supposed to play with the preloader aren't playing... they're just sitting there in my library..

It's this one: http://www.newgrounds.com/downloads/prel oaders/assets/ng_static_preloader.zip

One more thing, when I play the original preloader file, the sounds WORK.

Skrupsakken
Skrupsakken
  • Member since: Nov. 4, 2009
  • Offline.
Forum Stats
Member
Level 12
Artist
Response to Stupid Preloader! 2010-02-20 07:00:45 Reply

Change the sync of the music to 'start'. But remember to put a stopAllSounds() (if as2) or a SoundMixer.stopAll() (if as3).

I'm not a Actionscript expert, but this usually works for me.


Animator/Artist for hire.

BBS Signature
yo2boy
yo2boy
  • Member since: Apr. 5, 2009
  • Offline.
Forum Stats
Member
Level 01
Blank Slate
Response to Stupid Preloader! 2010-02-20 13:11:29 Reply

**Error** Scene=Scene 1, layer=Preloader, frame=1:Line 1: Statement must appear within on/onClipEvent handler
start

?

Skrupsakken
Skrupsakken
  • Member since: Nov. 4, 2009
  • Offline.
Forum Stats
Member
Level 12
Artist
Response to Stupid Preloader! 2010-02-20 15:54:36 Reply

At 2/20/10 01:11 PM, yo2boy wrote: **Error** Scene=Scene 1, layer=Preloader, frame=1:Line 1: Statement must appear within on/onClipEvent handler
start

?

Again, I'm not an expert, but I'd make it this way:

addEventListener(MouseEvent.CLICK, playing);
function playing(e:MouseEvent) {
if (e.target==playbtn) {

// Say, we've got a play button. The if statement will checks if the button have been clicked, if it has, it will stop all sounds and proceed to frame 2

SoundMixer.stopAll();
gotoAndPlay(2);
}
}

But keeping in mind that you're using the NG Preloader, you should do like this:
1. Put the preloader in the first frame of the movie.
2. Then on the second frame, type;

addEventListener(Event.ENTER_FRAME, stopit);
function stopit(e:Event) {
SoundMixer.stopAll();
}

3. The actual movie starts in the next scene.


Animator/Artist for hire.

BBS Signature