dcsimg
A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: Using Event sounds with preloaders

  1. #1
    Junior Member
    Join Date
    Jun 2003
    Location
    Australia
    Posts
    9

    Using Event sounds with preloaders

    I am having a problem with a preloader not working when there are event sounds in the movie!

    What is happening is that when The movie loads the preloader doesn't show up until the whole file is loaded. Then it flashes up for a second and then goes to the next scene (like it is surposed to).

    when I remove the sound files from the movie the preloader works fine.

    I think I have figured out the problem, but I am not sure how to fix it. I think the problem occurs with the linkage settings for the sound objects. The "export for actionscript" box is ticked and so is the "Export in first frame" box. This is where I think the problem is but I don't know how to fix it.

    The preloader I used is an "advanced preloader" from the tutes section and the sound control uses the "attachSound" script" from the sound section.

    CAN SOMEONE HELP ME?


    vanz

  2. #2
    Senior Member
    Join Date
    Apr 2000
    Location
    Northern Ireland
    Posts
    2,146
    I'll bet your sound accounts for 90% of your SWF's filesize (if not more) - and THAT'S your problem. If the sound needs to load before the preloader (remember you can't use a sound BEFORE it's loaded!), then the preloader is waiting until 90% of the SWF has loaded before showing.

    If you REALLY want a sound in your preloader, you'd need to preload the preloader, and you DON'T want to get into that!

    I keep telling people - a preloader should be ULTRA-light. It needs to be the smallest, most simple thing in your movie if it is going to do it's job properly. This is one case where simplicity IS the secret to success. That means No sound, NO bitmaps, and as MINIMAL graphics as you can get away with. If you're displaying dynamic text, DON'T include the font outlines in the fields.

    In time you will learn, young grasshopper ... in time.
    ----------
    "Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life." TERRY PRATCHETT

  3. #3
    Junior Member
    Join Date
    Jun 2003
    Location
    Australia
    Posts
    9

    clarifying my problem with loading sounds with preloaders

    Sorry, think you misunderstood me. I don't have any sound in my preloader scene but I have sound in the next scene. you were right about the sound taking up about 90% of the SWF though.

    As with the first post in this thread, I need to be able to load the event sounds with the rest of the content while the preloader is on screen and then be able to play them when the whole thing is loaded.

    Like I said I think the problem is in the linkage properties (as explained in the first post) but I have no idea how to fix it.

    HELP!


    vanz

  4. #4
    Senior Member
    Join Date
    Apr 2000
    Location
    Northern Ireland
    Posts
    2,146
    The "export for actionscript" box is ticked and so is the "Export in first frame" box.
    Why not just uncheck the two boxes? The 'export in first frame' box is the culprit ... all you need to do is uncheck it in the linkage dialogue box.
    ----------
    "Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life." TERRY PRATCHETT

  5. #5
    Junior Member
    Join Date
    Jun 2003
    Location
    Australia
    Posts
    9

    event sounds with preloaders

    Yeah... that was one of the first things I tried. The only problem with that is that if you uncheck that box or both of them the sounds don't get used AT ALL. The flash file ends up being tiny with says to me that the sounds aren't being exported at all.

    I need another way to load event sounds because I don't want to use streaming sounds.

    If you want to see the file goto my weblink Liquid Resonance and click on the gold mask that comes up.


    vanz

  6. #6
    Senior Member
    Join Date
    Apr 2000
    Location
    Northern Ireland
    Posts
    2,146
    Unchecking both of them means the sound won't get exported at all. Only unchecking the 'export in first frame' box should mean that the sound will be exported, just not in the first frame. Make sure that definitely DOESN'T work before going any further.
    ----------
    "Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life." TERRY PRATCHETT

  7. #7
    Junior Member
    Join Date
    Jun 2003
    Location
    Australia
    Posts
    9

    event sounds with preloaders

    Just tried that to make sure and unchecking the 'export in first frame' doesn't work. Doing that doesn't export the files at all.

    It does what I mentioned in the last post. It makes the SWF very small.

    The only other thing I can think of is to load the sounds in movie clips (on the timeline) and then use them to play the samples.

    The only thing is I don't want to use Streaming sounds. That defeats the purpose of using a preloader in the first place.


    vanz

  8. #8
    Senior Member
    Join Date
    Apr 2000
    Location
    Northern Ireland
    Posts
    2,146
    Okay, if you can't get it to work thru linkage do what you're suggesting. Go a little less complicated, and actually put the sound in frame 3 of your main timeline (assuming your preloader is taking up 1 and 2): set the SYNC to 'stop' so that it doesn't actually play. This means it will load in frame 3, but not do anything until you attch it to your sound object.
    ----------
    "Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life." TERRY PRATCHETT

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