Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Title colours 1

Status
Not open for further replies.

MarkZK

Technical User
Jul 13, 2006
202
0
0
GB
Hi,

I have a title in flash with the var name of title_txt, the title text is set by a querystring (main.swf?title=Help) this works fine, my question is could somebody tell me how or give me a link that shows how I can access the colour property of the title so that I can use querystrings to set the colours, for example : main.swf?title=Help&bcolor=#800000&fcolor=#ffffff (bcolor=backgroundcolor fcolor=foregroundcolor) and the colours default to white and black if the querystrings are null.

Thanks.
 
If you're using a TextField, you need to set up TextFormat variable in your receiving file to receive the color for the font...

var myFmt:TextFormat = new TextFormat();
myFmt.color = 0x000000; // = black font

then set the TextField format and background color

title_txt.setTextFormat(myFmt);
title_txt.background = true; //turn on background color
title_txt.backgroundColor = 0xFFFFFF; //white background

So, if you pass your variables into your receiving SWF file and then execute the above code using those variables in Actionscript inside of the receiving SWF you should have it.


[thumbsup]
 
I'll give that a go, Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top