A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: [F8] Any Ideas How I can lower the filesize of the first frame?

  1. #1
    Senior Member
    Join Date
    Jun 2005
    Posts
    203

    [F8] Any Ideas How I can lower the filesize of the first frame?

    Well guys, I'm making this game, and well, the loading screen doesnt appear until about 1,400 kb is loaded. I know its because I export the sound in the first frame, cause I really hate adding sound to frames, and anyway, when I uncheck the "export in first frame" box in the linkage menu, the sound wont play at all. So Is there any way of using sound in AS w/o having to export it in the first frame?
    Tsehehehehehe

  2. #2
    Senior Member fil_razorback's Avatar
    Join Date
    Jul 2005
    Location
    Paris, France
    Posts
    607
    Make the preloader an external swf =)

  3. #3
    Senior Member
    Join Date
    Jun 2005
    Posts
    203
    well, wouldnt it still need to load the first frame before it could load the swf? And I'm not sure if flash can load swf files not hosted on the server its on, which wouldnt matter for my site, but it would affect the sponsor and such.
    Tsehehehehehe

  4. #4
    DOT-INVADER marmotte's Avatar
    Join Date
    May 2002
    Location
    Dot-Switzerland
    Posts
    2,601
    here's a working solution then:

    1) as you said, uncheck "export in the first frame"

    2) put your loading bar at the 1st frame, with a stop() of course. when your game is fully loaded, tell to go to frame 3 (that's where your game begins)

    3) now, frame 2. create an empty movie clip here. inside that movie clip:
    3.1) 1st frame is empty. add a stop()
    3.2) 2nd and last frame, put all your sounds there, on the timeline directly. you're done


    how does it work?

    when your loading is OK, it goes to frame 3. in order to go to frame 3, it "goes through" frame 2, where you have all your sounds stored "physically". since they are stored there, flash now knows they exist. and if flash knows they exist, it can now attach them even if "export to first frame" is unchecked ^_^

    EDIT: note that the same method can be used when you attach dynamically movie clips from the library
    Last edited by marmotte; 08-07-2006 at 04:17 PM.

  5. #5
    Senior Member Gloo pot's Avatar
    Join Date
    Aug 2005
    Location
    Australia Mate!
    Posts
    874
    Can you store all your sounds in a seperate swf file and just load them in that way?
    92.7 Fresh FM for all your South Aussies - Doof Doof music FTW people!

  6. #6
    Senior Member
    Join Date
    Jun 2005
    Posts
    203
    Quote Originally Posted by marmotte
    here's a working solution then:

    1) as you said, uncheck "export in the first frame"

    2) put your loading bar at the 1st frame, with a stop() of course. when your game is fully loaded, tell to go to frame 3 (that's where your game begins)

    3) now, frame 2. create an empty movie clip here. inside that movie clip:
    3.1) 1st frame is empty. add a stop()
    3.2) 2nd and last frame, put all your sounds there, on the timeline directly. you're done


    how does it work?

    when your loading is OK, it goes to frame 3. in order to go to frame 3, it "goes through" frame 2, where you have all your sounds stored "physically". since they are stored there, flash now knows they exist. and if flash knows they exist, it can now attach them even if "export to first frame" is unchecked ^_^

    EDIT: note that the same method can be used when you attach dynamically movie clips from the library
    thanks, I was actually thinking about doing something similar, but I wasnt sure if it would work. Anyways, thanks alot! thats been a problem for me for a while now, good to know I can get rid of it.
    Tsehehehehehe

  7. #7
    A very senior man mrpauly99's Avatar
    Join Date
    Feb 2002
    Location
    Cool Britania
    Posts
    429
    grant skinner has created a great jsfl command which takes the headache out of setting export frames in a huge library. very handy!

    http://www.gskinner.com/blog/archives/000104.html

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center