[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

loadmovie

Posted on 2001-07-10
5
Medium Priority
?
467 Views
Last Modified: 2012-05-04
How do you load an external .swf movie into the parent movie?
And then tell it to open up in a specific place in your parent movie?
For example:
When you click on a button this will activate the loadmovie command and the new .swf movie will open up in  a square or specific area.
0
Comment
Question by:yarmouth
  • 3
  • 2
5 Comments
 
LVL 3

Accepted Solution

by:
jeffbeasley earned 150 total points
ID: 6269393
you need a movie clip that is in the place were you want swf to load and load movie into movie clip
the reasoning behind this is that Flash defaults the loading of a movie to the upper left of the movie
loadMovieNum ("some.swf", "someclip");
someclip represents the instance name of your movie clip

Hope this helps,
Jeff
0
 

Author Comment

by:yarmouth
ID: 6269412
Done that already, isn't working thou
0
 
LVL 3

Expert Comment

by:jeffbeasley
ID: 6348597
I just posted this to your other question as you were deleting it
let me know if you still need it
Jeff

First you need to give the movie clip an instance name on the instance tag
when the motion tween is triggered
you need an internal frame loop set
Put the code inside your movie clip
from mouse click trigger event you want to write
On(release){
movieclipinstancename.gotoAndPlay(2);
}

if you want a horizontal line tween just use the number "23" represents the the final x position
frame 1
stop();
frame 2
if (this._x!=23) {
this._x=this._x++;
}
frame3
gotoAndPlay(1);

If you want a vertical tween use
frame 1
stop();
frame 2
if (this._y!=23) {
this._y=this._y++;
}
on frame 3
gotoAndPlay(1);

To create a motion tween that is given a multitude of options your going to need a function that calculates mathmaticaly the slope between both
points.

If you give me a day or so I can do this.
This is going to involve calculating your initial point.
and determining the rise over run from the two points; however you might note that in flash (0,0) is located in the top left portion of movie.  And Flash's y positions increase positively and you descend. meaning the y' go up as you move down.

To determine the exact x,y position you want to end up at
you will need to use your info panel this gives you the x,y position of your mouse and selected object.

Hope this helps, let me know if you want to tackle the formula or if you need me to try and put something together quickly.

Another note the reason you have to use a frame loop is because when you execute a loop on one frame the mc is moved when the code is finished not as the code is executing.

Good Luck
Jeff
Hope all this made since

0
 

Author Comment

by:yarmouth
ID: 6348632
on (release) {
    setProperty ("rightfly", _xscale, "210");
    setProperty ("rightfly", _yscale, "210");
    setProperty ("rightfly", _x, "-100");
    setProperty ("rightfly", _y, "250");
}

Above is the code I attached to the hidden button triggering off the event. All is well but I still need the square to tween. As you can see above my instance name is "rightfly". At the moment it's increasing by 210% and flying to the position of -100,250. I would much appreciate it if you could tell me how to set a tween from these 2 points. Still up for 100 points. What is the 'this.' all about??

Thanks
Louise
0
 

Author Comment

by:yarmouth
ID: 6348667
jeffbeasley,

PS: Above tween needs to be a diagonal tween, a bit to the right and a bit down! If that matters!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
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.
Suggested Courses

834 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