Music begins playing before my external preloader is complete. Can anyone help?

Hi, I'm hoping someone can help with this. My code for the external preloader is below: (not sure why the odd boxes are showing up)
function launchSWF(vBox, vFile):void{
var swfLoader:Loader = new Loader();
//vBox.addChild(swfLoader);
var swfURL:URLRequest = new URLRequest(vFile);
swfLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgressHandler);
swfLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadProdComplete);
swfLoader.load(swfURL);
function loadProdComplete(e:Event):void {
trace("swf file loaded");
vBox.removeChild(preLoader);
vBox.addChild(swfLoader);
currentSWF = MovieClip(swfLoader.content);
currentSWF.gotoAndPlay(1);
currentSWF.addEventListener(Event.ENTER_FRAME , checkLastFrame);
function checkLastFrame(e:Event):void {
if (currentSWF.currentFrame == currentSWF.totalFrames) {
     currentSWF.stop();
    // trace("DONE");    
var preLoader:loader = new loader();
preLoader.x = 345;
preLoader.y = 340;
vBox.addChild(preLoader);
function onProgressHandler(event:ProgressEvent){
var dataAmountLoaded:Number=event.bytesLoaded/event.bytesTotal*100;
preLoader.bar.scaleX = dataAmountLoaded/100;
preLoader.lpc.text= int(dataAmountLoaded)+"%";
trace(preLoader.bar.scaleX );
var container:MovieClip = new MovieClip();
var swfFile:String = 'WashingtonGas.swf';
var currentSWF:MovieClip = new MovieClip();
launchSWF(container, swfFile);
//put it on stgae
addChild(container);
Thank you!

I think the problem is that my as3 knowledge is too limited for me to do anything other than directly follow a tutorial, use code snibbets, etc. I'm feeling like this should be easy but even with your suggestions, its not coming together, unfortunately.
When I add the sound via actionscript, it still loads too early and I also then can't figure out how to turn it on/off with the button I have in the swf. When I add a simple play(); and stop(); it only stops my animation in the swf. Here is my working url in case that sparks anything!
http://www.rowhouseco.com/WashingtonGas/

Similar Messages

  • My macbook air has gotten slow this past week i have changed browsers and the beach ball keeps coming up all the time and on a game i play it says the network is slow can anyone help me?

    my macbook air has gotten slow this past week i have changed browsers and the beach ball keeps coming up all the time and on a game i play it says the network is slow can anyone help me

    Go step by step and test.
    Restart the router. Restart the computer.
    OS X 10.7 Lion / 10.8. Mountain Lion
    http://support.apple.com/kb/PH3915
    Start up in Safe Mode.
    http://support.apple.com/kb/PH4373
    Repair Disk
    Steps 1 through 7
    http://support.apple.com/kb/PH5836?viewlocale=en_US
    Reset SMC.
    http://support.apple.com/kb/HT3964
    Choose the method for:
    "Resetting SMC on portables with a battery you should not remove on your own".
    Increase Disk Space
    http://support.apple.com/kb/PH10677?viewlocale=en_US
    Best.

  • My dvds that are made from iDVD will not play in a standard dvd player. Can anyone help me?*

    I am running iDVD v 7.1.2(1158).  I used to be able to make dvds that would play in a standard dvd player.  As of today I cannot.  I do not know what has changed and I do not know what needs to be updated.  Can someone assist me?
    The dvds that I can make will play from a disk image and they can play perfectly fine in a computer but not in a standard dvd player.  I am using an external dvd burner, (The same one  have always used) to create the dvds.  I am using iDVD to author them. 
    Here is a list of my hardware.
    HL-DT-ST DVDRAM GSA-5120D:
      Firmware Revision:          A102
      Interconnect:          USB
      Burn Support:          Yes (Generic Drive Support)
      Profile Path:          None
      Cache:          2048 KB
      Reads DVD:          Yes
      CD-Write:          -R, -RW
      DVD-Write:          -R, -RAM, -RW, +R, +R DL, +RW
      Write Strategies:          CD-TAO, CD-SAO, CD-Raw, DVD-DAO
      Media:          To show the available burn speeds, insert a disc and choose View > Refresh
    iDVD:
      Version:          7.1.2
      Last Modified:          7/19/11 8:19 PM
      Kind:          Intel
      64-Bit (Intel):          No
      Get Info String:          iDVD 7.1.2, Copyright © 2001-2011 Apple Inc. All rights reserved.
      Location:          /Applications/iDVD.app
    Can anyone help me?  The dvds are not even detected

    • Material used: Video-Codec and Photo file format and Audio file format - matters too. I use
    - Video - StreamingDV .dv or AIC
    - Photos as .jpg (only)
    - Audio as .aiff 16bit 44.1kHz or 48kHz (ONLY - never .mp3 or directly from iTunes - all converted to .aiff first)
    With this I do not mean any setting in iDVD - BUT the raw material used in iMovie / FinalCut / Avid 100 / Adobe Premiere
    As this usually matters - later in iDVD
    How did You Export from Video-editing program used ? I prefer
    • iMovie HD6 - just drop the movie project icon (NOT iMovie Icon - the PROJECT one) over into iDVD big menu window (avoiding - drop-zones as they are for other tasks)
    • iMovie'08 to '11 - Share to MEDIA BROWSER - AND AS MEDIUM - not HD or other resolution as iDVD does a bad downscaling job.
    • iMovie'13 (version 10.0.x) - Share as 480p - Import this into iDVD
    • FinalCut (Pro or Express) - Export as QuickTime .mov - NO QUICKTIME CONVERSION - IMPORTANT
    • Adobe Premiere - I don't know - not tested Yet
    • Avid 100 - I don't know - not tested Yet
    Cleaning the DVD-burner - If it Burns DVDs OK then that's may be not the problem - But if it only burns CDs OK then either the DVD-burning-laser is dirty or broken.
    It is very easy to kill this DVD-laser as it over-heats if one burns several DVDs in a row. I only burn three at a time - then let it cool down for 30 minutes till next batch of three DVDs.
    Yours Bengt W

  • I can't access my pictures anymore through iPhoto because I simply don't know where they are stored when imported into iPhoto. The library used automatically before is not shown anymore. Can anyone help me to recover all my pictures?

    I had some problems with my MacbookPro and did some clean up and further back-up (time machine already in place for a long time). Now, suddenly I can't access my pictures anymore through iphoto asking me for a library (never asked for before) and I have no clue where the pictures are actually saved when imported in iphoto. Can anyone help me recover my pictures, such as telling me WHERE the pictures are actually stored? Thank you so much!

    I had some problems with my MacbookPro and did some clean up
    A critical question - exactly what "clean up" did you do and how?
    Do you have an iPhoto library in yoru pictures folder? If you depress and hold the option key and launch iPhoto - what do you see in the select library window? Select each library there and see what you have
    LN

  • Have upgraded my iTunes to 11.0.2.26 but I can't find a way to connect my library that is held on an external hard drive.  Can anyone help?

    I miss my music  Have been searching for an answer but no joy.
    Help!

    See this post.
    tt2

  • I am having problems adding files to my external hard drive. Can anyone help me?

    I can't add files to my external hard drive from my computer. I keep getting a message saying that the hard drive can't be modified. I've added files to it before, I'm not sure why it's not working now. I looked at the hard drive information and it says that it is set to read only. Does anyone know how to change that or what I should do? Thanks.

    Odd, it seems.  In the Finder "Get Info" display, you are seeing something like this?
    Click the "Details" triangle and then the little padlock, and you should be able to change the permissions.  Click the lock when you are done and close the Info window.

  • Cannot play WarCraft 3 on my MacBook pro, can anyone help?

    I got an error message, stating that WarCraft 3 cannot be executed and have to close.

    i'm running it fine, no problems.
    My version says on the box that it works fine on mac or win pc's. Do u have an older verion, or just a windows only version?

  • I have about 5 purchased movies through itunes that won't play because something is "missing" can anyone help

    I have 5 purchaced movies through itunes that won't play because they say something is "missing", can anyone help\

    Hi Sophie ,
    I would request you to please unistall Acrobat with the help of cleaner tool .Here is the link for the same.
    http://labs.adobe.com/downloads/acrobatcleaner.html
    Then try installing back again .Refer to the following link download Acrobat X pro .
    https://helpx.adobe.com/acrobat/kb/acrobat-downloads.html
    Let us know how it goes .
    Regards
    Sukrit Dhingra

  • I unable to play a song but can see all songs in my library. Can anyone help?

    I unable to play a song but can see all songs in my library. Can anyone help? I have uploaded my complete library into itunes match. I have just downloaded itunes to a new PC. I can see all songs but none will play. They are all there but are not highlighted. They show up grey and when the play arrow is pressed nothing happens.
    Can anyone help please. I need my life back.

    Hi there steveojavs!
    I have an article here for you that can help you troubleshoot this issue with iTunes Match:
    iTunes Store: Troubleshooting iTunes Match
    http://support.apple.com/kb/ts4054
    Take care, and thanks for visiting the Apple Support Communities.
    -Braden

  • When I try and play music on my iPhone downloaded from iTunes it says 'this URL is not found on this server'. This does not happen when I play the same music through my iPad. Can anyone help?

    When I try to play music downloaded from itunes on my iPhone 4S it says 'this URL is not found on the server'. This does not happen when I play the same music on my iPad. The music plays fine. The message also comes up when I try and login to iTunes on my iMac. Can anyone help?

    I too am having the same issue as the OP.
    Your USER AGENT information is Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/600.3.18 (KHTML, like Gecko) Version/8.0.3 Safari/600.3.18
    Every webserver that receives a request from your browser is able to determine the HTTP USER AGENT information unless it has been removed by some software (e.g. firewall) before the request was trasmitted.

  • I carnt hear my message tone,the sounds it makes when the phone locks and opens.Also i am unable to hear my music playing from my phone but my alarm and ringtone are working.Can anyone help

    i carnt hear my message tone,the sound it makes when the phone locks and opens,also i am unable to hear music when playing from my phone but my ringtone and alarm tone work.Ive made sure the silent button is not on,and the volume button on the side of the phone is just showing it blank instead of it going up and down.To try and fix this i have reset my settings and restored my phone,but now its just skipping the music i have purchased from itunes when in a docking station which is now another problem i have as well.Can anyone help????

    Hello dbrookes,
    Thank you for using Apple Support Communities!
    It sounds like even though the Mute switch is not on, sounds are not making the, well, sound they should, and the volume buttons make a blank volume indicator appear on the screen that does not show the volume level.
    I wanted to recommend a couple of things.
    First, I would reset the phone:
    Resetting your device
    Press and hold the Sleep/Wake button and the Home button together for at least ten seconds, until the Apple logo appears.
    From: iPhone, iPad, iPod touch: Turning off and on (restarting) and resetting
              http://support.apple.com/kb/ht1430
    If that does not resolve the issue, then you may want to try backing up to iTunes, and restoring the iPhone again but this time do not restore the backup and set it up as new to see if the issue persists without the previous configuration.
    Just incase you need it, this article will help with that:
    iOS: How to back up and restore your content
    http://support.apple.com/kb/HT1766
    Cheers,
    Sterling

  • I have recently changed my apple id and password, but when i try to access music on an external hard drive that i bought on iTunes it asks me to authorize my computer with my old apple id? can anyone help?

    I have recently changed my apple id and password.  When i try to access music that i bought on itunes on an external hard drive,  it asks me to authorize my computer with my old apple id? can anyone help?

    Please try to sign in at https://appleid.apple.com
    Check if your new username/email address is verfied
    If this works, delete your account on your iPhone (Settings > iCloud)
    Sign back in

  • When i go to my music and play a song it sounds like my headphones are blown but when i play songs on youtube they sound fine, can anyone explain this to me? please and thank you

    when i go to my music and play a song it sounds like my headphones are blown but when i play songs on youtube they sound fine, can anyone explain this to me? please and thank you

    Try:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Unsync all music and resync
    - Reset all settings      
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                 
    iOS: How to back up                                                                
    - Restore to factory settings/new iOS device.      

  • I backup to an external hdd with Time Machine, when it ran out of space it did not delete old backups, now my internal hdd says its full when before it had heaps of space. I have searched for extra files but cant find any. Can anyone help, please.

    I backup to an external hdd with Time Machine, when it ran out of space it did not delete old backups, now my internal hdd says its full when before it had heaps of space. I have searched for extra files but cant find any. Can anyone help, please.

    First, empty the Trash if you haven't already done so. Then reboot. That will temporarily free up some space.
    To locate large files, you can use Spotlight as described here. That method may not find large folders that contain a lot of small files.
    You can also use a tool such as OmniDiskSweeper (ODS) to explore your volume and find out what's taking up the space. You can delete files with it, but don't do that unless you're sure that you know what you're deleting and that all data is safely backed up. That means you have multiple backups, not just one.
    Proceed further only if the problem hasn't been solved.
    ODS can't see the whole filesystem when you run it just by double-clicking; it only sees files that you have permission to read. To see everything, you have to run it as root.
    Back up all data now.
    Install ODS in the Applications folder as usual.
    Triple-click the line of text below to select it, then copy the selected text to the Clipboard (command-C):sudo /Applications/OmniDiskSweeper.app/Contents/MacOS/OmniDiskSweeper
    Launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window (command-V). You'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning not to screw up. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
    I don't recommend that you make a habit of doing this. Don't delete anything while running ODS as root. If something needs to be deleted, make sure you know what it is and how it got there, and then delete it by other, safer, means.
    When you're done with ODS, quit it and also quit Terminal.

  • I tried to sync music to my phone and some of the songs and greyed out and wont play.. i cant delete them off the phone, nor can i sync any more music. can anyone help me?

    the songs i tried to sync to my phone and  greyed out and wont play, i cant delete them off the phone or sync any new music.. can anyone help me?

    Same problem here - iPhone 6, iOS 8.1.2 and itunes 12.0.1.26

Maybe you are looking for

  • How do i use my webcam and photo on my dktp4/500

    is there a cd or owners manul for my dktp hp 4/500, and if so where my i get it. i need to know how to use my webcam, and photos to put them on my comp.

  • [SOLVED] MSI GT70 keyboard buttons not working

    Hi! I am a normal user of computers that like games, so I bought this awesome notebook MSI GT70 i7 16gb ram GTX 675MX 128ssd+750hdd, with a keyboard by steelseries. Everything was ok, using the notebook as came when I bought, with OS windows 8, with

  • Attachments will not work in yahoo e-mail

    Have previously had no problems with this but since downloading version 4 attachments will not work so have returned to internet express where there is no problem.

  • I need to put captions on the bottom on each picture

    This is my code I want to add a description for each picture on the slideshow <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head>

  • Help needed to create active links from a database

    I want to create active links to web addresses stored in my Access database and returned on the detail page of a Master/Detail set. The code below returns the correct entry from the database field - but I can't seem to make it an active link. <%=(rsN