Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Can a glow filter be applied to a transparent object?

Explorer ,
Jul 30, 2013 Jul 30, 2013

Hi guys, once again...

I have this green rectangle, with the following properties:

  targetc.width = 142;

          targetc.height = 144;

          targetc.x = 273;

          targetc.y = 218;

          targetc.alpha = 1000;

          targetc.antiAliasType = AntiAliasType.ADVANCED;

and I also have the letter C which is glowing and needs to be placed into the rectangle:

function dragC(event:MouseEvent):void {

          stage.removeEventListener(Event.ENTER_FRAME, stage_onEnterFrame);

    var item:MovieClip=letritaC(event.target);

    item.startDrag();

    var topPos:uint=this.numChildren-1;

    this.setChildIndex(item, topPos);

}

function cRelease(event:MouseEvent):void {

          var item:MovieClip=letritaC(event.target);

    item.stopDrag();      

    if (targetc.hitTestPoint(item.x,item.y)) {

        item.x=targetc.x;

        item.y=targetc.y;

    } else {

       item.x=273;

       item.y=(stage.stageHeight - 100);

    }

}

Now, as per the alpha property (if I am right), the rectangle is not visible in the screen due to its transparency... how can I make it glow, seeing only the glow, so I know where I have to put the letter C?

Thanks so much!

TOPICS
ActionScript
704
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jul 30, 2013 Jul 30, 2013

what are you trying to do by assigning an alpha = 1000?

whatever that is supposed to do, it won't work.

the next problem is, what you're calling a green rectangle must be a textfield.  what's that about?

but, to enable a glow on an object that you don't want visible (ie, only the glow will be visible), you assign a glow filter with its knockout property enabled.

Translate
Community Expert ,
Jul 30, 2013 Jul 30, 2013

what are you trying to do by assigning an alpha = 1000?

whatever that is supposed to do, it won't work.

the next problem is, what you're calling a green rectangle must be a textfield.  what's that about?

but, to enable a glow on an object that you don't want visible (ie, only the glow will be visible), you assign a glow filter with its knockout property enabled.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 30, 2013 Jul 30, 2013

Allright.

I have the C object, defines as a MC, which is draggable object; and the C target defined as a MC also, which is the target for the C object (this is the green rectangle I made)...

Now as stated, the rectangle I created is green...

I need it to be transparent (that´s why I put its alpha property that much) and the glow to be visible, so, someone will see the C object glowing and another space in the screen glowing as well, and will realize the object needs to be put in that space.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 30, 2013 Jul 30, 2013

remove that alpha, remove that antialiastype and assign a glowfilter with it knockout enabled.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 30, 2013 Jul 30, 2013

Yeah! I removed the alpha and set the knockout enabled and it did work very good.

Thanks a lot!!!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 30, 2013 Jul 30, 2013
LATEST

you're welcome.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines