[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

loadmovie

Posted on 2001-07-10
5
Medium Priority
?
466 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
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…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
Suggested Courses

650 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