Menu

making a Drawer fade in

Help
2005-11-03
2013-04-01
  • Helen Triolo

    Helen Triolo - 2005-11-03

    In the following, no fade in occurs (with either the Alpha.run or the 2-line Alpha.animate code) -- any idea what I should change?

        trace(wholeDrawing[iPath] instanceof Drawer);            // true
        var mc:MovieClip = wholeDrawing[iPath].fillMovieclip;
        trace('mc='+mc);                                        // _level0.holder.apDraw7_mc
        var a:Number = wholeDrawing[iPath].fillAlpha;
        trace('a='+a);                                            // 100
    //    var myAlpha:Alpha = new Alpha(mc,a,1000,Linear.easeNone,"onFadeIn");
    //    myAlpha.animate(0,100);           
        new Alpha(mc).run([0,a],1000,Linear.easeNone,"onFadeIn");

     
    • Alex Uhlmann

      Alex Uhlmann - 2005-11-03

      Hi Helen,

      note that you manipulate only the fill of your shape created by Drawer. Is that what you want? If not use the movieclip property or lineMovieclip if you just want the lines. In your first Alpha you tween from current _alpha to 100. 100 is visible, so the tween might run but you don't see changes. Check with the onUpdate event if it is running. The second Alpha should always tween from invisible to visible and that what it's doing overhere at my computer. Post some of the rest of Drawer if you still cannot get it to work.

      Alex

       
    • Helen Triolo

      Helen Triolo - 2005-11-04

      I still can't get it to fade in.  Here's the initial setting (part of a loop):
      oneShape.lineStyle(stroke.width, stroke.color, stroke.alpha);
      // temporarily set alpha=0 so shape fill object can be created without showing shape yet
      oneShape.fillStyle(fill.color, 0);
      oneShape.draw();
      oneShape.fill();
      wholeDrawing.push(oneShape);
      ...

      then later I try to fade in the fill (the code to set it is commented out but works):
      var mc:MovieClip = wholeDrawing[iPath].fillMovieclip;
      trace('mc='+mc);    // _level0.holder.apDraw7_mc
      trace('alpha now '+wholeDrawing[iPath].fillAlpha);  // 0
      trace('color now '+wholeDrawing[iPath].fillRGB);  // 15539236
      //    wholeDrawing[iPath].fillAlpha = 100;               
      //    wholeDrawing[iPath].fill();               // this works
      new Alpha(mc).run([0,100],1000,Linear.easeNone,"onFadeIn");

      Using 1.07 beta 5

       
      • Alex Uhlmann

        Alex Uhlmann - 2005-11-04

        And are you sure that drawing is there (besides a movieclip). Make sure you are calling APCore.intialize, if you do make also sure you are not overwriting any depth (i.e. if APCore.initialize is called first without parameters it will create a movieclip on the next free depth (probably 0 then) in _root.

        Have you tried another compination of Alpha? i.e. with specifying all initialization values in the constructor?

        If you have done all this and cleared ASO Cache, can you send me the complete code, or file or post a complete isolated example?

        Best,
        Alex

         
    • Alex Uhlmann

      Alex Uhlmann - 2005-11-04

      Also, make sure if the onUpdate event of Alpha is running? Subscribe with addEventListener.

       

Log in to post a comment.