PDA

View Full Version : Late preloader


ian27
04-10-2003, 09:45 AM
Hi all,

Apparently this has been answered before but I don't seem to be able to find the appropriate thread.

Basically I've made a simple preloader for a .swf file, but for some reason the first frame loading graphic doesn't appear until when it has loaded 80%+ of the movie. I find this is really strange as it has never happened before, but I wondered if it may be loading all of the sound files in first before it displays any graphics.

I think there's a workaround for this but I can't find it - could somebody please point me in the right direction?

Cheers,

Ian

Xansi
04-10-2003, 09:56 PM
Ian: can you please post the code you're using?

-Xansi

ian27
04-10-2003, 10:55 PM
Hi Xansi,

No problem. I attached the following simple code to the MC in the Preloader.

onClipEvent (enterFrame) {
ifFrameLoaded (2) {
_root.gotoAndPlay(2);
}
}

I've used this a few times before without any problems but as you can probably tell I'm new to this.

Any advice?

Cheers,

Ian

Xansi
04-10-2003, 11:06 PM
Works for me. I don't know, maybe you sholud use the percentage preloader (http://www.actionscript.org/tutorials/intermediate/flash5_preloaders/index.shtml) if you swf it's too big.

You should not have problems loading the sound before the swf. Maybe if you can post your fla...

I'm not being very useful here... sorry.

-Xansi

Warrior
04-10-2003, 11:19 PM
do you have anything attached on export in the linkage box as a symbol? If you do, then that's the problem. If you Attach anything as "export as symbol" then that symbol must fully load before the preloader as Flash puts it before [Frame 1] in the movie.

ian27
04-11-2003, 12:18 AM
Ahhh Warrior you genius! That's it, I have all of my it sounds attached on export in the linkage box as a symbol. Mind you, I would never have thought that was the problem.

So how can I attach the sounds without using this option?

Thanks,

Ian

Warrior
04-11-2003, 12:25 AM
Tell me, are your sounds for sound effects or music for people to listen to? If they are sound effects then you should put them in their own movie clips and put the movie clips in the main time line when ever you need any of them.

If they are a list for people to choose from so they can listen to, then I would suggest to you that you put them in one flash.swf and load it with a preloader. Tell me more about your movie so I can understand.

ian27
04-11-2003, 12:37 AM
Hi Warrior,

Basically, it's for a site dedicated to tinnitus awareness. The movie in question has various words that the user can then rollover and the appropriate sound effect automatically plays.

Does this make any sense?

Thanks again, you're being a great help!

Ian

Warrior
04-11-2003, 12:47 AM
In this case you don't need to put them in a movie clip or in one big flash movie. Take them all of the linkage box and put them in the buttons acording to the sound effects that go with the text. Put them in the "Over" button area.

You know you have the "UP" "OVER" "DOWN" "HIT" in the button area. Put the sounds in their own layer in the "OVER" box.

When a user put his mouse over the text the sound will play.

Your movie will load from the begining and will show the viewer how much is loaded from 5% instead of 80%.

Hope that helps you :D

ian27
04-11-2003, 09:51 AM
Hi Warrior,

Sorry for not replying sooner, I'm in the UK and it was 2am when we were speaking last night - and I think I must of fell unconscious just after that.

Thanks for the info. I think I know how to do what you describe, I'd used that method before a few times, I just thought I'd try this new way this time as I have been trying to learn actionscript from a textbook. However, if it wasn't for professionals like yourself who know of the problems with the different methods then I think I would be pulling my hair out.

Anyway, I'll give it a go and see if that helps (I'm sure it will).

Thanks mate, I really appreciate it!

Ian

ian27
04-11-2003, 11:51 AM
Hello again Warrior,

I just thought I'd tell you that I've altered everything and it all works fine now.

I owe you one.

Ian

Warrior
04-11-2003, 02:06 PM
I am happy I was able to help.

Take Care
God Bless

linckx
04-11-2003, 03:03 PM
only subscribing to find this easier back :)
thx warrior for that solution :)

robin