Solved

loadmovie

Posted on 2001-07-10
5
445 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 50 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
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 this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

747 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