Sound plays in stand-alone SWF, but not when SWF is loaded into another SWF

I have my Main FLA (Main.SWF) into which I load another SWF (1.SWF).  I have a sound the plays in 1.SWF and it works just fine when I publish 1.SWF alone.  When I load 1.SWF into my Main.SWF and publish Main.SWF, the sound in the loaded 1.SWF no longer plays.  I can't figure out why.
//Here's the code (AS2) in 1.SWF to play the sound; seems pretty straight forward.
mySound = new Sound();
mySound.attachSound("soundSWF1");
mySound.start();

I found some information on-line that helped me figure out how to fix this issue.  First, I moved the sound object code to the timeline of the movieclip in which I wanted to play the sound, even if the movieclip was in a loaded SWF.  So if I my sound should play in mc_1.mc_2.mc_3, the sound object is created in mc_3 timeline.  Also, when creating the sound object, "this" is placed as the parameter, as such:
soundObject = new Sound(this);
Also, when stoping the sound, I'm using stopAllSounds() instead of soundObject.stop().
I hope this helps someone who is struggling with this same issue.

Similar Messages

  • Textbox shows xml text in working file but now when loaded into another SWF

    Hi all,
    I have downloaded an xml gallery (as2) as we needed one for an old as2 file. Now I mostly use as3 but thought as I only needed to tweak it there would be no probs. Of course, it rarely works out that way. The problem is, text loaded from the xml file is displayed with its corresponding image. This works fine in the file. When I load the SWF into another SWF however, it all works EXCEPT the text doesn't show at all?? Whoever made the gallery used 'device fonts' in the textbox, I don't know if this has anything to do with it. I tried changing the textbox to dynamic and embedding characters but still nothing.
    This seems the key line -
    _root.descmc.desc.htmlText = XMLdaten[number];
    I have also tried
    _root.descmc.desc.htmlText = XMLdaten[number].firstChild;
    This traces out the correct xml data when tested so it is finding it okay.
    Any help would be much appreciated.
    Thanks

    The problem might be in the use of the "_root"  You probably need to set _lockroot = true; in the loaded swf, otherwise the _root is that of the loading swf, not the loaded one.

  • GetURL not working when swf is loaded into another swf

    Ok, I need some help for something relatively simple which
    for some reason I've not been able to find any information on at
    all?
    Hopefully it will be something easy to fix.
    Essentially I have the following:
    my main movie "Home.swf"
    another movie "Sub.swf"
    I've loaded "Sub.swf" into "Home.swf" via an empty movieclip.
    Within "Sub.swf" I have some links which when clicked call
    getURL and open a HTML page in the browser.
    But for some reason the getURL isn't working and I believe
    its because the getURL is called from a loaded movie within
    "Home.swf".
    I've tried changing the actionscript to:
    _root.getURL('/mypage.html');
    _parent.getURL('/mypage.html');
    but neither (_root / _parent) seems to work?
    Need help here please.
    Many thanks.
    Kind regards,
    M.

    Hi kglad,
    Yes the button is definitely firing ok.
    In the "Sub.swf" movie, on the second frame of the timeline
    (the first frame is some preloader code) there is the following
    code:
    imgMC.mascara.onPress = function() {
    //trace('mc[activo] = ' + mc[activo]);
    switch(mc[activo])
    case _level0.imgMC.MC0:
    trace('0 - ' + mc[activo])
    break;
    case _level0.imgMC.MC1:
    trace('1 - ' + mc[activo])
    break;
    case _level0.imgMC.MC2:
    trace('2 - ' + mc[activo])
    break;
    case _level0.imgMC.MC3:
    trace('3 - ' + mc[activo])
    break;
    case _level0.imgMC.MC4:
    trace('4 - ' + mc[activo])
    break;
    case _level0.imgMC.MC5:
    trace('5 - ' + mc[activo])
    break;
    If I run this movie in Flash (ctrl-enter) then the trace
    works fine.
    But the trace stops working when I run the main "Home.swf"
    movie in Flash (ctrl-enter) when the "Sub.swf" is loaded into an
    empty movie clip.
    And when I change the trace for a getURL and test in a
    browser it still doesn't work?
    What do you reckon?
    Thanks.
    M.

  • My movie swf loaded into another swf

    Maybe I'll have better luck posting in this forum
    I cant get the movie I have loaded in ( a quiz ) to display
    the statistics about how many I have got wrong/right.
    is it possible to get it to show the data because it is the
    main part of the movie after the user has completed it.
    Do I need to put in the Drag and Drop things as well?
    Each quiz has one of these. Will the movie find the right
    details?
    Why should it do this?
    I am using load movie actionscript

    <A
    href="
    http://uk.geocities.com/[email protected]/indexgame.htm">thi
    s page</A>
    That URL is fubar. Tried
    http://uk.geocities.com/sarah/
    http://uk.geocities.com/sarah/indexgame.html
    But neither of those work either...
    Remove '_spamkiller_' to mail

  • Ipod nano plays with headphones but not when plugged in to player

    I have a nano 16gb 4th or 5th generation.  It has worked fine up until about a week ago.  It works if I plug in the headphones, but not when it is plugged into the car stereo or an iHome.  Any thoughts?

    If:
    -you and your husband have the same generation iPod nano
    -they both have the same latest software
    -you tried the car stereo with the same iPod charging cord.
    (with 32 pins connector I just wanted to make sure it is not the headphone plug)
    this means that the problem is indeed with your iPod nano.
    Since you also said that before last week everything worked fine, something must've gone wrong after that.
    This could be software-related or hardware-related. Did you try to connect it to your computer? Does the computer recognise it? Can you still charge it?
    If the computer does recognise the iPod it might be a good idea to 'repair' your iPod via iTunes.
    Or try the Five R's: http://www.apple.com/support/ipod/five_rs/nano5gen/# (more or less the same for 4th and 5th gen)
    If your computer does not recognise it, it probably needs to be repaired. But since it is 4th or 5th generation I guess the warranty is void already, and you'll have to decide how much this is worth to you or if you wouldn't want to buy a new one.

  • Sound through hdmi to my tv works but not when watching video online like 4OD

    the sound through hdmi to my tv works with music and videos I have downloaded, but not when watching video online like 4OD and youtube.
    How can I get it to work?

    Ok so I happened to figure it out while on the phone to apple support. Even though the guy was very nice, I think I knew more than him! He was explaining very basic resolution principles I played about. I had the second option in displays resolution. All I did was unplug the HDMI cable, click on 'best for display' then plugged the HDMI in and my resolution on the normal monitor changed to the normal blue, then went black momentarily and then changed to a strange resolution but another window appeared that said SONY BRAVIA HDMI at the top! Hey presto! Don't know why it didn't do it yesterday - I probably left the HDMI cable in or something! Oh well. Problem solved!

  • My Iphone4 speaker wont sound play any audio and all it says when i try turning it up is " Ringer" But doesent show the bars the turn up or down. Any help? :/

    My Iphone4 speaker wont sound play any audio and all it says when i try turning it up is " Ringer" But doesent show the bars the turn up or down. Any help? :/

    Hey Hype.Beast.187,
    Here are some troubleshooting steps for not being able to hear sound through your iPhone speakers. I'd pay special attention to steps 8, 9, and 10 in your situation:
    Resolution
    Verify that there is nothing plugged in to the headset jack, including headsets, headphones, or adapters.
    Make sure the Ring/Silent switch is not switched to silent.
    While on the Home screen, adjust the volume buttons. If you see the icon below, indicating that headphones are attached, there may be debris or an object lodged in the headset jack:
    Check the headset jack. If there is an object lodged in the headset jack that is not easily removed, have the iPhone serviced to remove object.
    For Original iPhone: If there is light debris, such as lint, in the headset jack, try connecting a pair of headphones to the headset jack and then remove the headphones. Repeat this several times to remove the debris.
    If you have installed a protective film on the display, either ensure that the receiver is not covered or remove the film completely.
    Check the receiver mesh (which is on the top front of the device, above the display). If it appears blocked, use a clean, small, dry, soft-bristled brush to carefully and gently brush away any debris.
    If you have paired with a Bluetooth headset that is nearby, either use the headset or turn Bluetooth off (choose Settings > General > Bluetooth).
    Restart the iPhone.
    If restarting the iPhone doesn't resolve the issue, try restoring the device.
    If the issue persists, go to the Service Answer Center - iPhone for information on service.
    iPhone: Can't hear through the receiver or speakers
    http://support.apple.com/kb/TS1630
    All the best,
    David

  • My iPad only has sound when the earphones are plugged in. The switch that controls the volume works then, but not when I take the earphones out. Suggestions?

    My iPad2 only has sound when the earphones are plugged in. The volume switch works then too, but not when I take the earphones out. Suggestions?

    it's a hardware issue
    https://discussions.apple.com/thread/1343532?start=315&tstart=0
    more here
    iphone stuck in headset mode

  • I have music that is playing within the iTunes program, but not on my iPod. How can I fix this?

    I have music that is playing within the iTunes program, but not on my iPod. How can I fix this?

    Skipping songs
    The iPod seems to fail to play all of the occasional track that iTunes, and indeed other PMPs, are happy to play. There is probably some minor technical error in the internal structure of the file which is normally ignored by other playback software but causes the Classic to bail out.
    If you use Windows you may like to try scanning the files with MP3Validator which can find & fix some internal MP3 errors.
    Some users have also suggested that completely removing all id3 tags and then replacing the information can be a solution. This can be achieved in iTunes by selecting an affected track, right/control clicking and using the option Convert id3 tags> None. Since some files may mistakenly have more than one tag you may need to repeat this action. Once you have confirmed that no tag is present you can replace the tag information using Convert id3 tags > V2.3 (I believe it is recommended to avoid using V2.4).
    Personally I have found files for which these solutions don't work. In this case the workaround is either to re-rip the tracks or get iTunes to re-encode the file, e.g.convert AAC to MP3 or vice versa and sync the newly encoded file to the iPod instead. Because transcoding will cause a loss of fidelity you should keep your original file so that if a future iPod firmware resolves this issue you can put your original files back onto the iPod.
    tt2

  • On facebook I can play the game castle age but not Castle age heart of darkness...it won't load.How do I fix this. Thanks

    On Facebook I can play the game castle age but not Castle age heart of darkness...it won't load.How do I fix this. Thanks

    In order to load games on Facebook you need to set the Flash plugin to allow third-party content
    1. Go to the Flash player Global Storage Settings panel.
    2. Make sure '''Allow third-party Flash content to store data on your computer''' is check marked.
    See:
    '''''[[Problems using Facebook in Firefox]]'''''
    '''If this solved your issue, please select ''solved ''& chose the appropriate ''solution'' to close this ticket/question posting'''.

  • After the new project by importing PPT release, how to achieve the release of the demo mode SWF, but not now only Click to continue?

    After the new project by importing PPT release, how to achieve the release of the demo mode SWF, but not now only Click to continue?
    Note:Captivate 5.5
    Thks

    通过导入PPT新建的项目发布后,如何实现发布演示模式的SWF(自动播放),而不是交互模式的SWF(只能点击才能继续)?

  • I purchased flip player to convert wma files i have from a previous laptop and it played some of my music but not some of the others this error msg came up, i payed 30.00 so it could convert? The operation couldn't be completed. (OSStatus error -19000.)

    I purchased flip player to convert wma files i have from a previous laptop and it played some of my music but not some of the others this error msg came up, i payed 30.00 so it could convert? The operation couldn’t be completed. (OSStatus error -19000.)

    Dear Nay2000,
    I have the same problem, my girl-friend saved a bigger Gigabyte library from her old laptop before she sold it, then at some point she realized that she couldn't play many songs that she had transfered. Now, I paid those 30 quid as well, and it doesn't play 99% of the files, that is very frustrating, is there any way you got it revived?
    Regards.

  • Load swf works in Publish Preview but not when published

    Hi Folks,
    I having a problem where im trying to load two 1mb SWF movies into my Flash piece. It works fine in Publish Preview but not when I finally publish. I get this error in IE:
    SecurityError: Error #2000: No active security context.
    I have googled around and there is some talk online of a hack where by you get a timeout to overcome this. However im not so technical do I dont really know how to do this to my code in AS3. My code at the moment is below.
    Any help would be much appreciated and rewarded with Karma
    movieClip_12.addEventListener(MouseEvent.CLICK, fl_ClickToLoadUnloadSWF_9);
    var fl_Loader_9:Loader;
    //This variable keeps track of whether you want to load or unload the SWF
    var fl_ToLoad_9:Boolean = true;
    function fl_ClickToLoadUnloadSWF_9(event:MouseEvent):void
    if(fl_ToLoad_9)
      fl_Loader_9 = new Loader();
      fl_Loader_9.load(new URLRequest("search.swf"));
      addChild(fl_Loader_9);
    else
      fl_Loader_9.unload();
      removeChild(fl_Loader_9);
      fl_Loader_9 = null;
    // Toggle whether you want to load or unload the SWF
    fl_ToLoad_9 = !fl_ToLoad_9;
    movieClip_14.addEventListener(MouseEvent.CLICK, fl_ClickToLoadUnloadSWF_10);
    var fl_Loader_10:Loader;
    //This variable keeps track of whether you want to load or unload the SWF
    var fl_ToLoad_10:Boolean = true;
    function fl_ClickToLoadUnloadSWF_10(event:MouseEvent):void
    if(fl_ToLoad_10)
      fl_Loader_10 = new Loader();
    fl_Loader_10.load(new URLRequest("refunds.swf"));
      addChild(fl_Loader_10);
    else
      fl_Loader_10.unload();
      removeChild(fl_Loader_10);
      fl_Loader_10 = null;
    // Toggle whether you want to load or unload the SWF
    fl_ToLoad_10 = !fl_ToLoad_10;

    I think this is either a problem with my site preLoader or my external .swf Loader. I was checking out the bandwith profiler and saw something weird and I wondered if anyone could explain...I've added a picture. I have a blank frame on only my actions layer to export classes to and it seems that frame 2 is "bleeding" into frame 1. Could this be my problem? Why would this happen? Thanks

  • I have an iphone 4s and the speaker has stpped working when I play music with i tunes or you fox. It works when they ring me but not when i want to listen to music :( do you know how I fix this?

    I have an iphone 4s and the speaker has stpped working when I play music with i tunes or you fox. It works when they ring me but not when i want to listen to music :( do you know how I fix this?

    Go to settings/music/volume limit tap on that.  Make sure it is set to OFF and when you tap it that the slider is at max

  • How do i get  my video to play from my ipod to my pioneer AV2300DVD music, but no picture. Will play on the ipod itself but not connected.

    How do i get my video to play on my Pioneer AV2300DVD music, but no picture. Will play on the ipod itself, but not connected. Also some songs and album art randomly cannot be located..

    How are you connecting it?
    What video are yu trying to play?
    Some video have copy protection that prventplaying them ia VGA out from the iPod.
    You really ae not provideing us enough information to help you. I do not know what a Pioneer AV2300DVD even is.

Maybe you are looking for

  • Import .swf not working

    I need to convert some swf files to .flv.  I know there are converters out there that do this, but I don't currently have any so if I can do it with PremE 8 I'd like to.  I read that .swf can be imported into Premiere, but when I import these particu

  • Using oracle.sql.BLOB data type in Java Class to pass in a Blob

    All, I'm trying to pass in a BLOB from PL/SQL to a Java Class, but the BLOB isn't passed correctly. When I check the length of the BLOB in PL/SQL its different from the length of the BLOB in java. I'm using DB 11g and the ojdbc5.jar file in my java c

  • Ipad 2 and GarageBand

    This has happened to me twice in two weeks now. I've been working on a song on GarageBand on my iPad 2, when it suddenly crashes. When I try to re-open the application, GarageBand opens, indicates it is loading my song, and then crashes before anythi

  • Forced update

    Here's my story, sad, but true. I have an iMac, alas, without an internal cd burner. To burn my purchased music from iTunes I have had to use iTunes 5.x, plus QT 6.5.2, plus and early issue of Roxio Toast. Any deviation from this protocol and the fil

  • Reprint payment advice note

    Dear all, can any one please let me know how do we reprint the payment remittances created at the time of F110 run? Please note this is not at the time of F110 but printing second time? This question was already asked but with no satisfatory answer a