Loading a movie to a particular frame of that movie

hello all, i am trying to load a movie and make it stop at a
frame number 3, so i am using this script
on (press) {
loadMovie("pressLarge.swf",_level2.gotoAndStop(3));
so i would load my movie presslarge.swf on level 2 and make
it stop at frame 3 of that movie, what am I doing wrong? thanks in
advance

You can't do it that way.
You need to load the movie and then tell it to go to Frame 3.
But...if you simply stack the actions like this:
on (press) {
loadMovie("pressLarge.swf",_level2);
_level2.gotoAndStop(3);
It will work in the Flash IDE but fail on the server because
the movie is not fully loaded when the second action is called.
You need to track the loading and when it is done tell the
movie to gotoAndStop. This is much easier using MovieClipLoader's
loadClip than loadMovie.

Similar Messages

  • Load movie in root and go to particular frame

    Hi,
    I have main flash file called index.swf and in that I'm loading an external movie called help.swf using the below code:
    loadMovie("help.swf",1);
    On help.swf I have a button which brings me back to the main file i.e. index.swf using the below code.
    _root.loadMovie("index.swf");
    When index.swf is loaded I want it to go to a particular frame.
    I tried using levels but then my print function doesn't work properly.
    Need help urgently.
    Thanks,
    Sunira

    Instead of using loadMovie you need to use the MovieClipLoader.loadClip() method so that you can listen for the completion of the file being loaded.  If you look in he help documents for MovieClipLoader.addListener it includes an example.

  • Loading a movie on a given frame?

    Hi, I'm new to Action script and all this stuff so help would
    be most appreciated,
    I made a website in flash that starts off with a little bit
    of sound and eventually when that sound ends there is no sound so I
    created a little mp3 player and I want to put this mp3 Player onto
    a particular frame in the movie. I tried importing the player on
    the frame but it was functionless. I then tried to use the
    following action script but the movie just played normally without
    any player:

    You don't need your path to target the C:\\ level and then
    all those folders - where is your parent
    FLA? just place ther parent FLA in the same folder as your
    player.swf and then you don't have to
    have such a long path.
    As to why it is not functioning when loaded - probably
    because by itself the AS targets _root - once
    loaded _root refers to the parent movie.
    --> **Adobe Certified Expert**
    --> www.mudbubble.com
    --> www.keyframer.com
    Eyphoon wrote:
    > Hi, I'm new to Action script and all this stuff so help
    would be most
    > appreciated,
    > I made a website in flash that starts off with a little
    bit of sound and
    > eventually when that sound ends there is no sound so I
    created a little mp3
    > player and I want to put this mp3 Player onto a
    particular frame in the movie.
    > I tried importing the player on the frame but it was
    functionless. I then tried
    > to use the following action script but the movie just
    played normally without
    > any player:
    >
    >
    >
    > loadMovie("C:\\Documents and
    Settings\\Owner\\Desktop\\Drama Group\\Flash
    > Sites\\Phantom\\Music Player\\Player.swf", "0");
    >

  • Navigating from one movie to a particular frame in another

    Is it possible to navigate to a particular frame in a different movie... the reason being, I am trying to minimise the size (mb) of the movie so it doesnt get to a stage where the machine it is on bogs down. For example, I am cutting the movie down into each product which has 20-30 stop frames in it (getting to around 24mb) per product... if i were to combine all products together (15 of them), u can imagine the size (mb) of the movie...
    Thanks again

    I found another post similar to this with an answer that worked. Sorry for the double post.

  • Loading external movies in specific frames

    Here's what I'd like to have my project do: By clicking on a
    button in frame 5 I'd like to load a movie into an empty movie clip
    in frame 20. I'v ewritten the script to create the empty movie clip
    and also load the movie, but the movie loads into all frames of my
    project. I'd ideally like to have the movie clip waiting for my
    only in frame 20. Anyone know how to make this happen?
    Thanks
    Eric

    you could not load it into an empty movie clip located on
    frame 20 from frame 5, flash wouldn't know where to load it since
    the movie clip hasn't shown up... you could load it in on frame 5
    and give the movie clip a _visible = false; or set it's _x and _y
    properties to be off the stage, then on frame 20 set it to _visible
    = true; or move its _x and _y properties to be on the
    stage..

  • How can i use this sript and loade another movie?

    Hi there, i used the following script to load a movie from the server;
    var request:URLRequest = new URLRequest("url string");
    var loader:Loader = new Loader()
    loader.load(request);
    addChild(loader);
    How can i use this sript and loade another movie? Can someone help me please?
    [edited by moderator]

    Sir, I changed it from:
    var request:URLRequest = new URLRequest("http://agusandelsur.gov.ph/downloads/pdrrmo/agusan_del_sur/StaJosefa/Movies/Dir.swf");
    var loader:Loader = new Loader()
    loader.load(request);
    addChild(loader);
    to
    var request:URLRequest = new URLRequest("http://agusandelsur.gov.ph/downloads/pdrrmo/agusan_del_sur/StaJosefa/Movies/Warning.swf");
    var loader:Loader = new Loader()
    loader.load(request);
    addChild(loader);
    When i expord the movie i get the following error.....
    Scene 1, Layer 'Layer 3', Frame 1, Line 6    1151: A conflict exists with definition request in namespace internal.

  • Loading multiple movies in sequence

    I'm trying to make multiple movies show through a main file
    in sequence (slide0.swf, slide1.swf, slide2.swf etc etc).
    I've been using some fla document that was sent to me to do
    such a thing but somehow I can't get things to work exactly as
    intended.
    My main file/movie uses these pieces of actionscript to do
    the loading of the sequential files/movies
    (see attached code)
    Now if I do not add anything to my other clips, the main file
    just keeps looping the first one over and over rather than going up
    through them all sequentialy. So I tried adding this in the last
    frame of each of the movies/clips to be displayed
    (Last Frame)
    _root.addIDX();
    The problem I now have is that although now the movies are
    playing one after the other sequentialy I still get a small amount
    of repeat (fraction of a second) of the movie that just played
    before the newly loaded one displays.
    Is there a way that I can make this transition work smoothly
    rather than have a jerky moment of flashback before each new movie
    in the sequence starts playing?
    Thanks

    It looks like you are loading 2 clips so that when one is
    finished the next one will play without delay and then it loads the
    next in the series beneath it.
    The flash that I am seeing is from the one that is hidden.
    Before it begins to play, the next movie is loaded and you see it,
    then they play in the correct order.
    Try placing the code you have in the onLoadComplete event
    into the onLoadInit event. Like this:
    listen.onLoadInit = function(mc:MovieClip) {
    mc.play();
    _root.myInterval=setInterval(doInterval,delay);
    loadbtm.loadClip(list[(IDX+1)%numImages],_root.btm);
    And comment out the following:
    //listen.onLoadComplete = function(mc:MovieClip) {
    // loadbtm.loadClip(list[(IDX+1)%numImages],_root.btm);
    The onLoadComplete event gets called first and starts loading
    your next slide before the onLoadInit event gets called. This small
    delay maybe enough to be causing the flash you are seeing.
    Tim

  • Passing variables to loaded external movie

    Ok, this problem has beaten me for the last 2 days. It seems
    to be extremely simple, I am on main movie and I am using
    MovieClipLoader class to load external movie callMe.swf into movie
    holder called holder_MC, then from main using onLoadInit or
    onLoadProgress listeners I can target dynamic text inside
    callMe.swf as holder_MC.myTXT.text = "blablabla" or I can change
    frames in callMe.swf by holder_MC.gotoAndStop(5). But HOW TO PASS
    VARIABLE myVar to callMe.swf so it executes something there? Using
    holder_MC.myVar DOESN'T WORK!!!!!!!!!!!!!!
    Thanks for any help,
    Zbynek

    UPDATE... I copied the link to another page with my variables in the image attributes as I posted above. And it works using the values that are cached for those items. Is there any way to do this on the same page as my original link without my users having to change to a different page?

  • Disabled combo boxes don't display properly after loading a movie.

    Hi,
    I have a main movie that contains some combo boxes. Some of them may be disabled.
    By pressing a button I load another movie using loadMovie. The loaded movie also contains combo boxes.
    When the button is pressed, the clip that shows the combo boxes is removed from the stage and the loaded movie is displayed. By pressing another button, the loaded movie is unloaded and the clip with the combo boxes is displayed again.
    Well, once the other movie has been loaded, when I go back to the clip with combo boxes, the disabled combo boxes have a small gray button covering the black down arrow.
    I have determined that so long as the loaded movie contains combo box in the library, the problem occurrs, even if there is no actual instance of it.
    The combo boxes that are not disabled are not affected. The combo boxes are disabled by setting "cb_name.enabled=false".
    If the combo box is enabled, it displays correctly, but if disabled again, it goes wrong again.
    My project is targeting Flash 8, so it uses AS2.
    I'm using Flash CS4.
    This is a very simple example I did to make sure I wasn't doing anything funny:
    Initially:
    After pressing the button:
    After pressing the other button:
    The behaviour in a web browser is the same...
    I hope someone can help me with this. Thanks in advance!

    Thanks for the response.
    The "Load the movie" button:
    on(click)
        _parent.gotoAndStop(2);
    The 2nd frame:
    loadMovie("Test another child.swf",Container);
    stop();
    The "Unload and go back" button:
    on(click)
        unloadMovie(_parent.Container);
        _parent.gotoAndStop(1);
    Container is a movieClip with a dark gray square shape the size of the movie clip that is loaded. It doesn't exist on frame 1, only on frame 2.
    The combo boxes are inside a movie clip, and this is only on the stage on frame 1.
    This and the captures belong to a very simple test I did. If there is a way of posting files, I can post a zip file with the two .fla and the two .swf.

  • Splitting and loading a movie in segments

    Help would be greatly appreciated. I am trying to figure out
    the best practices for loading a movie. I have an empty clip set up
    with a preloader that loads the swf file, but the wait time is too
    long. I want to split up the movie and load sections at a time as
    it runs. Does anyone know what the best practice would be to do
    this?
    Thanks!!!

    Yes you've been given good advice - use MovieClipLoader -
    you'll find enough to get you going on that in Flash help. Wait til
    the movie's completely loaded before you go to frame 10. Do this by
    putting your gotoAndPlay line in an onLoadComplete event handler
    eg.

  • Has anyone managed to load a movie on their Moza

    I've bought two of these things for the kids this Christmas, and I can load pictures, and music, but I can't seem to load any of my movies. Has anyone else While in the Central Software it shows the file transferring, it take a long time but finally gets to 00%. When I try to view it on the mp3 player it plays 5 seconds, and that's it. It obviously didn't transfer everything. It plays in Media Player as well. I tried to transfer it using media player too. It locks up and I have to end the program. I need a hammer.

    Re: Has anyone managed to load a movie on their Mozaic i With a screen resolution of 28 x 60 you're going to be hard-pressed to get great quality from downscaling a full-size movie. That said, you dissatisfaction with the movies converted by this Daniusoft application may simply indicate the compression level was too aggressi've. That would appear as blocky or splotchy areas during playback or freeze frames. With any converter you need to balance between the quality setting and the final output file size.
    If you search the forum you'll find mention of an application called BADAK http://www.robbiek.com/badak.htm. It is a free converter that is significantly faster than the once Creative bundles that has a preset option for the flash Zen. Those setting will probably work reasonably well for the Mosaic if you change the output resolution from 320x240 down to 60x28. However, I don't have a Mosaic so I'm speculating. Even so the presets may not be ideal for some source video being converted. Quality video transcoding is a "fiddle with it" process not a "one-button" process.

  • Can you tell when a loaded SWF has reached its final frame?

    I used loadMovie to load an external SWF into the bottom-half
    of a main "shell" swf. When that loaded SWF finishes playing (it's
    just an animation), I need to populate a text field with the word
    "DONE" . The text field resides on the _root, so I need some way to
    know when the loaded SWF has reached its last frame...
    This would obviously be easy if I had the .FLA of the loaded
    SWF because I could just write the actionscript on the last frame
    of that SWF to populate the _root textfield. Alas, I do not have
    the source FLA of that loaded SWF, so I need some way to have the
    main "shell" SWF/FLA know when that loaded SWF has reached its end.
    Is this possible???
    Thanks!!!

    DIY_Lobotomy,
    > The reality of my situation is that there's a "menu" of
    sorts that
    > gets loaded into "contentClip". This "menu" has a bunch
    of links.
    So far, so good.
    > When clicked, each link loads a DIFFERENT swf into
    "contentClip".
    > It is THOSE swfs that I need to note the end of.
    That's still okay.
    > So, there's actually more than one, and they're not
    exactly being
    > loaded directly from my main movie, since they're
    actually loaded
    > based on a link being clicked in the movie that is
    currently loaded
    > into "containerClip"
    The concept is still the same, no matter what. No matter how
    deep the
    one-clip-loads-another chain goes, you have to keep taps on
    each chain link.
    When the final link has loaded, you'll be able to make your
    object reference
    to that movie clip. That movie clip -- because it's an
    instance of the
    MovieClip class -- will have the _currentframe and
    _totalframes properties.
    You'll just be checking *that* cliip's properties instead of
    the one named
    contentClip in my own example.
    You can loop using onEnterFrame or, if you prefer, with
    setInterva().
    That doesn't much matter either, so long as you repeatedly
    poll the deepest
    clip to test its current frame against its last frame (this
    all assumes that
    the clip being tested is a linear animation whose end
    corresponds to its
    last frame; otherwise, you could check _currentframe against
    any arbitrary
    frame number).
    > I hope that wasn't too confusing! Do you still have a
    solution???
    Not too confusing to understand, but it might be confusing
    to route
    through in practice. Not confusing, actually, but meticulous
    ... you'll
    have to be careful with your pathing. Nested movie clips are
    very much like
    nested folders on your hard drive. Their instance names
    relate to the
    folder names.
    Now, if that menu doesn't have an instance name you provided
    -- or if
    any fork along the path has an instance name you can't
    control -- you can
    still reference the nested movie clips. If you test your file
    in the
    Debugger panel, you'll see all the instances laid out in
    hierarchical order.
    You'll see that automatic instance names are provided
    (something like
    "instance1", "instance2", etc.).
    David Stiller
    Contributor, How to Cheat in Flash CS3
    http://tinyurl.com/2cp6na
    "Luck is the residue of good design."

  • How to load flash movies in a "series"

    Basically, I have 5 external swf movies.
    I want to load them on another swf container one after
    another, with the container being able to detect the last frame of
    a certain movie and load the next randomly. I can load them easily
    by individually assigning the length of each movie into the
    container.
    But the problem is that the external movies varies in lengh.
    I want to be able to update an external movie and the container
    would still be able to detect the last frame of it.
    Hope someone can help. Thanks in advance.

    i would create 2 arrays. one with the SWF names, and one with
    interval times based on the length of the movies, then use a for
    loop to load the movies into the container based on setInterval...
    you can try using _totalframes if that is going to be to difficult,
    but im not sure how successful that will be.

  • Load & Unload Movie Issue

    Hi Guys:
    Have 2 unable solve issues, would be much appreciated if anyone could help.
    // ISSUE 1 //
    I am experiencing an issue with Load & Unload Movie.  What happen is that I am trying to load an external SWF into a movie clip call movieContainer in my main website.  This external SWF file has timeline that perform a animation when it's loaded into the movieContainer.
    I can load and unload the movie with no problem...the issue is that after I unload the SWF and then at any point of the movie on the main website I click to load the SWF back to the stage.....the timeframe of the SWF file stay at where it get left off(when it's unloaded).  I am trying to make it play start all over again.
    I try the movieContainer.content.gotoAndPlay(1); but it doesn't do anything. Any idea how I could make this work?
    Here is my code:
    var content:Loader = new Loader();
    content.load(new URLRequest("externalSwf/content.swf"));
    loadMovieButton.addEventListener(MouseEvent.CLICK, loadMovieButtonClicked);
    function loadMovieButtonClicked(e:MouseEvent):void{
        movieContainer.addChild(content);
    // ISSUE 2 //
    In my external SWF file, I have create a loading loader at the 1st frame.  But it doesn't play all the time when I testing on the server.  It works just fine when I test locally with TEST MOVIE.  Not only it doesn't play all the time.....it suppose to play from 2nd frame of the movie after the loading is finished (I have a short animation play between frame 2 - frame 20)  Instead of playing from frame 2 to frame 20, the animation just jump straight to frame 20...which mean the user won't see the animation between frame 2 - frame 20.
    import flash.events.ProgressEvent;
    function update(e:ProgressEvent):void
    var percent:Number = Math.floor( (e.bytesLoaded*100)/e.bytesTotal );
    if(preloaderMC is MovieClip){
    preloaderMC.gotoAndStop(percent);
    //preload_txt.text = String(percent);
    if(percent == 100){
    gotoAndPlay(2);
    loaderInfo.addEventListener(ProgressEvent.PROGRESS, update);
    // Extra test for IE
    var percent:Number = Math.floor( (this.loaderInfo.bytesLoaded*100)/this.loaderInfo.bytesTotal );
    if(percent == 100){
    nextFrame();
    stop();
    Many Thanks!

    Thanks for the reply, the code I use to load the external SWF is:
    The button is within a movieClip: commercialScrollBar_mc
    The button instance name is: stackPancakeBar
    The external SWF get to load into a movieClip container call: projectDetailsContainer_mc
    var ldr:Loader = new Loader();
    ldr.load(new URLRequest("projectsCommercial/stackPancakeBar.swf"));
    commercialScrollBar_mc.stackPancakeBar.addEventListener(MouseEvent.CLICK, stackPancakeBarClicked);
    function stackPancakeBarClicked(e:MouseEvent):void{
        MovieClip(ldr.content).gotoAndPlay(1);
        projectDetailsContainer_mc.addChild(ldr);
    I was thinking does it has anything to do with the UNLOAD script I have on the external SWF file? Below are the code for removing the child.
    back_btn.addEventListener(MouseEvent.CLICK, removeProjectDetails);
    function removeProjectDetails(e:MouseEvent):void{
        this.parent.parent.removeChild(this.parent);
    Thanks Heaps, by the way, do you have any idea why the loading sequence doesn't get to play every time?  Or perhape the file size is too small?

  • Voiding Links when Loading a Movie

    From my index page, when someone clicks on a link it loads a
    movie clip on top of that page. However, once they are on that new
    page, the links from my index page are still showing up. As you
    move the arrow around the page you will see the hand come up where
    the links were on the index page. How can I void this so that those
    links don't show up/aren't active on every other page of the
    website?
    I'm desperate for help on this question!!!
    Thank you!
    Kristine

    When you say index page, are you talking about a "page" in
    Flash or an HTML page? I'm assuming you are talking about Flash.
    Second question, how is your FLA set up to go to different
    sections? Are you using frame labels across your main timeline?
    Also, are your links in text or are they buttons?
    One thing you can do if you are using a timeline approach is
    to simply place a keyframe on the layer that holds your link at
    each page/section and remove the link completely on areas is it not
    needed. If it's a button or movieclip, you can disable it on
    sections it's not needed.
    So, you'd place this code in the actions layer on a keyframe
    at each section. You do have your topmost layer set as an actions
    layer, right? :)
    myBtn2_btn.enabled = false;
    Then on the keyframe on your "index" section, you'd want to
    enable it again.
    myBtn2_btn.enabled = true;

Maybe you are looking for