dcsimg
A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: [MX04] macromedia didnt think through the loadMovie function

  1. #1
    Junior Member
    Join Date
    Oct 2006
    Posts
    7

    [MX04] macromedia didnt think through the loadMovie function

    Why does it display EVERYTHING in an SWF file when I call it from LoadMovie()? I'm trying to make a flash menu of different cartoons on my site and when they load from the URL they show everything. Everything outside the canvas. What's the point of the resolution boundaries when its just going to ignore them and display everything, even what wasn't meant to be seen?

    Did anyone think that through in Macromedia? Does anyone else have that problem? Because I don't think I can think of a scenerio where you'd WANT things outside the boundaries being shown.

    Oh yea, and also anyone know how to fix that? Thanks...

  2. #2
    Actionscript Developer KigD's Avatar
    Join Date
    Jan 2003
    Location
    georgia
    Posts
    597
    You can change the dimensions of the movieclip you're loading into by accessing the movieclip
    Code:
    MovieClipLoadedInto._width = 500;
    MovieClipLoadedInto._height = 550;
    MovieClipLoadedInto._x = 0;
    MovieClipLoadedInto._y = 0;
    You get the idea,
    -Danny
    K2xL - My games, tutorials, message boards, and experiments.
    Blog

  3. #3
    Junior Member
    Join Date
    Oct 2006
    Posts
    7
    i tried that. it doesnt work especially because if theres objects in the negative X and Y it renders them in the corner. =(

    if i cant get this to work i am going to hang myself.

  4. #4
    Actionscript Developer KigD's Avatar
    Join Date
    Jan 2003
    Location
    georgia
    Posts
    597
    You have to make sure the loaded movie clip has finished loading before you can reposition.

    -Danny
    K2xL - My games, tutorials, message boards, and experiments.
    Blog

  5. #5
    Senior Member
    Join Date
    Apr 2005
    Location
    FL, USA
    Posts
    443
    If your loader SWF has a large enough canvas, of course it will show everything in the loaded SWF. If you want to restrict what you can see in the loaded SWF, use either a mask or hide certain MCs...
    Code:
    loaderMC.mc1._visible = false;
    And as kig said, the MC needs to be fully loaded before you can assign properties to it.

  6. #6
    Junior Member
    Join Date
    Oct 2006
    Posts
    7
    ok awesome, so I guess change the properties in onClipEvent(data)?

  7. #7
    Junior Member
    Join Date
    Oct 2006
    Posts
    7
    width and height seem to do the same thing as xscale and yscale....

  8. #8
    Flashmatics silentweed's Avatar
    Join Date
    Mar 2005
    Location
    London, UK
    Posts
    4,876
    just load it into an empty movieclip (which is on the topleft of the stage)... Alternatively just load it into a level

    loadMovie("external.swf", 2);

    in both case make sure make sure ur external movie stage size is the same as the main movie
    Flashmatics | Flashmatics Library (free downloads)
    -----------------------------------------------------
    Latest Projects:
    The Dead Room | Are You Smarter | Prison Break (Frame A Friend) | Beck's Fusions | The 24 Experience

    -----------------------------------------------------
    Flash Certified Developer

  9. #9
    Actionscript Developer KigD's Avatar
    Join Date
    Jan 2003
    Location
    georgia
    Posts
    597
    I think silentweed meant to say,
    Code:
    loadMovieNum("external.swf",2);
    K2xL - My games, tutorials, message boards, and experiments.
    Blog

  10. #10
    Flashmatics silentweed's Avatar
    Join Date
    Mar 2005
    Location
    London, UK
    Posts
    4,876
    oops yep thats what i meant, thats the offical way!! however

    loadMovie("external.swf", 2);

    works for levels as well as movieclips.

    macromedia doesnt really need loadMovieNum lol
    Flashmatics | Flashmatics Library (free downloads)
    -----------------------------------------------------
    Latest Projects:
    The Dead Room | Are You Smarter | Prison Break (Frame A Friend) | Beck's Fusions | The 24 Experience

    -----------------------------------------------------
    Flash Certified Developer

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