dcsimg
A Flash Developer Resource Site

Results 1 to 12 of 12

Thread: loadin swf into a mc

  1. #1
    Member
    Join Date
    Dec 2002
    Location
    somewhere in the south atlantic
    Posts
    77

    loadin swf into a mc

    hi,

    lets say you have 4 layers in a proyect,
    Level 1
    Level 2
    Level 3
    Level 4

    Is there any way of loading an external swf into a movie clip (mc1)
    which is placed in Level 3 ???

    thanks in advance,

  2. #2
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Confusion?

    Talking layers or levels? Not exactly the same thing!

    You can't create an empty container clip on another level than the main movie level. If a movie containing a container clip is already loaded on level 3 (might it be empty but loaded), then you most probably could load a movie in that container clip.

  3. #3
    Member
    Join Date
    Dec 2002
    Location
    somewhere in the south atlantic
    Posts
    77

    correction

    sorry,

    i didnt make myself clear,

    we have the main movie main.swf
    it has 4 LAYERS:

    LAYER 1
    LAYER 2
    LAYER 3
    LAYER 4

    what i want to know is if i make a movie clip (MC1),
    and i place it in LAYER 3,

    is there any way to load an external movie (swf)
    inside that movie clip so is positioned in LAYER 3 ???????

    thanks in advance,

  4. #4
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    The movie clip holder can be on any layer! Question is, will you see it if it's on layer 3, and in your above configuration, content from layers 1 & 2 may be hiding it?

  5. #5
    Senior Member
    Join Date
    Oct 2002
    Posts
    175
    Basically,

    You will create a MC (and from the MC edit window, you can simply import the SWF into that MC)

    Once you do that, then simply make sure you have layer 3 selected, and then drag the MC onto the stage.

  6. #6
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Doing that doesn't import any actionscript within the external .swf.
    You just use the loadMovie action as you would normally do.

  7. #7
    Senior Member
    Join Date
    Oct 2002
    Posts
    175
    ahhh, thought he just wanted animation.

  8. #8
    Member
    Join Date
    Dec 2002
    Location
    somewhere in the south atlantic
    Posts
    77

    loading

    ok,
    i will try to load an external swf inside an empty mclip to see how it works,

    the reason of all this, is that from a site alrready structured,
    in levels, and layers, i need to introduce new info in very specific places,
    if i just put that info in the main movie, it size will be encreased a lot,
    as i like to have just an initial loading of as much info as i can, that will take to long.

    if the info is from outside the main movie, i just load it when i need it,
    the problem was how to place it exactly where i need without modyfying all the site structure (levels, layers, m.clips, etc),

    loading it directly into a movie clip sounds a good choise,
    but i was not sure if that was possible,

    ok thaks a lot folks,

  9. #9
    Member
    Join Date
    Dec 2002
    Location
    somewhere in the south atlantic
    Posts
    77

    script

    hmmmm,

    doesn´t seems to be working,
    the external swf loads in the level i specyfied,
    but it doen´t respect the main movie structure,
    i mean the layers situation,
    it just loading normally, not inside the movie clip.

    do i have to use a special script???

    thanks,

  10. #10
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Attach your main .fla and external .swf. Zip them up!

  11. #11
    Senior Member
    Join Date
    Apr 2001
    Location
    saskatoon, canada
    Posts
    147
    Create a movie clip on layer 3. You don't need anything in it but you must name the instance.

    Use the load movie action and select target in the location drop down. Put the instance name in the field to the right of the drop down.

    The .swf that you put in the URL field will now be loaded into that movie clip that is on layer 3.

  12. #12
    Member
    Join Date
    Dec 2002
    Location
    somewhere in the south atlantic
    Posts
    77

    Done

    ok,

    thanks for your support, folks, ...

    in this meantime i realiced what i was doing wrong,

    by the way here is an example of the bussiness so this

    post ends in a nice way.

    i´have attached the two files in a zip,

    as you see it only works with the button nor the frame action inside the movie clip of the seccond example,

    (at least for me)

    see ya,
    Attached Files Attached Files
    Last edited by oceanus; 05-30-2003 at 01:58 AM.

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