A Flash Developer Resource Site

Results 1 to 14 of 14

Thread: Movie Position

  1. #1
    Junior Member
    Join Date
    Mar 2001
    Posts
    3
    Hello New to flash5 was wondering if I am missing something I want to use the "loadmovie" command for small SWF files so that they are placed in a particular position when viewed on the browser window to build up a complete page.

    I under stand that when using levels all levels above level 0 take on the size and fram rate of level 0 Should I be creating all subsequent SWF files at this size and position them on theie own stage relative to where I want them to be on the "Combined" browser window?

    Sorry if this is too simple (Like Myself) but it's really ticking me off. I know it must be possible but I am not sure how any suggestions

    Thanks in anticipation
    [Edited by boydireland on 03-04-2001 at 08:57 AM]

  2. #2
    Senior Member
    Join Date
    Sep 2000
    Posts
    1,159

    Hi and Welcome to FlashKit!

    I usually make all my loaded SWFs the same size as my main movie - that way, I can place them exactly where I want them.

  3. #3
    Junior Member
    Join Date
    Mar 2001
    Posts
    21
    you could do that or you could load the swf into a MC and position it where you want it.

  4. #4
    Junior Member
    Join Date
    Mar 2001
    Posts
    3
    Originally posted by womble1
    you could do that or you could load the swf into a MC and position it where you want it.
    Sorry to appear even dummer but does MC stand for movie clip? if so would this not then mean a large size file to download? My reasons for using the loadmovie and unload movie was that the user would only need to load the info that was relevent to him / her and not a complete movie file containing info that they might not want?

    I have adopted the method suggested i.e. make all the movies the same size and loaded them into different layers this seem to work so far.

    Regards Boyd

  5. #5
    Junior Member
    Join Date
    Mar 2001
    Posts
    21
    Yes MC stands for movie clip. It wouldn't increase the file size at all. All you do is have an empty movie clip on the main movie and load the subsequent swf files into the movie clip. The swfs are not contained in the oringinal movie, they are separate...just like they would be by loading them into a level above the main movie timeline. When you load the extra movies do it the same way but rather than loading them into level_1 (or any other level) load them into a target movie clip instead.

  6. #6
    Junior Member
    Join Date
    Mar 2001
    Posts
    21
    hi, me again. I just wanted to add that when you load a movie in a movie clip the top of the loaded swf will be positioned at the centre point of the movie clip. So place the empty movie clip (it will just look like a small white circle since there is nothing in it) where you want the top left corner of the loaded swf to be. Or if you find it difficult positioning a movie clip with nothing in it then put a little square graphic in there, making sure it's centred, and then delete it before exporting your movie. Also, don't forget to name the instance of the movie clip so that you can target it when using the load movie command. I hope I have explained this in a way you can understand. Let me know if you need more clarification!

  7. #7
    Senior Member
    Join Date
    Nov 2000
    Posts
    100
    in order to get out of the swf that is in the mc and back on to the main movie's timeline do you have to use the root command or is that going to apply only to the swf that is in the mc....

    I hope this makes sense cause I am having a lot of trouble with this. I have tried every AS I can think of and nothing is going back to the main timeline.

    Also, why when you load swf's why are some of them showing the excess work that is outside the borders. I can not figure out how to get rid of this. I tried using the fs command fullscreen, but it wouldn't scale.

    last question: how do you size the mc that the swf is in?

    please help
    thanks

  8. #8
    Junior Member
    Join Date
    Mar 2001
    Posts
    21
    If you want to control what is happening on the main timeline from the loaded movie then yes you need to use _root. This is because the loaded swf will act exactly like a normal MC on the main timeline. In fact, by loading the movie into an MC it basically becomes the MC and takes on it's properties, which is very useful because anything that would apply to a regular movie clip now applies to the loaded swf. This means that you can use setProperty to set the _width and _height properties of the movie clip to change it's size.

    If you want to control anything that happens on the loaded movies timeline from the main _level0 timeline then do it the way you'd normally control a movie clip, using the with command or using tellTarget.

    You say you can't get back to the main timeline. If I understand you correctly you are talking about having the loaded swf no longer sitting on top of your main _level0 timeline. That's easy, all you have to do is use an unload command to unload the swf from the MC. Instead of having the unload location set to a level, set it to unload from the target MC you previously loaded into. The MC will now be empty again and you can load another swf into it (for another section of your site, for example).

    Excess work outside of the borders will show up if you load a smaller movie into a larger one. Delete all that extra stuff before exporting your movie, you probably don't need it anyway. Besides, it'll also add more to the file size/increase bandwidth and why do that if you don't need that extra stuff in the first place.

    I hope this has helped you.

  9. #9
    Senior Member
    Join Date
    Nov 2000
    Posts
    100
    womble1, thank you!!!!!!!

    the info you supplied has helped with several things.

    One of my major problems was my fs commands. I did not realize that the main movie reads them when they are in a mc. Using trial and error I realized that my allowscale was messing everything up.

    I might need a little more info on the set property command for width and height, but as for now I am alright.

    thanks again

  10. #10
    Senior Member
    Join Date
    Nov 2000
    Posts
    100
    I'm having much difficulty sizing my mc. I am using flash 5 and most of the info I have on AS is for flash4.

    For starters, am I putting the command in the mc or directly in the swf?
    Plus, what is the script for it?

    I've been struggling with this for quite some time now. please help...thanks

  11. #11
    Senior Member
    Join Date
    Nov 2000
    Posts
    100
    I'm really having much difficlty here. Any help would be useful.

    Do any of these codes seem correct:

    introa._xscale = 50;
    introa._yscale = 50;

    or

    setProperty ("introa", _xscale, 100);
    setProperty ("introa", _yscale, 100);

    or

    (using stagesize)

    or

    (using the width and height AS)

    please help
    any assistance would be useful.

    thanks


  12. #12
    Junior Member
    Join Date
    Mar 2001
    Posts
    21
    Hi,
    Sorry I couldn't answer sooner, seems like you've been having a bit of trouble. If you haven't already figured it out then maybe this will help...

    On the button you're using to load the swf put something similar to this,

    on (press) {
    setProperty ("_root.empty", _xscale, "50");
    setProperty ("_root.empty", _yscale, "50");
    }
    on (release) {
    loadMovie ("movie.swf", "_root.empty");
    }

    What it does is sets the MC (which I've named the instance "empty") that will receive the loaded swf to scale by 50%. I've used percentage rather than a pixel size because sometimes that can cause some strange things to happen. Then when you release the button is when it actually loads the swf into the already resized movie clip.

  13. #13
    Junior Member
    Join Date
    Mar 2001
    Posts
    3

    Smile Movie Clips

    Thanks to all hwo have contributed to this I think I have now with your help sussed out several ways to achieve what I was trying to do

    Thanks again

  14. #14
    Senior Member
    Join Date
    Nov 2000
    Posts
    100
    Womble1,

    thanks, that was exactly what I needed. I am still playing around with a couple of different ways, but basically, I have to go back to the books on certain things.

    Thanks again.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center