Loading an external movie clip

Hi team,
  Last time I wanted to load an external clip I could do it like this
on (release) {
          unloadMovieNum(1);
          loadMovieNum("whatever.swf",1);
So now I want to achieve exactly the same thing in AS3,
I have been looking at examples on the web but am getting all sorts of errors and basically don't know what I am doing.  I also want to know how to navigate to .swf files in a file structure, as I have to build an old school fscommand file structure for a cd-rom.
Any and all help greatly appreciated.
Cheers,
Sub

Hey worked it out guys!
var myLoader:Loader = new Loader();                     // create a new instance of the Loader class
var url:URLRequest = new URLRequest("whatever.swf"); // in this case both SWFs are in the same folder
myLoader.load(url);                                     // load the SWF file
addChild(myLoader);                                     // add that instance to the display list, adding it to the Stage at 0,0
But now I need to know.. How do I unload it?
Cheers
sub

Similar Messages

  • 'Load external movie clip' behavior

    I am currently working on a flash movie that loads with an
    animation and stops to show four buttons that are then supposed to
    load external .swf files when clicked (released). While the
    behaviors and actions I have set all work fine when I test the
    movie in Flash, when all the files are uploaded to my server, the
    external movie clip does not load, and the message in the bottom
    left corner of the browser hangs at waiting for
    www.panoramalotforsale.com...
    Anybody any idea what I'm doing wrong?

    When everything works fine locally, but fails to load live on
    your webserver, there is of course a pathing problem.
    So, in your flash, when you call loadMovie, try using a full
    path to the external file your trying to load.
    So for example, instead of "/movies'/myexample.swf", do "
    http://www.yoursite.com/movies/myexample.swf".
    Make sure you keep the
    http:// though.

  • External Movie Clip Bug

    Hi Folks,
    I have the external movie clip set up to load a swf and it
    keeps wanting to go to the wrong folder to find the swf. I have
    everything in the main swf in the same folder but it is trying to
    find the external swf in the wrong folder. Each time the output
    window shows it trying to go tothe wrong folder. I have the url set
    to relative and going to the right swf. Please help!

    Well, running under the debugger appears to make it quite clear that you can't have objects exported for actionscript in an external SWF.
    And additionally it looks like you can't access such objects if they only have instance names.
    It would really be nice to be able to introspect a SWF file that was loaded externally using AS3 and make changes to it.
    The external file doesn't really need to contain any code to do this - all of the code is in the file loading it.
    I was initially thinking all my problems were solved but now it looks like that isn't the case.

  • Loading in external movie

    hi all
    I have a problem loading in movies from a movie with a
    scrolling menu. the problem is the movie(load.swf, the movie trying
    to load into)is also loaded into main movie, so because of this
    needs the code;
    _global.loadNewMovie():
    at the end of the maintimeline to load in and out of the main
    movie.
    thus my problem, I have the movie load.swf loading in and out
    of my main.swf but know I can't get the little external movies to
    load into load.swf......does this make any sense...sorry bit of a
    newbie : (
    so movie trying to load into is
    load.fla
    small external movies to load
    movie1_02.fla
    movie1_03.fla
    I've put a link to a zipped folder with the fla's in would
    anyone beable to help me get the movies movie1_02.fla and
    movie1_03.fla loading into load.fla whilst still keeping the
    _global.loadNewMovie():
    on the main timeline??
    heres the ln link
    http://www.pmrltd.co.uk/help.html
    cheers for your help

    if you want the movies to simply load into your load.swf like
    this and when one finishes the next loads in, you'd be better off
    creating a container movie clip at (0,0) that you load your
    load.swf movie into. tell this movie to play through its timeline.
    at the end of that timeline, have it do a
    this.loadMovie("movie1_02.swf") and then add a line of AS on the
    end of movie1_02.swf that would
    this.loadMovie("movie1_03.swf"). not the best approach but it
    should work.

  • Bitmap Font gets blurry when its swf is loaded into a movie clip

    I have a gallery i'm working on, located here:
    http://www.stationarynotes.com/portfolio/Gallery.html
    If you click the first button (the one that looks like a
    splattered "S" in black ink) you'll see that my bitmap text gets
    rendered all blurry. That swf which is being loaded renders fine
    when I test it by itself. The text is positioned with whole numbers
    and aligns to the grid within its own swf, and the movie clip which
    receives it is also positioned with whole numbers. Do you think
    perhaps when it is loaded into another MC it is being pushed off of
    the grid somehow...? I'm really confused.
    I can post my .flas if that'll help.

    bitmap fonts look best when positioned on a whole pixel
    number (100.0 instead of 100.4 for example).
    If you are loading into an empty clip - try placing that clip
    on the nearest whole number. or you
    could load the external swf to a level with will position it
    at 0,0 (upper left corner of stage).
    --> **Adobe Certified Expert**
    --> www.mudbubble.com
    --> www.keyframer.com
    Scruffpuff wrote:
    > I have a gallery i'm working on, located here:
    >
    http://www.stationarynotes.com/portfolio/Gallery.html
    >
    > If you click the first button (the one that looks like a
    splattered "S" in
    > black ink) you'll see that my bitmap text gets rendered
    all blurry. That swf
    > which is being loaded renders fine when I test it by
    itself. The text is
    > positioned with whole numbers and aligns to the grid
    within its own swf, and
    > the movie clip which receives it is also positioned with
    whole numbers. Do you
    > think perhaps when it is loaded into another MC it is
    being pushed off of the
    > grid somehow...? I'm really confused.
    >
    > I can post my .flas if that'll help.
    >

  • Finding the width of a JPEG loaded into a movie clip

    I will be loading a page of bio information. Next to the
    person's photo (photos will vary in width) I want to put a column
    of buttons about 20 pixels to the right of the photo. So after I
    load the photo into an empty movie clip, I'm trying to get the
    width of the photo in order to figure out the x position of the
    buttons next to it. Here is what I have:
    myImage = "images/" + _level0.images[link];
    loadMovie(myImage,image_mc);
    // JPEG loads okay into image_mc //
    trace("image_mc._x = " + image_mc._x);
    // I get "Image_mc._x = 393" as expected //
    trace("myImage._width = " + myImage._width);
    // I get "image_mc._width = undefined" //
    trace("image_mc._width = " + image_mc._width);
    // I get "image_mc._width = 0" //
    How do I find the width of the loaded JPEG?

    you are probably trying to get the width before the image has
    loaded completely.. use the MovieClipLoader class to load the image
    into the empty movie clip, then use the onLoadInit event to get the
    movie clips's width(which is the images width);
    var mcLoader:MovieClipLoader = new MovieClipLoader();
    var myListener:Object = new Object();
    myListener.onLoadInit = function(target:MovieClip):Void{
    trace(image_mc._width);
    mcLoader.addListener(myListener);
    mcLoader.loadClip(myImage, image_mc);

  • Loading JPGs into Movie Clip

    Can anyone help? I am building a site that requires the user
    to click on a button to change a large JPG image in a movie clip.
    The button is part of a small movie clip that contains a text
    number which is the button in question and a thumbnail of the large
    image. I need the button to play when rolled out (to fade out the
    thumbnail image) and I need the large JPG image to be replaced by
    another large JPG image when the button is released. The button
    instance is "Load Image" and the movie clip I want the new JPG to
    load into is called "Holding Pic". Should I put the action script
    on the main timeline? If so, where? Or should I attach the script
    to the button?
    Many thanks.

    This is an article on AS3 but the answer to your question is
    the same. You can find it in the first few paragraphs.
    http://www.adobe.com/designcenter/flash/articles/flacs3it_astimeline.html

  • Load \ unload external movie

    Hi!
    While a parent movie plays, I want to replace a movie with
    others.
    The movie to be replaced was attached with the following
    instruction (attachMovie):
    _root.attachMovie("ButtonsTest", "buttonsTest_mc", 6,
    {_x:400, _y:300});
    I am looking for a way to unload the above movie and load at
    the same coordinates the new external movie.
    Please help
    TIA
    Nanu

    use loadMovie into another MC ....
    u have a MC with 2 frames ... control
    1st frame - an empty mc, clip1
    stop();
    clip1.loadMovie("the_clip1.swf")
    2nd frame - same empty, clip2
    stop();
    clip2.loadMovie("the_clip2.swf")
    the button
    on(release) {
    control.gotoAndStop(2);
    }

  • Loading and Unloading Movie Clip

    I'm trying to create a timer that would affect when a movie
    clip reloads after it has intitially unloaded using AS2. Could
    anyone offer any possible options.
    Thanks in advance.

    Look into the setInterval and setTimeout functions

  • Loading An External Movie...

    I'm new to Flash and this may seem like a silly question but I need help with using an external .swf file in my main timeline for my site. Basically, I've figured out how to load the movie and that works great, but the problem is when I click off of that page the movie stays up there. What is the best way for me to exit out of that movie once the user clicks on anything outside of that movie? Your help is greatly appreciated!
    BFM

    One way would likely be to have an empty movieclip in the timeline that you load that swf into.  When you load something dynamically, if it isn't targeted to load into something that lives on the timeline, it doesn't have a home relative to the timeline, so moving along the timeline doesn't make it go away.
    Another way is to remove the swf, and doing that depends on how you loaded it (which version of AS).

  • Can PDFs be loaded into a movie clip?

    I'm trying to make a bit of a digital magazine by taking PDFs
    of our print version and loading them into a flash movie where the
    user can flip through the pages pretty much like a photo gallery.
    Can I do this or will I have to convert them to JPGs and provide
    links to download the PDFs if they want to print?

    RevJaySprout wrote:
    > I'm trying to make a bit of a digital magazine by taking
    PDFs of our print
    > version and loading them into a flash movie where the
    user can flip through the
    > pages pretty much like a photo gallery. Can I do this or
    will I have to convert
    > them to JPGs and provide links to download the PDFs if
    they want to print?
    >
    need to convert to jpg, there is no load of PDF yet.
    Best Regards
    Urami
    "Never play Leap-Frog with a Unicorn."
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

  • Load an external .mov (quicktime movie hinted) file

    Hi guys!
    Sorry for the bad bad bad english ^_^'
    I have some .mov files that they are dynamic realizations
    (movie hinted). This movie files have the possibility to explore
    itself through mouse and keyboard.
    If the .mov file were a normal movie I would have resolved
    the problem. Problems are:
    - Flash doesn't recognize the "special" format (movie hinted)
    if I try to import it.
    - If I convert the .mov in a .flv it produces a static image
    and not an interactive movie as I want.
    - The mediaplayback component is limited to the use of the
    .flv, right?
    - The "loadMovie" string doesn't load the .mov.
    I'd try, maybe, all possibility. I don't know if exist a
    tutorial that explain how load .mov files in flash simply
    specifying a link.
    Can you help me? I use Flash MX 2004 Pro
    Thanks, bye

    Hello.
    This post was a very long time ago but I am having this
    problem now and I was wondering if you had any solutions?
    I have a 3D phone that my client wants to spin around so the
    consumer can see it from all sides. The .mov file works fine as it
    is but, apparently, you cannot use anything but .flv in Flash. Any
    help would be like gold and thank you in advance.

  • Attaching an external Movie clip on cue point

    I have about 10 different SWFs that I need to attach and play
    during a certain part of an FLV in my Video Player. I have been
    slaving over this topic for some time and can't seem to solve it.
    Please help.
    Thank you in advance.
    Here is the code

    Hey worked it out guys!
    var myLoader:Loader = new Loader();                     // create a new instance of the Loader class
    var url:URLRequest = new URLRequest("whatever.swf"); // in this case both SWFs are in the same folder
    myLoader.load(url);                                     // load the SWF file
    addChild(myLoader);                                     // add that instance to the display list, adding it to the Stage at 0,0
    But now I need to know.. How do I unload it?
    Cheers
    sub

  • Importing a movie clip.  having some issues

    I am making a flash movie that has buttons on it. i have the
    buttons set to load an external movie clip. the clip that i am
    loading has animations on it and it plays fine, but when i navigate
    to that movie clip by clicking on the corresponding button
    everything turns white expect for the black colors on some strokes
    and text in the animation. the animation is the only thing that is
    now on the screen, the buttons are gone and the background colors
    are gone as well. i have other buttons that navigate the exact same
    way but i have no troubles with them, only this one button. does
    anybody know what is going wrong? If you have any input, i am
    pretty new to flash so if you have any explanations i would really
    appreciate it if you could step me through. thanks!

    try loading one of your working-correctly swfs with the
    problematic button. if all works well, you know the problem is in
    your external swf. if it fails, you know the problem is your
    button's code.

  • Loading external movies

    I've created (with help) a series of buttons that scroll a
    movieClip's x-position according to an arrayIndex. With variables,
    these buttons also cycle through their up and down state as the
    user clicks from one to the next. I'd like for them to also load an
    external flash movie into a "loader" movie clip. More precisely, a
    different external swf for each button.
    I don't know how to include the loadMovie script into the
    (beyond my skills) action script that controls my x-postion
    buttons. I've tried to write the bellow code for each button, but
    it stops my x-position scroll.
    I tried to use this code... but it stops my movieClip from
    scrolling.
    controller_mc.but1.onRelease = function() {
    loadMovie("chapterTest.swf", "_root.loader");
    Here is my complete code. I'd be happy to answer any question
    and I'll also attach my file for review. Thank you.
    click here for
    my files

    Hi,
    Ok, you mentioned that you had an issue when clicking on a
    button to load an external movie it would stop your x-position
    scroller. I downloaded your files and you have a button in the
    library that's found in the timeline called btnLink_01. You have an
    button event called:
    //thumb links
    timeline1.link01.onRelease = function() {
    When I opened your file and ran the movie, I click on the
    btnLink_01 at it did not load the external movie called test.swf,
    which I created, and didn't seem to affect your x-scroll
    functionality. I did some troubleshooting and set the color
    properties from Alpha to None on movieclip "loader" movie and it
    loaded the external movie just fine. Seemed like you had the alpha
    set to 0, so when the movieclip was loaded, it didn't show up. Not
    sure if this is the issue you had. Let me know if that helps or if
    I wasn't resolving your issue correctly.
    Thanks,
    Jaime

Maybe you are looking for