2 Replies Latest reply on May 31, 2007 5:21 PM by jgomula

    set property after loadClip

    jgomula
      Hi Community!

      I am trying to use loadClip to randomly load in an external SWF (this part works great) and then to adjust the alpha of the loaded clip (ultimately I'll have the alpha adjusted according to the level the clip loads on, so different clips will have different alphas). Can't seem to change any property of the loaded clip, please help!

      Thanks!!



        • 1. Re: set property after loadClip
          Rothrock Level 5
          Well you made it over the first hurdle! The alpha won't work in the onLoadComplete, so it is good that you have it in the onLoadInit.

          But look at how you've done this. You say this._alpha, but if you add this line:

          trace("current scope is: "+this);

          You will see that this isn't refering to what you think it is.

          Instead you want to use the target_mc returned by the event. So

          target_mc._alpha=40;

          should do the trick!
          • 2. Re: set property after loadClip
            jgomula Level 1
            THANKS!!! That was soo much simpler than all the examples in the Help section - you rock!!!