Stopping external SWF when new SWF is loaded

Ok.... hmmmmm. I am currently working on a flash site that
loads external SWFs for each page. one of the SWFs contains a
sitepal movie. the sitepal has been coded to stop playing and
unload on a frame change but it keeps playing when a link in the
index is clicked and another SWF comes in. (in other words there is
no frame change. the new SWF loads but the old one keeps playing)
make sense?
I just need the site pal to stop playing when the next SWF
loads!
each link on the bottom is part of the main.swf
(index.swf)...
I need the links on the bottom to "turn off" the SWF when a
new page is choosen. the External SWFs are labled 1-5....
attached is a simple diagram in .jpg format explaining the
functionality of the site!
any insight is appreciated...
PS
IM NO CODE MONKEY.... more of a point-click, copy-paste type
o dude..

HI,
My files loads an external swf (containing the video) into a
container on my stage. The loaded swf contains the embedded wmv
movie file, which is quite large I might add. Do I need to cut file
size or change to flv?
thanks again.

Similar Messages

  • I want to load external swf in movieclip and next external swf should load Automatically

    I want to load external swf in movieclip and next external swf should load Automatically when current swf is finished in AS3.
    How can we can check total frame and current frame of imported swf in a movie clip.
    any help will be appreciated
    regards,
    Jatin Dembla

    in as3 you use the loader class (not movieclips) to load external swfs.
    you can use an Event.COMPLETE event listener (applied to the loader's contentLoaderInfo property) to check when loading is complete and start the next swf loading.
    you can use the loader's content property (caste as a movieclip) to determine info (including totalFrames) about the loaded swf's main timelnie (once loading is initialized, for the totalFrames, or complete, for some other properties like height and width).
    var loader:Loader=new Loader();
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE,loadcompleteF);
    loader.load(new URLRequest("swf1.swf"));
    var loadedSWF:MovieClip;
    function loadcompleteF(e:Event):void{
    loadedSWF=MovieClip(loader.content);
    trace(loadedSWF.totalFrames);

  • External .swf not loading on HTML pages

    Good morning,
    I'm having trouble and I was hoping someone could shed some light on what I'm doing wrong. I have a main .swf file from which external .swf files are being loaded through the use of buttons.
    When I preview the animation, everything works just fine. The problem occurs when I put the animation on the website where it needs to be. The main animation appears like it's supposed to, but the buttons are not successful in loading the external .swf files. I've made sure that all .swf files are on the server but still nothing. Could anyone help? I'm not sure what the problem is.
    Here's the AS:
    stop();
    var presentationLoader:Loader = new Loader();
    addChild(presentationLoader);
    //Navigation
    presentation1.addEventListener(MouseEvent.CLICK, buttonClick);
    presentation2.addEventListener(MouseEvent.CLICK, buttonClick);
    presentation3.addEventListener(MouseEvent.CLICK, buttonClick);
    presentation4.addEventListener(MouseEvent.CLICK, buttonClick);
    presentation5.addEventListener(MouseEvent.CLICK, buttonClick);
    presentation6.addEventListener(MouseEvent.CLICK, buttonClick);
    function buttonClick(event:MouseEvent):void
    presentationLoader.load(new URLRequest(event.target.name + ".swf"));
    function homeClick(event:MouseEvent):void
    presentationLoader.unload();
    Thank you,
    - Cmarcoux

    For anyone having a similar problem in the future, the solution is in bold:
    stop();
    var presentationLoader:Loader = new Loader();
    addChild(presentationLoader);
    //Navigation
    presentation1.addEventListener(MouseEvent.CLICK, buttonClick);
    presentation2.addEventListener(MouseEvent.CLICK, buttonClick);
    presentation3.addEventListener(MouseEvent.CLICK, buttonClick);
    presentation4.addEventListener(MouseEvent.CLICK, buttonClick);
    presentation5.addEventListener(MouseEvent.CLICK, buttonClick);
    presentation6.addEventListener(MouseEvent.CLICK, buttonClick);
    function buttonClick(event:MouseEvent):void
    presentationLoader.load(new URLRequest("../../media/flash/" + event.target.name + ".swf"));
    function homeClick(event:MouseEvent):void
    presentationLoader.unload();
    For the animation to work on a website, the file path was needed.

  • Checking an external swf is loaded?

    Hi
    I'm loading an external .swf via typing the swf name into an input text field and hitting a submit button.
    The swf loads fine, but I'm trying to incorporate updating a status text field on a succesful load or if there is an error during loading.
    I can't find my mistake in the code - to me it should be making  load_status_txt display "ok", but the swf just loads with no status update.
    All the text fileds are fine, because if I code  load_status_txt.text = "hello" straight after addChild(loader); -  load_status_txt displays "hello"
    Can anyone see an obvious mistake below?
    Thanks so much again.
    Shaun
    loadSwfBut.addEventListener("mouseDown", sendData)
    function sendData(evt:Event){
        if(loadSwf.text !=""){
    var Xpos:Number = 0;
    var Ypos:Number = 100;
    var swf:MovieClip;
    var loader:Loader = new Loader();
    var defaultSWF:URLRequest = new URLRequest(loadSwf.text);
    loader.load(defaultSWF);
    loader.x = Xpos;
    loader.y = Ypos;
    addChild(loader);
            loader.addEventListener(Event.COMPLETE, dataOnLoad);
        } else load_status_txt.text = "All fields are mandatory"
    function dataOnLoad(evt:Event): void{
        load_status_txt.text = "ok";
    stop();

    use:
    loadSwfBut.addEventListener("mouseDown", sendData)
    function sendData(evt:Event){
        if(loadSwf.text !=""){
    var Xpos:Number = 0;
    var Ypos:Number = 100;
    var swf:MovieClip;
    var loader:Loader = new Loader();
    var defaultSWF:URLRequest = new URLRequest(loadSwf.text);
    loader.load(defaultSWF);
    loader.x = Xpos;
    loader.y = Ypos;
    addChild(loader);
            loader.contentLoaderInfo.addEventListener(Event.COMPLETE, dataOnLoad);
        } else load_status_txt.text = "All fields are mandatory"
    function dataOnLoad(evt:Event): void{
        load_status_txt.text = "ok";
    stop();

  • Enabling Parent button while external swf is loaded [AS3]

    Hello everyone,
    I am very new to Flash and it takes me a while to understand what code is trying to tell me
    The problem I am currently facing is as follows:
    After searching the net for hours I finally figured out, how to load an external swf into my main timeline. As far as I understand this main timeline is the "parent". Hence the loaded, external swf should be the "child" (a quiz).
    Now the child (a quiz) loads into the flash file and is played properly, but I cannot access the button on the parent anymore. Unfortunately, I really need the home button on the parent to exit the quiz and allow for new navigation within the flash document.
    I would greatly appreciate any help.
    Thank you all in advance.
    Kliph
    my AS3 Code:
    import flash.events.MouseEvent;
    function onClick611 (event:MouseEvent) :void
            gotoAndPlay("home_einf")
    home_btn.addEventListener (MouseEvent.CLICK, onClick611);
    import flash.net.URLRequest;
    import flash.display.Loader;
    import flash.events.Event;
    import flash.events.ProgressEvent;
    function startLoad()
        var mLoader:Loader = new Loader();
        var mRequest:URLRequest = new URLRequest("quiz.swf");
    mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler);
    mLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgressHandler);
    mLoader.load(mRequest);
    function onCompleteHandler(loadEvent:Event)
    addChild(loadEvent.currentTarget.content);
        function onProgressHandler(mProgress:ProgressEvent)
        var percent:Number = mProgress.bytesLoaded/mProgress.bytesTotal;
    trace(percent);
    startLoad();
    stop();

    By simply using addChild like you have, you're placing the loaded content above everything on the display list - covering your button. There are a few ways to solve. The easiest, if it works for you, is to just make a new layer in your timeline - make it the top most layer, and place your home button in that layer.
    Then change your addChild line from:
    addChild(loadEvent.currentTarget.content);
    to:
    addChildAt(loadEvent.currentTarget.content, numChildren - 2);
    This will place the loaded content behind the button.
    Alternatively, you can set the button to export for AS and then add it after you add the loaded file. Or you can use content containers - empty sprites that you add first, and then fill with other objects, in order to control layering.

  • Loading External SWF that loads XML

    Hey all I have a swf that loads an swf file into that loads pictures from an XML file thanks to Ned Murphy.  I have a new problems with it.  It works everywhere I try it except on the webserver.  When I try it I get nothing.  It doesnt seem to load the external SWf file or it may not be loading the XML file.  I am not sure why.  Has anyone ran into this before ? thanks.
    EDIT
    It works if I try the SWF from the webserver but when I embed it in an HTML file and run it through a broweser I get nothing.

    If the swf is is another folder from the html page that embeds it, you probably need to adjust how you target the files that the swf's load. 
    When you embed an swf file into a web page, anything the swf loads has to be targeted as if that swf is in the same folder as the html page that holds it.  So if the html page uses something like "flash/main.swf" to embed the top level swf, then if the top level file loads another swf from that same flash folder it needs to also use the "flash/other.swf" regardless that it is in the same folder on the server.  When it's embedded in the page, it's as good as being wherever that page lives.

  • Urgent! external swf not loading with swfobject!

    hello there,
    I have a swf that loads another one into it through an empty
    movieclip - When i embed it with swfobject it doesnt appear.
    My guess is that i would have to mention the external swf in
    the flashvars ... Done that with no success.
    Does anyone have an idea of what could be causing me this
    trouble?
    thanks

    Generally the problem will be that the path of all externally
    loaded content is relative to the html page, NOT the swf location.
    If everything is in the same folder then that isn't it.
    Otherwise nice dice is correct, we will need to see your code
    to go further.

  • External SWF file load problem

    I'm loading external SWF file which has motion tween.After
    the loading progress bar finished to load than calls SWF file.If I
    test the movie locally works fine but when simulate the download it
    seems it jumps end of the timeline.Is anyone could tell me why is
    this??
    Thanks

    k, never mind..... finally figured it all out.

  • External swf movie loading slow

    Hello,
    I am working on this site and I am doing a video page. I am
    loading video externally by creating an empty movie clip. I then
    assign a video to a button to call the external swf video. This
    works great locally but when I upload it to production it is SUPER
    slow.
    My purpose of loading it externally was to make it load
    faster. The video is 3 minutes long. The external swf file I
    created for the video is 5.2 MB.
    I would appreciate any help you can provide.
    Thanks

    Here are a couple of references that might help:
    http://www.adobe.com/devnet/flash/articles/video_guide_03.html
    http://livedocs.adobe.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/common/html/wwhelp.htm?cont ext=Flash_MX_2004&file=00000338.html
    Using the video as a SWF file means it has to load the entire
    movie before it plays anything. As a FLV file, it starts to play as
    the file is still being loaded. I would recommend trying to use the
    File -> Import -> Import Video and look a Progressive
    Download option. I don't recall off-hand if it's available that
    easily in MX2004, but that's how it works with CS3. If that doesn't
    work, the second link has some code to try.

  • Stopping external swf's with no timeline

    Hey!
    I just released my portfolio at http://www.hyperactive.se/ which consists of a lot of externally loaded swf's (progressive banners). These swf's contains no timeline really, just one keyframe with an imported FLV. I don't have the source files so I need to control these from my Main flash file.
    As these external swf's are auto-playing, I would like it to be user initiated instead, so the users click on a button and it plays. But commands like "loader.stop()", "gotoAndPlay" etc. doesn't seem to work obviously. Anyone know a solution for this?

    What do you mean by "you'll need to know what's inside the loaded swfs"? there's not much in there, just a video. Then I guess I maybe have to probe.. is this the post? http://forums.adobe.com/message/2017776

  • Loading external swf using Loader.load() method is delayed with flash player 10.1 and next versions.

    I am trying to load an external swf file of size 300 kb using Loader.load() method and trying to access some objects in it and i am getting some delay in loading the external file with flash players 10.1 and next versions.
    The action script code used to load:
    var strUrl:String="toLoad.swf";
    var urlReq:URLRequest=new URLRequest(strUrl);
    var ldrLoader:Loader = new Loader();
    var ldrLoaderContext:LoaderContext = new LoaderContext();
    ldrLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, externakSwfLoaded);
    ldrLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorInLoadingSwf);
    ldrLoader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, errorInLoadingSwf);
    ldrLoaderContext.applicationDomain = ApplicationDomain.currentDomain;
    ldrLoader.load(urlReq, ldrLoaderContext);
    addChild(ldrLoader);
    System specifications:
    O.S. Windows XP sp2 (32 bit)
    Browser IE 6.0 (128 bit)
    Flash Player version WIN 10,2,152,32

    I think you are lost. This forum is for ROME. It sounds like you want one of the Flash or Flex forums...
    Good luck!
    Harbs

  • Loading an external swf that loads an object from url

    i am trying to load an external swf that in turn automatically loads an object. i want the external swf to only be loaded once the object is loaded in it. right now it loads the external swf first and then the external swf loads the object specified at a url...

    thanks kglad. i think i need to try and load the external swf, wait for it to load its object, and then display it... will look into it and get back...

  • How do I get my external swf to load in the release build?

    My external swf loads in the debug build, but not in the release build.  How can this be fixed?
    Thanks,
    Doug

    After exporting the Flex project on my Macintosh, then importing it on my PC, then rebuilding the relase
    build, it works.  Probably some "path" issues between Mac and PC.
    Doug

  • Stopping External SWF?

    I am having a problem manipulating a loaded swf. I would like it to load, play once and not continue until told to.
    I have looked around the web and have gotten confused.
    I have been using a loader, but I have read that to controll a time line you need a movieclip(?)
    so I had created an empty mc, and placed the loader with the swf in the mc.
    that worked
    Trying to get controll of the swf..thats the problem...Not sure how
    Can anybody help

    You'll need to add a listener to wait for the file to load before you try to address/assign it.
    var showswf:Loader= new Loader;
    var swfLocation:URLRequest = new URLRequest("");
    showswf.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);
    showswf.load(swfLocation)
    addChild(showswf);
    var loadedSWF:MovieClip;
    function loadComplete(e:Event):void {
         loadedSWF = MovieClip(e.currentTarget.content);

  • Stop airplane sound when new tab is open on Mac.

    Please share the steps to stop this from being heard.

    I'm on a Windows 7 PC, but had the same problem since re-setting FF following a nasty "Ads by Info" infection. None of the suggested solutions here or on other forums worked. Finally found a setting for the NoScript plugin (a must, IMO): under the Notifications tab, unticked "Audio feedback when scripts are blocked." That was it - NoScript was blocking scripts on new tabs, causing the notification. Also happened when first clicking on an unviewed tab. A-OK now!

Maybe you are looking for

  • Restoring on a new hard drive with time machine between leopard/snow leopard

    I am about to install a new larger hard drive on my late 2007 MacBook (Going from a full 120GB to a 500GB). My MacBook came with Leopard and I upgraded to Snow Leopard when it came out. I have the original Leopard install disks and the upgrade disk f

  • Is it possible to create an RSS feed in Dreamweaver CC (Mac 10.8.5)?

    I'm a relative beginner in terms of HTML/CSS and Dreaweaver CC. I've created a site using the dynamic layout option in Dreamweaver CC and now want to explore sharing out my content via RSS feeds. I've tried to install the Dreamfeeder extension but it

  • HELP! How do I transfer my itunes purchased items to a new computer

    So my old computer with MANY purchased items died..I was able to transfer songs from my ipod to the purchased section of Itunes on my new PC..but what about all the other purchased songs? How come they don't load up onto the itunes on my new pc?

  • XML Parsing issue with same tag names at multiple levels.

    My XML has the same tag name , ID at different levels in the XML. <InventorySearch> <*ID*>ID1</*ID*> <interactionDate>2012-09-01T10:30:00Z</interactionDate> <DescribedBy> <value>Cycle Count extract</value> <Characteristic> <*ID*>ID2</*ID*> </Characte

  • NEW iPad 3G Not Working well in Singapore

    I tested the 3G on my new iPad against iPhone 4 - The 3G is just NOT working on iPad. I tested in more than 10 locations - home, work place and others. In many areas, the 3G is working well on iPhone 4, whereas it is non-existance or slow like a snai