Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Preload music in flash

Posted on 2004-09-30
4
495 Views
Last Modified: 2008-02-01
Hey!

I am working on a flash webiste and what I found out that my sound are slowing down my flash to run animations. I have added a dog wh is scratching himself and meanwhile sound is playing. It gets stuck for a second or two. I've checked if ther is duplicate frames that might cuse this but no... So I removed sound and it works well.

Problem is that if there is no sound, it seems booring. What I think is if I would just preload all sounds like preloading movie, i would get it working. I know there's way to do that. So can anybody give me some code for it or maybe even integrate it to my preloader:

onClipEvent (load)
{
    total = _root.getBytesTotal();
}
onClipEvent (enterFrame)
{
    loaded = _root.getBytesLoaded();
    percent = int(loaded / total * 100);
    text = "Loaded " + percent + "%";
    gotoAndStop(percent);
    if (loaded == total)
    {
        _root.gotoAndPlay(2);
    } // end if
}

Sound file is located in "symbol 601" and in layer called "Stream Sound Layer".
0
Comment
Question by:Aetia
  • 3
4 Comments
 
LVL 9

Expert Comment

by:dutchfoxer
ID: 12198138
Your question will get more good answers right in the following area:
http://www.experts-exchange.com/Web/WebDevSoftware/Flash/

What you want probably is to preload the complete flash movie, not only the sound. What I found easiest is to use a Flash Preload Component (for Flash MX). You drag-drop this component in your movie and you have a preloader, just like that.

Goto http://www.flashcomponents.net/  and search for "preload".

Following tutorial explains a preloader but also sound as an Object:
http://www.tutorialized.com/tutorial/Preloader-Techniques-With-The-Sound-Object/3856

[if this does not help, please request Admin to refund and delete this question and repost it in the flash area]
 
0
 
LVL 6

Expert Comment

by:Fahdmurtaza
ID: 12206554
Well one thing you keep in mind that is the streaming muzic files while downloading, dramatically increase the size of flash movie as flash is not actaually the streaming media format and is same as quicktime format. You can find much more help with searching over web with google for flash and multimedia integration. In the book Flash MX Bible they have more than a chapter related to this topic.
Regards,
Fahd Murtaza
0
 
LVL 6

Accepted Solution

by:
Fahdmurtaza earned 500 total points
ID: 12206560
I have solved such a problem at
http://www.experts-exchange.com/Web/Q_21095688.html

If you want more help, then post a reply.
0
 
LVL 6

Expert Comment

by:Fahdmurtaza
ID: 12236035
Man thanks for the B.
Regards,
Fahd Murtaza
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Use Gimp to draw a fat arrow / Back Button 8 949
SVG, jquery, menu 14 72
SVG, clickable shape based on line path or polyline, D3, javascript 3 164
Exdpanding a PNG image 15 76
Many programs have tried to outwit PowerPoint in terms of technology and skill. These programs, however, still lack several characteristics that PowerPoint has possessed from the start. Here's why PowerPoint replacements won't entirely work for desi…
Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
Learn how to set up basic frames and paths in Prezi and understand the open space that Prezi allows you to create presentations in.
Learn the basics of inputting and editing your text components in Prezi. We will cover how to set styles, position, and group your text components. In your Prezi editor, click anywhere on the canvas to add text: A flashing cursor informs you that yo…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question