PDA

View Full Version : Loadmovie resize problem, tricky


samaritan
10-02-2004, 06:55 PM
Hi

I have a problem.

I am making a simple flash movie that loads in a series of movies, simple yes?

But, I don't know how big the movies are going to be (they are old work for a client and I don't want to have to go through all of them and fix them up. and I thought hey so what, I'll just load them and move them to the right spot and resize a mask to hide the stuff off screen.

But it doesn't work like that, cause the size that the movie gives back is not the stage size but the movie size.

How can I get the stage size of the loaded movie rather then the total size?

And also, is it possible to override the getURL function? As some of the movie make a call to javascript which loads a broswer, not so good in a client meeting :)

Thanks a lot.

THanks

prisma
10-02-2004, 09:08 PM
Sorry to say, but I don't know of a way to do either of these things.
Doesn't mean there is none though...

samaritan
10-02-2004, 11:49 PM
Yeah, I can't think of a way either...

I think that they are all going to be one of maybe four of five sizes, so I could check and guess, but I don't think it would be accurate...

FrozenMedia
10-03-2004, 01:03 AM
As you don't have access to the original FLA's (which would be the easiest method, just by adding a var height = A_NUMBER; etc on frame 1 of each movie), then try accessing the _height and _width properties when the movie is loaded.

So I'm assuming you are using createEmptyMovieClip to create an MC into which you are loading these child MC's, if not you might have a blank movie clip holder on stage, either way, just dont use loadMovieNum for this. At the end of your preloader code when the percentLoaded is 100 you should have access to the _height and _width, but as with JPG's this can be incorrect before this point. Also it may not yield correct results as it will only give you the bounding rectangle for the loaded movie, so if they have no backgrounds, you have no dice.

As for overriding getURL(). Just place this at the beginning of your movie:MovieClip.prototype.getURL = undefined;
_root.getURL("somesite.com"); // blocked
However this does not block getURLs that are not called from a MovieClip scope, e.g. getURL("somesite.com");...typed directly into a frame on the root timeline, however this is pretty rare, they are usually on buttons and such.

Rich