Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 09-29-2003, 06:08 AM   #1
motionid
Registered User
 
Join Date: Jan 2002
Location: Tokyo Japan
Posts: 74
Send a message via ICQ to motionid
Question [AS2] TextArea Component - bg transparent?

Hello all,
Was wondering if anyone could explain how to make the TextArea Component background transparent.
The help says that by default most componants are transparent but it looks like this one isn't.

I want to be able to see through my text field to the layers below (and I'm keen to keep it a component to keep my databinding simple).

Any idea's?

Cheers,


Sean.
motionid is offline   Reply With Quote
Old 09-29-2003, 11:29 AM   #2
motionid
Registered User
 
Join Date: Jan 2002
Location: Tokyo Japan
Posts: 74
Send a message via ICQ to motionid
Default Solution to TextArea bg transparent

Ok,
looks like I'm going to answer my own post!


ActionScript Code:
_level0.componentName.depthChild0._alpha=0


Where "componentName" should be the instance name of your component.

Tested and working (I've been looking for the answer to this for ages).

Cheers,

Sean.
motionid is offline   Reply With Quote
Old 07-29-2010, 03:13 PM   #3
kerry_rnl
Registered User
 
Join Date: Jul 2010
Posts: 1
Default

I'm a complete Flash noob. I have no idea where I'm supposed to enter this code. I tried doing it on the actionscript for the text area itself and it didn't work. I'm working in AS2, by the way.

Quote:
Originally Posted by motionid View Post
Ok,
looks like I'm going to answer my own post!


ActionScript Code:
_level0.componentName.depthChild0._alpha=0


Where "componentName" should be the instance name of your component.

Tested and working (I've been looking for the answer to this for ages).

Cheers,

Sean.
kerry_rnl is offline   Reply With Quote
Old 08-07-2010, 05:07 AM   #4
pepeu
Registered User
 
Join Date: Apr 2010
Location: Stockholm
Posts: 3
Default

Quote:
Originally Posted by kerry_rnl View Post
I'm a complete Flash noob. I have no idea where I'm supposed to enter this code. I tried doing it on the actionscript for the text area itself and it didn't work. I'm working in AS2, by the way.
Try this one.
Attached Files
File Type: zip _textarea.fla.zip (133.8 KB, 326 views)
pepeu is offline   Reply With Quote
Old 07-21-2004, 05:21 PM   #5
joshjacobson
Registered User
 
Join Date: Jul 2004
Posts: 1
Default

This worked for me too! I found that I didn't need to use the full path of the TextArea though, I just did it like this:

myText.depthChild0._alpha=0; // from the MC that the TextArea was in.

Arigatou motionid, you probably just saved me hours
joshjacobson is offline   Reply With Quote
Old 07-28-2004, 05:33 PM   #6
gargamael
Registered User
 
Join Date: Jul 2004
Posts: 1
Lightbulb Another Solution to Transparent TextArea BG

This AS will set all the backgrounds for all TextArea components to "Transparent".

_global.styles.TextArea.setStyle("backgroundColor" , "transparent");

Haven't tried modifying it for a single instance, yet.
gargamael is offline   Reply With Quote
Old 07-29-2004, 12:49 AM   #7
petefs
Fried Onions
 
petefs's Avatar
 
Join Date: Apr 2004
Location: Chicago, IL
Posts: 1,328
Send a message via AIM to petefs Send a message via MSN to petefs Send a message via Yahoo to petefs
Default

ActionScript Code:
componentName.setStyle("backgroundColor", "transparent");

should work fine : )
petefs is offline   Reply With Quote
Old 01-20-2005, 04:03 PM   #8
Lugosi
Registered User
 
Join Date: Jul 2004
Posts: 16
Default background transparent or color

Quote:
Originally Posted by petefs
ActionScript Code:
componentName.setStyle("backgroundColor", "transparent");

should work fine : )

I tried changing the 'transparent' to blue and red and I saw those colors as the background. Is there a list somewhere of the background colors available? I am looking for a light gray.

Thanks!

Cheers
Lugosi
Lugosi is offline   Reply With Quote
Old 01-22-2005, 06:22 PM   #9
evann
Registered User
 
Join Date: Jan 2005
Posts: 1
Default made text transparent

you can use other colors through their hexidecimals. i.e. red would be 0xFF0000

i used

_global.styles.TextArea.setStyle("backgroundColor" , "transparent");

and it successfully made the background transparent, but it also seems to have made the text itself transparent.
any ideas?
evann is offline   Reply With Quote
Old 06-03-2005, 07:00 AM   #10
Marsis
Registered User
 
Join Date: May 2005
Posts: 8
Default

try
_global.styles.TextArea.setStyle("backgroundColor" , "transparent")

worked for me
Marsis is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:08 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.