Replace one swf movie with another

I have a flash movie on my web page and I have made some of
the text inside the movie into buttons. The movie only takes up a
portion of the page. I would like to replace the movie with another
movie when somebody clicks the button.
I'm sorry if this is a really basic question but I have spent
ages trying to find out how to do it and I keep getting an error
when I try to search this forum.
Thanks for your help.

Thanks for your help so far. I seem to be having more and
more trouble though!
I have a swf file (sunnyserv.swf) that contains a pre-loader
and then opens another swf file (downturn.swf). The downturn.swf
contains the buttons that I want to listen to, and swap out the
movies.
If I open sunnyserv.fla in flash and test the movie, it loads
downturn.swf, listens to the mouse click and runs the
communication.swf movie (although it doesn't clear all of the
children from downturn.swf).
However, if I export all three movies and open my web page
nothing happens! If I change the xhtml to load downturn.swf that
works ok. Any idea why it would work in test movie but not when
loaded into an xhtml page?
Also, can you see a reason why all of the children are not
being removed in the commClickHandler function?
Code below:
sunnyserv.swf (container)
var l:Loader = new Loader();
l.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,
loop);
l.contentLoaderInfo.addEventListener(Event.COMPLETE, done);
l.load(new URLRequest("downturn.swf"));
function loop(e:ProgressEvent):void
var perc:Number = e.bytesLoaded / e.bytesTotal;
percent.text = Math.ceil(perc*100).toString();
function done(e:Event):void
addChild(l);
removeChildAt(0);
percent = null;
downturn.swf
import flash.events.MouseEvent;
import flash.events.EventDispatcher;
import flash.display.MovieClip;
var l:Loader = new Loader();
// add listeners for each button
btn_communication.addEventListener(MouseEvent.CLICK,
commClickHandler);
function commClickHandler(event:MouseEvent):void {
for(var i:int = 0; i < numChildren; i++){
removeChildAt(i);
l.load(new URLRequest("communication.swf"));
addChild(l);
stop();
Hope somebody can help!

Similar Messages

  • Replace one itunes account with another

    I have the itunes application downloaded on my laptop but i recently made another itunes account and i want the new one to be on the Itunes application. So i uninstalled the application thinking that if i downloaded it again it would ask me for an account. Except all it did was restore the old account. I am wondering if anyone knows how to replace one itunes account with another. If you know anything that can be useful comment.

    Store > Sign Out
    Store > Sign In
    All purchases remain tied to the account used to buy them, but you can authorize iTunes to multiple accounts and put protected content from up to five on your devices. Generally best to stick to one account if possible. More so once you get to iOS devices as managing app updates over multiple devices is a chore.
    tt2

  • Replace one preset effect with another

    Is it possible to replace one preset effect with another withouth having to undo a prior preset effect? 
    When I used Aperture, holding down the Option key would allow me to replace one preset with another.

    Store > Sign Out
    Store > Sign In
    All purchases remain tied to the account used to buy them, but you can authorize iTunes to multiple accounts and put protected content from up to five on your devices. Generally best to stick to one account if possible. More so once you get to iOS devices as managing app updates over multiple devices is a chore.
    tt2

  • I had two files named graphics and I replaced one graphics file with another which was the wrong one.  Can I undo my replacement?  I move the wrong one, which was on my desktop into another one and that is when it as me if I wanted to replace the file.

    I accidently replaced a file with another.  Can I undo my action? 
    I had two files named graphics.  One was on my desktop and another was within another file called solitarie.  I move the one on my desktop (wrong file) into the solitarie file and was asked if I wanted to replace the graphics file in the solitarie folder (the correct one).  I said yes accidently and then remembered that I had made a mistake.  If I use undo, it only move the wrong file back to the desktop.  Is there an undo of replace?

    Sorry, but's that's why you get the warning. "Replace" means just that - the new file over-writes the old one. There is no undo.

  • How do I replace one video file with another

    Hey all
    I'm new to Imovie, so please bare over with me.
    I made a long movie using a MOD format file from my JVC home camera
    When I where to convert or burn the movie in Imovie it made an error.
    After much trouble I found out that it was the MOD format that was the problem
    So I bought an expensive piece of software that converted the MOD file to MOV:
    And with a new test project it now works flawless...
    Anyways back to the original project and the problem:
    - I have now converted the original MOD file to MOV
    - I have the original Imovie project with the MOD file.
    How do I replace the mod file in the imovie project with the new mov file, while keeping, that is transfering all my work on the mod file over to the new mov file?
    Thnx
    Kris

    • In the Layers Panel draw the Layer’s Vector Mask icon onto the trashcan-icon
    • move that Layer above the new Text Layer
    • invoke Create Clipping Mask (command-alt-G) from Layers Panel’s fly-out menu or alt-click on the line separating the two Layers’ icons

  • How do I replace one vector mask with another?

    I have a template for a web site that I'm trying to figure out as I learn CS5.  The template has a vector mask created out of some writing that was converted into an object/vector mask.  I would like to replace with a layer I created that has different writing in it.  How would I replace the vector mask in the template with the new object I created?
    Thanks for any help you can give.
    Best -- Catherine

    • In the Layers Panel draw the Layer’s Vector Mask icon onto the trashcan-icon
    • move that Layer above the new Text Layer
    • invoke Create Clipping Mask (command-alt-G) from Layers Panel’s fly-out menu or alt-click on the line separating the two Layers’ icons

  • How to replace one BC template with another

    I am using an existing BC template and want to change to a new template (same domain) - any thoughts on how to achieve this?
    Thanks.

    Change a BC template to another? You can not at this stage on that same site, you would have to create a new site yourself or update everything manually

  • How to replace a particular striing with another string in jtextpane

    how to get replace a particular string with another string of a jtextpane without taking the text in a variable using getText() method .

    Thanks for your answer,
    "relevant object" means for you datasources, transfer rules and transformations ?
    With the grouping option "Save for system copy" I can't take easily all datasources, and others objects
    Will I have to pick all object one by one ?
    What would be the adjustement in table RSLOGSYSMAP ? For the moment it's empty.
    Regards
    Guillaume P.

  • Susbtitution Variables in rules file to replace a member name with another

    Hi everybody,
    Can I use substitution variables to replace a member name with another name in rules file?
    Please let me know if we can use substitution vars.
    Essbase version :11.1.2
    Thanks,
    K.as

    Are you the same guy?
    http://www.network54.com/Forum/58296/thread/1287447433/Susbtitution+Variables+in+rules+file+to+replace+a+member+name+with+another+name
    The answer is still, "No".
    Regards,
    Cameron Lackpour

  • Is there a way to set extension specific download folders in safari? aka .docs to one folder, .mov to another, etc

    Is there a way to set extension specific download folders in safari? aka .docs to one folder, .mov to another, etc
    I'm trying to use safari to organize my downloads so i have less clutter and know where things are

    Nothing "built in" senses file type and sorts by it that  know of, and I've not heard of any third-party options.
    You can have pretty good control by slight mods to how you download:
    1--Set up a dedicated Downloads folder in Documents if you don't have one. Point all you browsers to that folder for catching downloads.
    from here you have two options:
    2A--always display that folder sorted by "Kind." That put files of similar types together
    2B--within the Downloads folder, create subfolders for different file types. If you do this, instead of clicking files for downloading, right-click them. One of the contextual menu options the right-click will reveal is "Download Linked Files as...." and will force a dialog box from which you can select the subfolder that will hold that file type.

  • Replacing one NIDAQPad-6016 by another

    When replacing one NIDAQPad-6016 by another one it is not possible to take over the once installed DAQmx-Tasks. Why?

    That's expected and normal behavior. As long as you don't remove the first DAQPad from MAX another DAQPad will be recognized as a different device and the driver assigns a new device ID (Dev2). You need to go to MAX and change the name if needed or you need to make your software try various device IDs until no error occurrs anymore.
    Best regards,
    Jochen Klier
    National Instruments Germany

  • How can I control a button from one swf file to another swf file?

    Hi,
    I have a main.swf file. From that file I am accessing the external.swf file which is an external file.
    Now, how can I write code on my main.swf file for the button which is on my external.swf file?
    Activities.MainPanel.close_btn.addEventListener(MouseEvent.CLICK, btnClickClose);
    Activities.MainPanel.close_btn (This buttons is actually on external.swf file, but I want to write code on main.swf file to execute it on external.swf) how can I control one swf button on other swf file?
    Thanks.

    Here's some example code that you should be able to adapt to your needs.
    // create a new loader object instance...
    var loader:Loader = new Loader();
    // make the download request...
    var request:URLRequest = new URLRequest("external.swf");
    // add a complete event listener to the loader
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
    // start the actual loading process...
    loader.load(request);
    // create a new empty movieClip instance, you will put the loaded movie into this movieClip once its loaded
    var externalMovie:MovieClip;
    // this function is called when the download has finished and the file is ready to use...
    function completeHandler(event:Event):void {
       // set the contents of the loaded movie to the new empty movieClip...
               externalMovie = MovieClip(event.target.content);
       // add this new movie to the display list...
       addChild(externalMovie);
    Now you can refer to the loaded movie with the instance name "externalMovie". So if, for instance, you want to address a button in the loaded movie, you could write something like this on the main timeline:
    externalMovie.addEventListener(MouseEvent.CLICK, btnClickClose);
    function btnClickClose(event:MouseEvent):void {

  • Is it possible to replace a failed drive with another unused hard drive within an ix12-300r

    I have an ix12-300r with a failed drive in a storage pool - I want to replace the failed drive with one of the other drives in the NAS that are unused (i.e. not part of any other storage pool)
    i.e. Storage Pool consists of 3 drives - disk 1, disk 2 and disk 3.
    Disk 3 has failed.
    Disk 4 is free and not used by any other storage pool.
    Can Disk 4 be pulled out and then put into the place of Disk 3?
    (All disks are the same model/size/speed)

    Hello cayliffe
    Yes!  In you case disk 4 would be usable as a replacement for disk 3.  
    You can remove disk 4 and put it in bay 3 if you wish, however you should be able to set the ix12 to use unused drives as hot spares so the firmware switches to the disk automatically.  In Drive Management > Settings the "Use available drives as hot spares" option will allow your device to use any compatible unused/available disk as a hot spare for any of the storage pools.  
    LenovoEMC Contact Information is region specific. Please select the correct link then access the Contact Us at the top right:
    US and Canada: https://lenovo-na-en.custhelp.com/
    Latin America and Mexico: https://lenovo-la-es.custhelp.com/
    EU: https://lenovo-eu-en.custhelp.com/
    India/Asia Pacific: https://lenovo-ap-en.custhelp.com/
    http://support.lenovoemc.com/

  • Replace a paragraph format with another in the every page

    I am doing some cleanup before exporting and I don't know much about FrameMaker....
    I want to replace the paragraph format ABC with XYZ in every page, how would I do this? 
    I  also have a paragraph format I want to delete and make it just a Normal paragraph  in every page, I image it will be the same process as 1?
    Your help is appreciated

    Try this …
    make a back-up just in case
    find a paragraph with the style you want to apply (XYZ, in your example)
    select Edit > Copy special > Paragraph formatthis copies the format to the clipboard
    open the Find/Change dialogue
    put the cursor in a paragraph using the format you want to replace (ABC in your example) and select Paragraph tag from the Find pulldownif you're in luck, FM may well read the current format from the cursor position; if not, type it in
    select By pasting from the the Change pulldown
    click [Change] to see whether the result is what you expect
    click [Change all] once you're feeling confident
    Use the same technique to replace all occurrences of the style you want to delete (PQR, f'r instance) with another style, then delete PQR using the paragraph designer

  • I want to replace a MS-7646M1 with another MSI motherboard

    Hello,
    I want to replace my MS-7646M1 (Medion) motherboard with another MSI motherboard, does someone knows the best replacement with te same connectors (front panel)?
    Manual of the motherboard: http://www.medionowners.be/downloads/0MB_MS7646%5B1%5D.pdf
    Thanks
    KingWolf

    If you're using the existing case, then any MSI m-ATX Socket AM3 board will fit, and you should be able to use your existing CPU and RAM. But be warned, these Medion PCs usually come with junk PSUs, so you may want to replace that also.
    Better to just buy a new case, then you can use any size board and PSU you like.

Maybe you are looking for