Skip navigation
joyeta
Currently Being Moderated

Alpha ..not working properly

Jul 3, 2012 11:35 PM

In my application i am getting alpha value from xml and i just want to put it into a movieclip.

 

var alp:Number=Number(findSetting("alpha", "1.0"));// from xml

                trace("bg.alpha "+alp);// getting correct value

               

               

                (bg as MovieClip).graphics.beginFill(viewerBG);

           

               

                (bg as MovieClip).graphics.drawRect(0,0, 400,250);

                (bgCopy as MovieClip).graphics.beginFill(0xffffff);

                (bgCopy as MovieClip).graphics.drawRect(0,0, 400,250);

                bg.alpha=alp;

                trace("bg.alpha1 "+bg.alpha);//getting correct value

 

but i have got no effect after 0.5(alpha value).
I m giving the alpha value from a Slider(o,.05,...).
in 0 alpha is getting 0,in 0.15 it looks like 0.5 alpha value and on 0.3 it is showing as it is alpha 1...
i cant understand the reason..
even i have tried (bg as MovieClip).graphics.beginFill(viewerBG,alp);working same...

 

please help me out..

Thanx& Regards

 
Replies
  • Currently Being Moderated
    Jul 4, 2012 5:27 AM   in reply to joyeta

    There are a couple of unknowns in your code.  If I replace them with knowns, then it all seems to work fine.  I would look into whatever viewerBG is and see what it is contributing in the way of an alpha value.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 4, 2012 5:48 AM   in reply to joyeta

    It works fine when I run it.  You should test it separately from what you have it molded into and maybe then you will realize what is different about it.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points