3 Replies Latest reply on Mar 11, 2008 10:34 PM by brian914

    Alpha fade question

    brian914
      In the following AS, the container alpha gets set to 50%, but when I try to fade it back to 100 following, it does not work. Why is that? How can I change that?

      Second, I am wondering if I can position the loaded jpg inside container? I am hoping to leave container itself in the sam position, but just position the loaded jpg. Is that possible?

      container._alpha = 50;
      mcLoader.loadClip("images/index_img.jpg", container);
      ZigoEngine.doTween({target:container, _alpha:100, time:1});


      Thanks a lot for any help with this!!!
        • 1. Re: Alpha fade question
          brian914 Level 1
          Sorry, I did not mean to double post, my browser was playing tricks on me.
          • 2. Re: Alpha fade question
            Rothrock Level 5
            Well the answer to the second is also the answer to the first, kinda...

            There is no way to reposition the jpg. You can only reposition the container so it looks like the jpg has repositioned. You could create a container inside the container and then reposition the child, which would keep the parent container at the original coordinates if that is what you need. But in any event you will need to wait until the external file has loaded so that you can know how big it is.

            And that is the answer to the tween as well. You need to wait until the jpg has loaded and then start your tween.

            So for both of those put them into an onLoadInit handler. It looks like you are using a MovieClipLoader instance, so check out the onLoadInit in the help files and post back if you don't know how to do it.
            • 3. Re: Alpha fade question
              brian914 Level 1
              Thank you very for that answer. That makes much sense of course. I do know how to use the onLoadInit.

              Thank you very much!