1 person found this helpful
If you load the movie into another movieclip you can use that movieclip's instance name to command the loaded swf's properties. You will have a couple obstacles to overcome though.
The first being the 800x600 doesn't fit proportionally into 400x200. You can force it, but it's gonna look a bit squarshed unless that wouldn't matter..
Another aspect you'll have to deal with is waiting for the movie to load before you try to resize it. loadMovie is not the best way to load a movie when you need to know when it's loaded before taking action. YOu will want to look into using the MovieClipLoader.loadClip() method instead since that class supports having ;isteners that will allow you to detect when the movie is finished loading.
Thank you for answering.. I had one other forum response as well.
What I found. You are so correct in the loading procedure.. but, this is what our teacher wants us to use... But, From the other forum, I got the solution.
have the swf load on the on (press)
have the swf resize on the on (release)
It's choppy, kinda... But it works for the class sake...
Thanks so much for the quick help.
That's not a solution. It will fail in a real world scenario. But if your teacher insists on it, go for it.
Yeah, that is the fun of being in a classroom situation, and we have to use what was given from our assignments. So, yah, I kinda figued what we were doing was outdated, it's ok though. But, luckily, I see here is a great resourse for when real world situations come. And, Hope to join some more advanced classes.
Thank you again
Don't know what kind of classroom situation this is, but if you paid money for this eduction I would suggest you ask for your money back!
As stated having the resizing code on the release is NOT a solution that will work except for the luckiest of local tests.
Additionally, no one should be using the on(event) style of coding unless they must publish to Flash 5 or earlier. That style of coding really went out when Flash 6 was released in 2001. Here is a great article about why not to use it.
Really you should use the MovieClipLoader class because it is so easy and does, exactly what you need. But if you are required to use loadMovie, then you need to make some preloader code that will check if the clip is completely loaded and if it is, then resize.
Doing so with on(event) style of coding is going to be really difficult and I'm far too lazy to type it all up for you. But if you really need it I could help.