Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Loading MC By Position



I was wondering if there is a way to have a movie clip load in the middle of the stage when a buttin is pressed? Liek when i press a button on the side of my website, i want the MC to just load right in the very middle of the stage. Does anyone know how to do that?



FlashKit > Flash Help > Flash Newbies
Posted on: 08-07-2002, 03:25 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Position Loading MCs
I'm trying to load in a series of different size images and position and size boxes relative to them but the problem is they have to be loaded for me to get their sizes in order for me to do this . What would be the best way to handle this? Thanks

A Different Position On Loading
each time someone visits the site, is it possible for the background of the site to be loaded in a different position each time?

thanks

Loading MC's Into Xy Position
What is the AS for a button that, when released, loads a MC in:

- a certain frame
- a certain x and y position

Also, would it play the MC once its loaded?

Thx for ur time

Regards,
Stibily

Loading Position
um hi guys (and girls)

um i have a quick question for u .. how do i load a external swf in a specific spot on the page, using actiosncript 2.0 (with mx 2004), and then how do u make it so that you make ur external swf smaller on the page ur loading it on so tat you have a scroll bar?

Loading Swf In Right Position?
Sorry for being a little lost and as a newbie it all seems too hard.

I have a button on my main movie and want it to load an external swf (made with swf slide pro. i can action the button to load on release but how can i put it in position in my movie?

thx for any help

michael

Loading SWF Into Position?
I'm trying to load a movie into another movie. I tryed loading the movie by using a holder box (movie clip) via _root, but when it loads the movie into position it kills the code on the loaded movie. When I use the code: loadmovie("flash.swf",10) it just puts the movie in the upper corner (of coarse), but the loaded movie works. Is there some code to add to this code for positioning or something? Thanks.

Loading Mc Into A Certain Position?
hi

I got this code applied to a button:

on (release) {
loadMovieNum("section1.swf", 2);
}

how do I now get this mc to load into a certain position on the screen?

can anyone help?

Loading A Movie To A Certain Position
How would I load a movie onto a certain position on my main movie? The scripting would be very helpful!

Irregular Loading Position
Hi
I have loadmovie actions that loads several swf`s into
a their seperate movieclips in my main movie-simple...

On these movieclips I have a load movie action on the first frame,then a blanc and then in the third frame, a setproperty action to position the swf`s where they should be.

when I test/export my movie, the swf`s are sometimes (irregularly)
positioned in the default top left position.When I repeat the action it positions correctly.

This is frustrating- I don`t know what I`m doing wrong.
Please help me.
Thanks for your time.

Loading Movie In Position..
trying to load a swf into the main movie at a particular position (rather than just 0,0) . Is it possible to define the x and y coordinates or do you have to make the movie your loading in the same size as the main one??

Loading MC To A Specific X And Y Position
I'm trying to load my movie into a specific location...I got the code to load it properly, and now I need to know how to load it to specific X and Y positions...

deep cover

Loading A .swf Into A Specific Position
FELLOW FLASHERS, LEND ME YOUR EARS....

Alright, here's the situation. I have a .swf (call it home.swf). It contains a buttons, that when clicked will load another .swf (load.swf). The problem is that I can not get load.swf to open at a specific coordinate in home.swf.

The script on the button in home.swf is:

on (release) {
loadMovie ("load.swf", 1)
}

When the button is clicked, load.swf comes into the cnter of hone.swf. I want to load it on the upper right edge. Help.

After Loading A Movie, How To I Set Its X And Y Position?
okees, after using the loadmovie command to load a external .jpg in my movie. how do i position it, where i want it? cause its size is smaller than my mainmovie, and it loads in the top right corner...

am pretty sure its witht the _x,_y ; but i dont know exactly how to write it...help!!

Loading MCs Position Relative To Last.
I have a series of buttons with the instance names; button1, button2, button3, etc. and I would like, when I click on each one to load MC's I've created (clip1, clip2, clip3, etc). button1 should load clip1, etc. I would like the first clip loaded to be positioned at x=100, y=100. Then each one after that should be positioned 25 pixels down and to the right. I get the feeling this isn't too hard, but I don't even know where to begin. I am working in Flash MX.

Loading Movies Position
When i load a movie inside a move using this command
on (release) {
loadMovie("YFGtoC.swf", "Container");
}
it seems tom load the movie to the side... any tips on how i can change the allignment of where on the page the mvoie will load?

Loading External Swf Position........
On a button, I want to load an external swf. The problem is when I test the movie......when I push the button the external swf. loads, but it is positioned in the lower right hand corner of the viewing area. My question is....how do I position the externally loaded swf. using the loadMovie() script?

Another thing, I do not care if the movie just loads over the top of the whole previous movie.

Thank you for your help...

Loading External Swf In Position
How can I load external swfs in position onto the main movie with ActionScript.
If I use simple - loadMovieNum("slides1.swf", 2);
The swf loads up at 0,0 coordinates on the main stage.

I think I can place empty placeholder on main stage and load swf into that, but I can't figure out how.
Any ideas?

Thanks
Gary

Loading Movies - Position
Hellooo,

After following the loading movies tutorial at http://www.kirupa.com/developer/flash5/loadmovie.htm it still dont understand how to get the movie in the position I want it.

Any ideas??

thanks

andy

Loading A Ext. Movie Position
Umm well hi, when i load and external movie into an empty movie clip, i just can't control it's position, i mean i can't load it in the right position i desire. so then i have to drag that empty movie clip and change it's postion, then preview it again, then move it again until i get the right position.

I'm sure it's a silly thing, but i haven't search for it so hard.

Thanks in advance

Loading Outside .swf's Into An Exact Position
I swear im loosing my mind over this....
all i want to do is use a button on my main page and make it load a .swf file into an exact position on my main page. and suggestions... i know im missing something really really simple and small here....
thanks!

Random Loading And Position
I urgently need some help I have to randomly load a movie clip from the library and give it a random position and remain within the constraints of 1024x768 after so many seconds it unloads and loads another in a different position

can anyone help.

Loading Movies - Position
Hellooo,

After following the loading movies tutorial at http://www.kirupa.com/developer/flash5/loadmovie.htm it still dont understand how to get the movie in the position I want it.

Any ideas??

thanks

andy

How Do I Manually Position A Movie That I Am Loading
I know this is probably simple to many of you, but how do I position an external .swf when using a loadmovie action.

In my case I have an action loadmovie("movie.swf",1)
i.e. load the movie, movie.swf, in level 1. This gets the movie in, but how can I use actionScript to give put the movie in the exact position I want. I know that there are _x and _y properties but I can't find anything that explains how to use this with a loadmovie action. Just a note, I am not using a button to call this, it is simply an action on the main timeline.

Any help would be greatly appreciated. Thanks.

Phi463

Help Loading A Movie To A Specific Position
Hi there.

I hope you flash masters can help me.

I have a movie (experiment) and I want other movie (little)to be played in a specific frame and in a specific place on the main movie(experiment).

I tryed to load "little.swf" in the frame that i want and after unload it when i want it. That was easy.

On frame 3 I puted:

LoadmovieNum("little.swf",1)

And on frame 6 I puted:

Unloadmovie(1)

Till here everything is nice... but the "little" movie is always loaded on the lef top of the stage.

How can I make it be loaded in the right place that I want?


I tryed the setproperty but with no sucess.

Please help me because I' trying to solve this problem for more than 3 days.

Thanks in advance.

Position Problems When Loading Jpegs
Hi,

I got problems to position a jpeg in an empty movie clip through a load movie action.

the upper left corner of the jpeg goes to (0,0) of the movie clip. this is normal... but I need the jpegs to be centered in this movie clip.

This is an important matter for me because I load multiple jpegs with different sizes in the same movie clip.

When I ask for the height and width of the clip when the movie is loaded, it returns 0!

I probably would need to be able to communicate to the jpeg, itself...

Please help.

Thanks

Loading Movie Into Specific Position
Hi,

This question is similar to one just posted... I am trying to load a new .swf into level one but I need it to go to a specific position, I am not using buttons I am loading the movie with the last frame of the previous movie...

Thank you!

Loading Movie And Changing Its Position?
Hi flashers!


Got stuck with my website for the following reason, please bail me out!

I am loading a flash file(dummy.swf) into level 5 using Loadmovie as below

loadMovieNum("dummy.swf", 5);

Now if i want to change the x,y position of this loaded movie how do i do it?

Though I could achieve this by loading it into a target in my main movie, the preloader in the incoming movie wasnt working. What could be the problem?

Please help me!!!!! Thanx in advance!

Loading A Clip After Another Has Reached A Position
I have a movie clip being loaded for my effect and backdrop for all menu items. The ending postion I have labeled "end".

so on the press function on each button what is the code I need so that each button loads the backdrop then in a holder clip loads each diff swf of content.

example of button code..

on (press) {
//first changes the menu title area
_root.menu_names.gotoAndPlay("about");
//this is the pop up backdrop
_root.pop_mc.gotoAndPlay("run");
//now I need the script to call up each buttons content
if (_root.pop_mc == frame("end")){
_root.popUp.holder.loadMovie("KM_about.swf");
}
}

[F8] Loading External Swfs In The Right Position
I got to load the external but cannot figure out to load it in the correct position.

Load Code:

Code:
loadMovieNum("gallery.swf",10);

Loading JPEGs Into Set Position On Stage
Hi All,

I have made a flash movie as seen at http://www.coffeemamma.com.au and would
like to change the following:

I'd like to generate three random numbers from 1 to 5 inclusive but I want
to ensure that each number is different - e.g. 2, 4, 1 (not 2, 4, 2). I know
how to generate ONE random number, but I'm stuck on comparing them to see
whether they are the same (and if they are, then generate new numbers until
they are unique).

With the three numbers I would like to load images based on those numbers -
e.g. '_image_2.jpg' then '_image_4.jpg' then '_image_1.jpg'. This part is
fine IF I can generate the numbers.

I'd also like to have the images come to the front when they are hovered
over with the mouse and then to go 'back' to their original position when
the mouse moves away. This I'm completely stuck on.

I'd also like to be able to put the newly loaded images into certain
positions (as per the example) rather than only loaded to (0,0) coordinates.

I also want to be able to have the images masked as they come in (as per the
example) in order to avoid white corners on the top images.

I also have a page as per http://www.wasabi.org.au/wodonga.shtml which has
some of the functions I want to use, but I can't seem to get some of the
functions working in my new movie...



Many thanks,

Bruce

Problem Loading Pics Into Right Position
I have posted numerous times learning new things to get my photo gallery working and i'm almost done, but i still have one problem. I have been trying to find out how to load the photos into the center of a movie from the center of the photos. I just got this code which makes the photos load directly into the center of the stage, but i was wondering if there is code to load the movies directly into a certain movie clip. At the bottom is the new code that i just got, and the file is also attached if anyone would like to look at that and help me out. I want to get the photos so that when they load they appear in the center of the cone movie clip.

var absX = Stage.width/2.;
var absY = Stage.height/2.;
this.pathToPics = "";
this.pArray = ["scarlet1.jpg", "scarlet2.jpg", "scarlet3.jpg"];
this.fadeSpeed = 20;
this.pIndex = 0;
//loading en setting x/y for first picture
loadMovie(this.pathToPics+this.pArray[0], this.photo);
this.photo._x = absX-276;//first picture = 178 width/2
this.photo._y = absY-238;//first picture = 277 height/2
MovieClip.prototype.changePhoto = function(d) {
this.pIndex = (this.pIndex+d)%this.pArray.length;
if (this.pIndex<0) {
this.pIndex += this.pArray.length;
}
this.onEnterFrame = fadeOut;
};
MovieClip.prototype.fadeOut = function() {
if (this.photo._alpha>this.fadeSpeed) {
this.photo._alpha -= this.fadeSpeed;
} else {
this.loadPhoto();
}
};
MovieClip.prototype.loadPhoto = function() {
var p = this.photo;
p._alpha = 0;
p.loadMovie(this.pathToPics+this.pArray[this.pIndex]);
this.onEnterFrame = loadMeter;
};
MovieClip.prototype.loadMeter = function() {
var i, l, t;
l = this.photo.getBytesLoaded();
t = this.photo.getBytesTotal();
if (t>0 && t == l) {
this.onEnterFrame = fadeIn;
this.photo._x = absX-this.photo._width/2;
this.photo._y = absY-this.photo._height/2;
} else {
//trace(l/t);
}
};
MovieClip.prototype.fadeIn = function() {
if (this.photo._alpha<100-this.fadeSpeed) {
this.photo._alpha += this.fadeSpeed;
} else {
this.photo._alpha = 100;
this.onEnterFrame = null;
}
};
this.onKeyDown = function() {
if (Key.getCode() == Key.LEFT) {
this.changePhoto(-1);
} else if (Key.getCode() == Key.RIGHT) {
this.changePhoto(1);
}
};
Key.addListener(this);

Any help would be much appreciated.
Thanks
-Ryan.

AS 2 Loading An Swf From Another In A Specific Position On The Screen
Hi,

I'm new to flash and am trying to load an swf in one of the swf. The problem is that the swf loads on its default position and I dont want that. So how can i go about resolving this.

Thanks in advance

Yogster

Problem Loading Pics Into Right Position
I have posted numerous times learning new things to get my photo gallery working and i'm almost done, but i still have one problem. I have been trying to find out how to load the photos into the center of a movie from the center of the photos. I just got this code which makes the photos load directly into the center of the stage, but i was wondering if there is code to load the movies directly into a certain movie clip. At the bottom is the new code that i just got, and the file is also attached if anyone would like to look at that and help me out. I want to get the photos so that when they load they appear in the center of the cone movie clip.

var absX = Stage.width/2.;
var absY = Stage.height/2.;
this.pathToPics = "";
this.pArray = ["scarlet1.jpg", "scarlet2.jpg", "scarlet3.jpg"];
this.fadeSpeed = 20;
this.pIndex = 0;
//loading en setting x/y for first picture
loadMovie(this.pathToPics+this.pArray[0], this.photo);
this.photo._x = absX-276;//first picture = 178 width/2
this.photo._y = absY-238;//first picture = 277 height/2
MovieClip.prototype.changePhoto = function(d) {
this.pIndex = (this.pIndex+d)%this.pArray.length;
if (this.pIndex<0) {
this.pIndex += this.pArray.length;
}
this.onEnterFrame = fadeOut;
};
MovieClip.prototype.fadeOut = function() {
if (this.photo._alpha>this.fadeSpeed) {
this.photo._alpha -= this.fadeSpeed;
} else {
this.loadPhoto();
}
};
MovieClip.prototype.loadPhoto = function() {
var p = this.photo;
p._alpha = 0;
p.loadMovie(this.pathToPics+this.pArray[this.pIndex]);
this.onEnterFrame = loadMeter;
};
MovieClip.prototype.loadMeter = function() {
var i, l, t;
l = this.photo.getBytesLoaded();
t = this.photo.getBytesTotal();
if (t>0 && t == l) {
this.onEnterFrame = fadeIn;
this.photo._x = absX-this.photo._width/2;
this.photo._y = absY-this.photo._height/2;
} else {
//trace(l/t);
}
};
MovieClip.prototype.fadeIn = function() {
if (this.photo._alpha<100-this.fadeSpeed) {
this.photo._alpha += this.fadeSpeed;
} else {
this.photo._alpha = 100;
this.onEnterFrame = null;
}
};
this.onKeyDown = function() {
if (Key.getCode() == Key.LEFT) {
this.changePhoto(-1);
} else if (Key.getCode() == Key.RIGHT) {
this.changePhoto(1);
}
};
Key.addListener(this);

Any help would be much appreciated.
Thanks
-Ryan.

Saving / Loading A Position Of Movie Clip?
Hello.

I'm trying to have a save and load feature for a flash game.
I'm thinking like when you hit F5, a position in movie clip will be saved and the player will also be able to load the saved position.

Is this feasible?
How would I do this?

TIA

Loading External .swf (i.e. Swift 3D) Into Specific Position...
Alright, so I created a file in swfit 3D and exported it as tech.swf

In flash, I have the actionscript load tech.swf, but it always loads into the center of the screen.

My question is, how do I control the location (x,y) of the newly imported swf?

Thanks for your help...

URGENT Movie Loading Into Wrong Position
i have seperate web pages that i'm loading into movies via buttons, everything's working ok apart from a few buttons which are located in movieclips. when these buttons are pressed the movie is loading into the wrong position. it should lay directly over what is already there but instead is appearing halfway down the stage.

eeeek!
help!!!

Loading External Swf's To Specific Xy Position On Stage Help
How do i load external swf's to specific xy position on stage? need example use with on release:


mike, thanks, but it does't work . it does load it in a separate window when i use

on (release) {
loadMovienum("cooling.swf", "_root.holder_mc")
_root.holder_mc._x = 125;
_root.holder_mc._y = 50;
}



i can't get it to work with

on (release) {
loadMovie("cooling.swf", "_root.holder_mc")
_root.holder_mc._x = 125;
_root.holder_mc._y = 50;
}

Loading External Screen Swf: Position Problem
In a regular flash file I have a loader component which is supposed to load a screen based flash swf.

At first it worked fine then the external swf did not load in its correct position anymore. Actually most of the time you would not see it at all because it must be way out of the loader component.

Now I know there is a problem regarding the registration point of screen based documents. I found out that the 0,0 point (or 'top-left') of the screens in a movie change dynamically at runtime, depending what's in them.
Even though I have tried to switch off the auto snap option for the registration point it does not do the trick.

I am wondering why this is not a bigger issue. I have tried to find a solution everywhere, but I only found one other person bringing even the problem up.

Does anyone know what could be done?

Loading External Movie With A Specific Position
I have a SWF with a map with a number of cities on it, each city has a corresponding swf with certain information regarding that particular city, clicking the city/button I would like to open that 2nd swf as an external one in a different position in the same webpage.As it now opens in the same space of the first swf since I only know the -load movie- actionscript. I have seen what I'm trying to do in the following website:
www.pandora.com
I would appreciate suggestions in how to accomplish that task. Thank you.

Setting Initial Position After Loading Pngs Into Mc's
It's the last few lines of actionscript I'm having issues with. The movies stay were they are initially loaded and are not moved to x:20, y:20 using the array. Can anyone assist?



ActionScript Code:
_root.Total_Parts = 4;
var mcl:MovieClipLoader = new MovieClipLoader();
var listener:Object = new Object();
mcl.addListener(listener);
listener.onLoadInit = function(mc:MovieClip) {
    mc.origSize = {w:mc._width, h:mc._height};
    mc._x = Toolbox._x+((Toolbox._width/2)-(mc.scaledSize.w/2));
    mc._y = Toolbox._y+((Toolbox._height/2)-(mc.scaledSize.h/2));
    mc.centered = {horiz:mc._x, vert:mc._y};
};
var Part:Array = new Array();
for (var i:Number = 1; i<=_root.Total_Parts; i++) {
    var Part_clip:MovieClip = createEmptyMovieClip("PNG_Loaded_"+i, i);
    mcl.loadClip("PNG/Part_"+i+".png", Part_clip);
    Part[i] = Part_clip;
    Part[i]._x = 20;
    Part[i]._y = 20;
}
Part[1]._x = Part[1].centered.horiz;
Part[1]._y = Part[1].centered.vert;

Dynamic Text Vertical Position When Loading New
howdy.

i've created a dynamically loaded text field that loads lyrics when the title buttons are clicked. however, when the user scrolls the lyric page, then clicks on the next lyric title, the page appears half way down.

i've tried several things and scoured the forums for an answer but cannot seem to make it work.

please anyone any ideas.
your humble servant,
orome

Problem Loading Swf Onto Desired Position On The Stage
Hello everyone,

is it possible to load swf file into new swf file onto desired position on the stage without using loader component? Swf file to be loaded is originaly positioned at postion (0,0), and cannot be changed due actionscript code.

Thank you very much in advance,

Kind Regards

Dynamic Images Not Loading In Correct Position
Currently, I use loadmovie to load a jpg into a movieclip. However, when the jpg is loaded, I believe that the top left hand corner of the jpg is in the middle of the clip and does not line up with the top left hand corner of the clip.

How do I get the jpg to line up correctly?

Specifying X & Y Position Loading External Clip Using Level
Hello... I believe this would be simple for an experienced actionscripter... I myself am a newbie.

I'm loading an external .swf using levels.  The problem is I can't figure out how to control where the clip shows up.  A logical solution would be to load the external .swf into a clip and use the target command, but the clip is being triggered by an existing clip that is a scrolling menu.  And I obviously don't want the new clip to scroll like the menu does.

If you'd like reference to what I'm talking about, you can download a zip here: www.smdcrecords.com/menus.zip  

If you open the content.fla, and click on Red Tail... you'll see the clip I'm trying to control the location of.

Thank you for any help in advance.

Specifying X &amp; Y Position Loading External Clip Using Level
Question for "oldnewbie" please.  I ask for you because I believe yo have the closest answer..  Below is an earlier thread you answered.  Here's the earlier thread:

Tek-Tips Forums http://www.tek-tips.com/
AREA: Programmers/Graphics & Web Tools
FORUM: Macromedia: Flash
SUBJECT: Specifying X & Y Position loading external clip using Level

HANDLE: thirtyottsixx
POSTED ON: Apr 8

QUESTION:
Hello... I believe this would be simple for an experienced actionscripter... I myself am a newbie.

I'm loading an external .swf using levels.  The problem is I can't figure out how to control where the clip shows up.  A logical solution would be to load the external .swf into a clip and use the target command, but the clip is being triggered by an existing clip that is a scrolling menu.  And I obviously don't want the new clip to scroll like the menu does.

If you'd like reference to what I'm talking about, you can download a zip here: www.smdcrecords.com/menus.zip  

If you open the content.fla, and click on Red Tail... you'll see the clip I'm trying to control the location of.

Thank you for any help in advance.
-------------------------------------------------------------------

HANDLE: oldnewbie
POSTED ON: Apr 8, 2003

REPLY:
The easiest way to position an external movie when loading it on another level, is to simply pre-set it's position within the "to be loaded" itself, by adding the following on it's first frame:

this._x = 150; // offset from top-left corner (0,0)
this._y = 250; // offset from top-left corner (0,0)

I'll have a look at your .fla. Regards,



-------------------------------------------------------------------

HANDLE: oldnewbie
POSTED ON: Apr 8, 2003

REPLY:
Adding the following on the redtail.fla's first frame sort of works for me, but you can play around with numbers to position it where you want...

this._x = 275;
this._y = 25; Regards,



-------------------------------------------------------------------

HANDLE: thirtyottsixx
POSTED ON: Apr 8, 2003

REPLY:
Thanks a ton!  That's exactly what I needed!
-------------------------------------------------------------------

HANDLE: oldnewbie
POSTED ON: Apr 8, 2003

REPLY:
The rum is on me!
Cheers! Regards,


Now, my problem is the .swf I'm calling was created in "Flix" which is a program which turns .avi's and quicktime videos into .swf.  So, I can't put the x y coordinates in a preexisting .fla.  

I've also tried using the 'target" method of a empty clip with a named instance.  

Please help 'oldnewbie'
Thanks,
B

Brandon Tisherman
Designer/Web Developer
Web Blends
www.webblends.com

Loading Ext Swfs With Constant Size And Position
hello,

i've got a main movie with navigation built into it, and a blank MC which external swfs are loaded into. the external swfs are not a constant size, but i would like them to all load into the blank mc and look uniform (they only load one at a time).
right now, i am scaling and setting positions in the first frame of each external swf to be loaded.
i'm looking for some way to have the MC that the external swfs are being loaded into check the size and position of the swf it is loading, and scale or adjust position accordingly. i'm not sure if this can be done accurately, but any tips would really be appreciated!

thanks

Wait Until Movie Clip Moves To Certain Position Before Loading SWF?
Hi,

I have this code that waits a second, then moves the background around when buttons are clicked:


Code:
_root.currMovie = "home";
container.loadMovie(_root.currMovie+".swf");

bgTargetX = 42;
bgTargetY = 117;
onEnterFrame = function(){
backGround2._x = backGround2._x - ((backGround2._x-bgTargetX)/16);
backGround2._y = backGround2._y - ((backGround2._y-bgTargetY)/16);
}
newsbutton.onPress = function(){
clearInterval(moveI);
moveI=setInterval(moveF,1100,-648,117);
}

homebutton.onPress = function(){
clearInterval(moveI);
moveI=setInterval(moveF,1100,42,117);
}
personnelbutton.onPress = function(){
clearInterval(moveI);
moveI=setInterval(moveF,1100,-1338,117);
}
studiosbutton.onPress = function(){
clearInterval(moveI);
moveI=setInterval(moveF,1100,-2028,117);
}
contactbutton.onPress = function(){
clearInterval(moveI);
moveI=setInterval(moveF,1100,-2718,117);
}
function moveF(x,y){
clearInterval(moveI);
bgTargetX = x;
bgTargetY = y;
}
On my buttons, I have this code:


Code:
on (release) {
if (_root.currMovie == undefined) {
_root.currMovie = "news";
container.loadMovie("news.swf");
} else if (_root.currMovie != "news") {
if (container._currentframe >= container.midframe) {
_root.currMovie = "news";
container.play();
}
}
}
What I would like to do is wait until the background has moved to 1100,-648 before loading the external SWF when the news button is clicked (and so on for the rest of the buttons). Can someone please help me out with the code for that?

Thanks, Matt

Externally Loading SWF Into Position On A Single Movie Clip
No one seems to have ever posted how to do this, and I have been searching multiple forums as well as the web in general. I am trying to externally load swf files into a single position that i define in a specific movie clip in my main fla. Can anyone help me? Thanks. *Man I hate AS3 its so much more complicated*

Wait Until Movie Clip Moves To Certain Position Before Loading SWF?
Hi,

I have this code that waits a second, then moves the background around when buttons are clicked:


Code:
_root.currMovie = "home";
container.loadMovie(_root.currMovie+".swf");

bgTargetX = 42;
bgTargetY = 117;
onEnterFrame = function(){
backGround2._x = backGround2._x - ((backGround2._x-bgTargetX)/16);
backGround2._y = backGround2._y - ((backGround2._y-bgTargetY)/16);
}
newsbutton.onPress = function(){
clearInterval(moveI);
moveI=setInterval(moveF,1100,-648,117);
}

homebutton.onPress = function(){
clearInterval(moveI);
moveI=setInterval(moveF,1100,42,117);
}
personnelbutton.onPress = function(){
clearInterval(moveI);
moveI=setInterval(moveF,1100,-1338,117);
}
studiosbutton.onPress = function(){
clearInterval(moveI);
moveI=setInterval(moveF,1100,-2028,117);
}
contactbutton.onPress = function(){
clearInterval(moveI);
moveI=setInterval(moveF,1100,-2718,117);
}
function moveF(x,y){
clearInterval(moveI);
bgTargetX = x;
bgTargetY = y;
}
On my buttons, I have this code:


Code:
on (release) {
if (_root.currMovie == undefined) {
_root.currMovie = "news";
container.loadMovie("news.swf");
} else if (_root.currMovie != "news") {
if (container._currentframe >= container.midframe) {
_root.currMovie = "news";
container.play();
}
}
}
What I would like to do is wait until the background has moved to 1100,-648 before loading the external SWF when the news button is clicked (and so on for the rest of the buttons). Can someone please help me out with the code for that?

Thanks, Matt

Copyright © 2005-08 www.BigResource.com, All rights reserved