A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Load img to invisble mc.

  1. #1
    Junior Member
    Join Date
    Sep 2006
    Posts
    9

    Load img to invisble mc.

    Hi!
    I´m loading a img to a invisible Mc. My_Mc._visible = false;
    but when the image is loaded the Mc is no longer invisible.
    I want the mc to remain invbisible when the img is loaded in to it

    How can i do this?


    / per

  2. #2
    Senior Member
    Join Date
    May 2004
    Posts
    322
    wats ur code>???
    Everybody has a story to tell, what's yours? -- http://www.filmfiler.com

  3. #3
    Junior Member
    Join Date
    Sep 2006
    Posts
    9
    Quote Originally Posted by perharald_
    Hi!
    I´m loading a img to a invisible Mc. My_Mc._visible = false;
    but when the image is loaded the Mc is no longer invisible.
    I want the mc to remain invbisible when the img is loaded in to it

    How can i do this?


    / per
    loadMovie("bild.jpg", "bild1");
    bild1._visible = false;

  4. #4
    Flash Video Moderator Wheels's Avatar
    Join Date
    Dec 2000
    Location
    Minneapolis
    Posts
    1,590
    The movie clips properties are reset and often hard to control when loading into a clip. When loading .swf or images into a clip I usually create "nest", set the "host" properties as needed, then control the host only (as if it were the actual clip).

    Code:
    this.createEmptyMovieClip("hold_mc", 1);
    hold_mc.createEmptyMovieClip("nest_mc, 0);
    hold_mc._visible = false;
    hold_mc.nest_mc.loadMovie("external.jpg");
    It's handy to do it this way, allows you to set and control properties on one clip, yet load many others into the nest clip (replacing the old content) yet maintaining the state and properties you want to remain constant.

    For example, you may want to have a sound object for the item that you are loading (.swf files for example) - yet you don't want to have to create a new object after you've began loading (makes more sense to prep and maintain only one clip).

    So...
    Code:
    mySound = new Sound(this.hold_mc);
    Which allows you to control all sounds nested in the clip (hold_mc.nest1_mc, hold_mc.nest2_mc).

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