Load movie and go to specific frame

Posted on 2005-05-13
Last Modified: 2008-02-01
I have a menu that loads various movies and goes to specific frames.  The following code blinks through the first frame of the movie.  I'd like it to somehow load the movie and not play so that I can tell it which frame to start with.  If I put a blank frame in the first frame it messes up the images (apparently a bug).

I have to put the gotoAndPLay on the release because it doesn't work if I put it on the press.

Any ideas?


Here's m'code:

on (press) {
      _root.mcBody.loadMovie("Content/Plans/Plans.swf", "mcBody");      

on (release) {
Question by:dtburdick
    LVL 27

    Accepted Solution

    External movie structure:

    >frame 1 - empty, with preloader:

    this.onEnterFrame = function()
          var loa = this.getBytesLoaded();
          var tot = this.getBytesTotal();
          if(loa >= tot && tot != undefined){
                delete this.onEnterFrame;

    >frame 2 - movie content

    loading button code:

    on (press) {
         _global.gotoframe = 3; // 3 for second frame, as you have got preloader

    // If I put a blank frame in the first frame it messes up the image

    write in the first frame of your movie:

    _quality = "BEST";
    LVL 18

    Expert Comment

    if you are still having trouble - upload the fla and I can take a look.


    Author Comment

    It worked, but now I'm not sure why I had a problem before with my preloader.  For that one I was told that blank frames in the beginning of the movie cause problems (which they did) so I didn't even try this.  Anyway, this problem is fixed.

    Thanks, folks.
    LVL 27

    Expert Comment

    >It worked, but now I'm not sure why I had a problem before with my preloader.

    If you are talking about the poor quality, it is just a "bug". If you are talking about frame redirect not working, it was probably an issue of moving to a frame not loaded yet..

    Author Comment

    In another earlier post I had the poor quality issue which turned out to be the bug wherein blank frames in the beginning render poor image quality of later frames.

    But to resolve this problem I needed to add a blank frame to the beginning.  Yet in this instance the very same images didn't get messed up.

    Regardless, my problem is resolved.  Thanks for your help.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
    In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
    In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
    The goal of the tutorial is to teach the user how to how to record live broadcast.

    730 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now