0
Enthusiast
,
/t5/animate-discussions/how-to-set-the-background-transparency-of-a-textfield/td-p/221888
Jun 08, 2008
Jun 08, 2008
Copy link to clipboard
Copied
i have a actionscript 3.0 class TextArea which extends
Sprite.
it includes a TextField within it.
in my site, i have used this object over an image.
now my requirement is that i need to make the background of textarea semi-transparent so that text could be read easily, and image is visible a bit.
setting the alpha property makes text transparent too.
pls somebody help me.
it includes a TextField within it.
in my site, i have used this object over an image.
now my requirement is that i need to make the background of textarea semi-transparent so that text could be read easily, and image is visible a bit.
setting the alpha property makes text transparent too.
pls somebody help me.
TOPICS
ActionScript
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
1 Correct answer
Enthusiast
,
Jun 10, 2008
Jun 10, 2008
i made it with help of one of my collegue:
var mybg:Sprite = new Sprite();
mybg.graphics.beginFill(clr, 0.7);
mybg.graphics.drawRect(textArea.x-56,textArea.y-60,textArea.width+10,-(textArea.height+10));
mybg.graphics.endFill();
addChildAt(mybg,0);//add at the most back position.
//where textArea is the textfield object.
var mybg:Sprite = new Sprite();
mybg.graphics.beginFill(clr, 0.7);
mybg.graphics.drawRect(textArea.x-56,textArea.y-60,textArea.width+10,-(textArea.height+10));
mybg.graphics.endFill();
addChildAt(mybg,0);//add at the most back position.
//where textArea is the textfield object.
Community Expert
,
/t5/animate-discussions/how-to-set-the-background-transparency-of-a-textfield/m-p/221889#M7571
Jun 08, 2008
Jun 08, 2008
Copy link to clipboard
Copied
you have to fake it. add a sprite behind your textfield and
assign its color/alpha to suit your needs.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
subedimadhav
AUTHOR
Enthusiast
,
/t5/animate-discussions/how-to-set-the-background-transparency-of-a-textfield/m-p/221890#M7572
Jun 08, 2008
Jun 08, 2008
Copy link to clipboard
Copied
quote:
Originally posted by: kglad
you have to fake it. add a sprite behind your textfield and assign its color/alpha to suit your needs.
actually i was doing in flex before this.
i dont know what is sprite and other stuffs.
my class extends sprite and adds a TextField Child.
hence, as much i can understand is there is already a sprite.
can u pls elaborate how to change your suggestion to CODE so that i can try.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
New Here
,
/t5/animate-discussions/how-to-set-the-background-transparency-of-a-textfield/m-p/221891#M7573
Jun 09, 2008
Jun 09, 2008
Copy link to clipboard
Copied
Hi,
hope its not too late..
i found this answer on other forum, hope this solves it..
"You need to use the "Alpha" setting. Convert your shape or image into a symbol ( if you havent done alredy) and then select your symbol on the stage. After it is selected look in the properties inspector and click the colour dropdown bar and select Alpha. Choose from 1-100 as 1 being completely invisible and 100 being solid."
hope its not too late..
i found this answer on other forum, hope this solves it..
"You need to use the "Alpha" setting. Convert your shape or image into a symbol ( if you havent done alredy) and then select your symbol on the stage. After it is selected look in the properties inspector and click the colour dropdown bar and select Alpha. Choose from 1-100 as 1 being completely invisible and 100 being solid."
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Enthusiast
,
/t5/animate-discussions/how-to-set-the-background-transparency-of-a-textfield/m-p/221892#M7574
Jun 10, 2008
Jun 10, 2008
Copy link to clipboard
Copied
i made it with help of one of my collegue:
var mybg:Sprite = new Sprite();
mybg.graphics.beginFill(clr, 0.7);
mybg.graphics.drawRect(textArea.x-56,textArea.y-60,textArea.width+10,-(textArea.height+10));
mybg.graphics.endFill();
addChildAt(mybg,0);//add at the most back position.
//where textArea is the textfield object.
var mybg:Sprite = new Sprite();
mybg.graphics.beginFill(clr, 0.7);
mybg.graphics.drawRect(textArea.x-56,textArea.y-60,textArea.width+10,-(textArea.height+10));
mybg.graphics.endFill();
addChildAt(mybg,0);//add at the most back position.
//where textArea is the textfield object.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Community Expert
,
LATEST
/t5/animate-discussions/how-to-set-the-background-transparency-of-a-textfield/m-p/221893#M7575
Jun 10, 2008
Jun 10, 2008
Copy link to clipboard
Copied
great.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

