This content has been marked as final. Show 4 replies
first i think you're getting confused between layers, levels and depth. have a look here.
when creating an empty movie clip, where you've written '_level1', you need to put a depth, not a level.
also, you need to wait until a swf has been loaded before you can manipulate its width and height. the movieclip loader class is the easiest way of achieving this. there are examples to follow here.
Thank you for responding. Unfortunately I am stuck coding for Flash Player 6. The article says this availability is Flash Player 7. How does that effect the code? Please pardon my ignorance but I have created an empty movie clip. Do I still need to create a MovieClipLoader? What would the code look like? Is this part of a "preloader" that you can see the progress of the download? So if the SWF is called movie.swf should the code be: MovieClipLoader.loadClip(movie.wf)? And will that do it all or is there more to code to resize and reposition the SWF? Thanks again for you time.
Oh and where should I put this code? On the button, on the timeline or on the movie clip? Thanks again.
that's a lot of question marks! let me see if i can answer some of them.
so you're stuck with flash player 6 hey? that's a shame. yes movieclipLoader was introduced in Flash MX 2004 so you won't be able to use it, but you can still test if a movieclip has loaded. rather than take you through it, i figured someone must have already written a tutorial so googled this for you - check out a tutorial at david stiller's blog (thanks david) read up until the heading "Another answer, short and sweet" - you can't use that one sorry! where it says "trace("Loading complete!");" you should put your code for resizing your swf.
other answers - yes this is like a preloader except all its doing at the moment is testing for completion - you can change the code if you like to do something like display a percentage as it loads to make it a true preloader.
Oh and where should you put this code? in all instances it is best practice to put code on the frame - on the timeline.