[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 165
  • Last Modified:

Load movie and go to specific frame

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?

Thanks.

Here's m'code:


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

on (release) {
      _root.mcBody.gotoAndPlay(2);            
}
0
dtburdick
Asked:
dtburdick
  • 2
  • 2
1 Solution
 
negatyveCommented:
External movie structure:

>frame 1 - empty, with preloader:

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

>frame 2 - movie content

============================================
loading button code:

on (press) {
     _global.gotoframe = 3; // 3 for second frame, as you have got preloader
     _root.mcBody.loadMovie("Content/Plans/Plans.swf");    
}

============================================
// 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";
0
 
BillystyxCommented:
if you are still having trouble - upload the fla and I can take a look.

billystyx
0
 
dtburdickAuthor Commented:
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.
0
 
negatyveCommented:
>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..
0
 
dtburdickAuthor Commented:
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.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now