• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

loadMovie to target issue

Explorer ,
Feb 06, 2007 Feb 06, 2007

Copy link to clipboard

Copied

Sorry this is a cross-post but I need help pretty quick. Noone is responding in General.

I'm trying to load a external movie clip (600x450_test.swf) to a target (targ02) on the main timeline.

I have a clip on the main timeline which contains all my buttons. The script (below) is in the first frame of this clip.

The external clip loads but replaces the entire main movie all together.

I've been away from Flash for a few weeks but I thought this was what always worked. Not near old files to check.

Script here:

stop();

this.btn_Installingyt.onRelease = function(){
_root.loadMovie("600x450_test.swf", "targ_02");
};

System: FlashPro8, XP.
TOPICS
ActionScript

Views

153.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 06, 2007 Feb 06, 2007

Copy link to clipboard

Copied

is targ_02 an emptyMovieClip
or is that where you have your buttons located?

otherwise, just position targ_02 to where you need it..

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 06, 2007 Feb 06, 2007

Copy link to clipboard

Copied

thanks sketchsta.

targ_02 is an empty clip. and the instance name is correct.

My buttons are in a separate clip on the same timeline and placed where I want it.

seems this has worked a thousand times for me. weird.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Feb 06, 2007 Feb 06, 2007

Copy link to clipboard

Copied

Can you use the loadMovieNum function like below?
loadMovieNum("600x450_test.swf", 2);

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 06, 2007 Feb 06, 2007

Copy link to clipboard

Copied

hmm, i hav no idea then... it shouldnt have anything to do with depth if it's a separate mc..

can you post your FLA so that i can have a look?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 06, 2007 Feb 06, 2007

Copy link to clipboard

Copied

loadMovieNum("600x450_test.swf", 2);

--- Loads the movie to level 2, but not where I want. That's why I need to load at my target (target_02) location.

My script works fine when it's on the main timeline, just not from with my menu clip.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 06, 2007 Feb 06, 2007

Copy link to clipboard

Copied

I always use frames to load external content.. for example:

var loader_mc:MovieClipLoader = new MovieClipLoader();
loader_mc.loadClip("600x450_test.swf", "targ_02");

this way i keep all loadings separate, and all i need to do is send the playhead to the frame i want loaded.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Feb 06, 2007 Feb 06, 2007

Copy link to clipboard

Copied

In the live docs under “loadMovie” it mentions;

“A reference to a movie clip object or a string representing the path to a target movie clip. The target movie clip is replaced by the loaded SWF file or image.”

This makes sense leodsmith, because that is happening when I test my FLA.

Yes, I also recommend what Sketchsta posted last.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 06, 2007 Feb 06, 2007

Copy link to clipboard

Copied

Thanks myIP.

I have used loadMovie into target clips for years with success. But I understand your theory and it's a good one.

I really like to keep timelines pretty simple and clean. Do you have any suggestions for a timeline "neat freak" using this way of loading externals?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 06, 2007 Feb 06, 2007

Copy link to clipboard

Copied

Sorry I'm a bit of a simpleton and am not familiar with that script. Although I'd like to understand it and be better.

When you say "frames" you mean just using gotoAndPlay?

No place to upload my file right now.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 06, 2007 Feb 06, 2007

Copy link to clipboard

Copied

Guess I mean gotoAnd Stop, right?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 06, 2007 Feb 06, 2007

Copy link to clipboard

Copied

in your situation i would have:

this.btn_Installingyt.onRelease = function(){
gotoAndStop("loader_02");
};
BTW, you can use gotoAndPlay aswell.

then on the frame loader_02 have this code:

var loader_mc:MovieClipLoader = new MovieClipLoader();
loader_mc.loadClip("600x450_test.swf", "targ_02");

also, make sure you have the keyframe which contains targ_02 mc on the same frame as loader_02, but on different layers to avoid confusion..
eg: loader_02 is on layer 4 on frame 20...and targ_02 frame would be on layer 3 on frame 20.

hope this makes sense...its about 3AM here, and im struggling to keep my eyes open...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 06, 2007 Feb 06, 2007

Copy link to clipboard

Copied

It really does. Thanks!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 06, 2007 Feb 06, 2007

Copy link to clipboard

Copied

ohh, the code is verry simple.

//this creates a MovieClipLoader called loader_mc
var loader_mc:MovieClipLoader = new MovieClipLoader();

//here you tell loader_mc to load the external content..
//which works the same way as you can see. ("your.swf","where to load in to")
loader_mc.loadClip("600x450_test.swf", "targ_02");

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 06, 2007 Feb 06, 2007

Copy link to clipboard

Copied

you're welcome

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 07, 2020 May 07, 2020

Copy link to clipboard

Copied

LATEST

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines