Be a Supporter!

AS: Preloader not appearing

  • 1,815 Views
  • 7 Replies
New Topic Respond to this Topic
johnfn
johnfn
  • Member since: Aug. 16, 2003
  • Offline.
Forum Stats
Member
Level 20
Blank Slate
AS: Preloader not appearing Aug. 5th, 2006 @ 03:54 PM Reply

AS:Main

So there you go innocently making a flash game with a preloader. You add some music and make it export on the first frame and then WHAM! All the sudden when you load your game up to Newgrounds, the preloader never appears. "WHYYYYY??!" you lament, while Newgrounds users 0-vote your movie into destruction and then your computer explodes and you are left staring at your ash-covered monitor and fried hard drive, wondering why you never bothered to look up preloader problems or test your preloader before this horrible travesty.

(Based on a true story)

Anyways, with the introduction out of the way, you may have noticed if you try to give symbols linkage names in Flash that your preloader takes longer to show up. Sometimes, if your music file is big and your actual game/animation is relatively small, it might not show up until it's done. Although this isn't a horrible problem, it does leave a bad first impression and perfectionists like me prefer to have a better way to solve it :D

The way to fix this goes as follows:

1) Hit Ctrl+L and then sort it by Linkage. Scroll down to the bottom and for every movieclip/music that you have, right click it, go to Linkage, and decheck Export in First Frame.

2) In your preloader scene, make a useless frame that the movie will never see. In this frame, put in everything that you just dechecked. If you have more then one audio, you can have seperate movie clips containing it, or just put it in seperate frames.

This works because you aren't loading the Audio in the first frame any more, but it is loaded once Flash loads that particular frame, so you can still use it in your ActionScript.

I really wish that Adobe would implement a cleaner, less hack-ish way of doing this though

3) What if your preloader and first frame of the movie are both on the first frame? This is a problem because if you put your audio or something else on that frame, it will load it first anyways and the preloader wont show up, but if you put it on a different frame, it wont load until it actually encounters that frame. (Honestly I have no idea why that happens)

My way around it was to just have it gotoAndStop() to a frame with everything on it, and then have that frame order it to gotoAndStop() right back.

Hope this helps someone. Its rather undocumentated around NG.


[6,11,4,10,2,10,-68,5,15,-68,16,4 ,1,-68,-2,1,15,16,-67].map(function(v){ return String.fromCharCode(v + 100) }).join(""); // updated for web 2.0!

BBS Signature
jmtb02
jmtb02
  • Member since: Mar. 1, 2004
  • Offline.
Forum Stats
Member
Level 29
Game Developer
Response to AS: Preloader not appearing Aug. 5th, 2006 @ 04:01 PM Reply

This is actually a really important part of Flash, which is why I am glad you brought it up. Flash files with lots of linkage float by the preloader, which leaves very disgruntled flash designers. Its a bit bulky for a tutorial for something that can be summed up in a few lines, but it works.


Hi there!

BBS Signature
johnfn
johnfn
  • Member since: Aug. 16, 2003
  • Offline.
Forum Stats
Member
Level 20
Blank Slate
Response to AS: Preloader not appearing Aug. 5th, 2006 @ 04:03 PM Reply

At 8/5/06 04:01 PM, jmtb02 wrote: This is actually a really important part of Flash, which is why I am glad you brought it up. Flash files with lots of linkage float by the preloader, which leaves very disgruntled flash designers.

Yeah. It took me a while to figure out so I decided to post this.

Its a bit bulky for a tutorial for something that can be summed up in a few lines, but it works.

I have a tendency to be long-winded. Oh well. :P


[6,11,4,10,2,10,-68,5,15,-68,16,4 ,1,-68,-2,1,15,16,-67].map(function(v){ return String.fromCharCode(v + 100) }).join(""); // updated for web 2.0!

BBS Signature
citricsquid
citricsquid
  • Member since: Jun. 25, 2005
  • Offline.
Forum Stats
Member
Level 23
Blank Slate
Response to AS: Preloader not appearing Aug. 6th, 2006 @ 10:28 AM Reply

Haha, i always thought it was my computer, it happened on a flash movie i made, thanks for that, bookmarked.

edit-undo
edit-undo
  • Member since: Jan. 17, 2006
  • Offline.
Forum Stats
Member
Level 19
Blank Slate
Response to AS: Preloader not appearing Aug. 6th, 2006 @ 12:20 PM Reply

I've never understood why you cant just NOT export all the sounds in the first frame...


...

BBS Signature
Cybex
Cybex
  • Member since: Mar. 4, 2005
  • Offline.
Forum Stats
Member
Level 20
Blank Slate
Response to AS: Preloader not appearing Aug. 6th, 2006 @ 12:26 PM Reply

Interesting, but whats with the AS title? No AS there.

Depredation
Depredation
  • Member since: Sep. 5, 2005
  • Offline.
Forum Stats
Member
Level 17
Game Developer
Response to AS: Preloader not appearing Aug. 6th, 2006 @ 02:44 PM Reply

At 8/6/06 12:26 PM, Cybex wrote: Interesting, but whats with the AS title? No AS there.

Lol, but linkage names are only used in AS, so theres a tiny bit. Nice tutorial though. Just a question what is the runtime checkbox for?I've never needed it before, just wondering?


BBS Signature
johnfn
johnfn
  • Member since: Aug. 16, 2003
  • Offline.
Forum Stats
Member
Level 20
Blank Slate
Response to AS: Preloader not appearing Aug. 8th, 2006 @ 05:11 PM Reply

I've never understood why you cant just NOT export all the sounds in the first frame...

You can. Then they never load at all. I want a choice of which frame to export on.

At 8/6/06 12:26 PM, Cybex wrote: Interesting, but whats with the AS title? No AS there.

I felt it belonged in AS:Main, since animators wont really run into this.

Haha, i always thought it was my computer, it happened on a flash movie i made, thanks for that, bookmarked.

Glad to be of assistance.


[6,11,4,10,2,10,-68,5,15,-68,16,4 ,1,-68,-2,1,15,16,-67].map(function(v){ return String.fromCharCode(v + 100) }).join(""); // updated for web 2.0!

BBS Signature