Solved

checkbox color

Posted on 2004-08-17
16
358 Views
Last Modified: 2010-04-03
I have a checkbox on the scene and I want to change the color of the check mark (symbol) to red.

How can I do this ???

Thanks
0
Comment
Question by:Megafab
  • 8
  • 8
16 Comments
 
LVL 39

Expert Comment

by:blue-genie
ID: 11829162
simply use the getStyleFormat. like so:

globalStyleFormat.check = 0xFF0000;
globalStyleFormat.applyChanges();

put the 2 lines of code above in the main timeline in the beginning - thats all.

blu.
0
 

Author Comment

by:Megafab
ID: 11833998
I've already try this but it's not working
0
 
LVL 39

Expert Comment

by:blue-genie
ID: 11838516
post your file somewhere.
0
 

Author Comment

by:Megafab
ID: 11850224
there is nothing in my fla. Just take a CheckBox component from MX 2004, and drag it on the scene, that's all.

0
 
LVL 39

Expert Comment

by:blue-genie
ID: 11850326
then it should work - check your syntax.

ps. you do realise it only shows up at runtime?
0
 

Author Comment

by:Megafab
ID: 11850336
syntax in correct.

doesn't work on publish..

An other idea ???


(Using Flash MX 2004 Pro, Publish in player 7 & AS2, CheckBox component, not FCheckBox from Flash MX)
0
 
LVL 39

Expert Comment

by:blue-genie
ID: 11867752
i can only suggest you post the fla so we can see whats going on.
0
 

Author Comment

by:Megafab
ID: 11867840
Can I send it to your mail box ???
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 39

Expert Comment

by:blue-genie
ID: 11867880
ok
blue-genie(at)bigfoot.com

(Note to moderators: I'll post the solution if I find it.)

blu.
0
 

Author Comment

by:Megafab
ID: 11869372
flash file has been sent tou you mail box
0
 
LVL 39

Expert Comment

by:blue-genie
ID: 11870271
Hi there.
I just learned something new, the styling of the UI 2 components is a totally different story, nothing as simple it seems as the UI 1 components.

So nothing wrong on your part.

Here's the solution I came up with - after browsing many different sites.

Have a look at these sites:
http://www.peachpit.com/articles/article.asp?p=101723&seqNum=4
http://livedocs.macromedia.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/js/html/wwhelp.htm?href=00002028.html#wp1129866_7_2/00003072.html

This is what i figured out.
According to the macromedia live docs, what property is available to the component depends entirely on the theme that is applied.
the property we're looking for is called "symbolColor" - this apparently changes the check in the checkbox and the dot in the dot box - symbolColor can only be used with the Sample Theme, NOT the halo theme which is the default.
So the first thing you need to change the theme.
I would have thought it was as simple as setting the theme color, but according to the live docs, No such luck, it involves opening external library, and copying those classes for that theme over. *breathe* - read here for the whole shebang -
http://livedocs.macromedia.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/js/html/wwhelp.htm?href=00002028.html#wp1129866_7_2/00003072.html

anyways, once that's done a simple line of:
_global.style.setStyle("symbolColor", 0xFF0000);
does the trick.

ps. if you want a different red you need to set it. (live docs also tells you how)

blu.
*phew*
0
 

Author Comment

by:Megafab
ID: 11870331
Is it possible to get a working example ??
0
 
LVL 39

Accepted Solution

by:
blue-genie earned 50 total points
ID: 11870435
yeah, ok, go grab it here.
http://www.geocities.com/bluegenie_sa/component/checkBox.zip

just remember you must swap out your theme.

blu.
0
 

Author Comment

by:Megafab
ID: 11870501
great job, you are the best of the world.

****ing cool.

RnR

Megafab
0
 
LVL 39

Expert Comment

by:blue-genie
ID: 11878741
:-) was hard work for 50pts!!!

you're welcome - i learned something in the process.
0
 

Author Comment

by:Megafab
ID: 11896048
I thought it was easier ;-)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Flash media server 1 326
How to disable  HTML5 video in chrome 2 1,541
Consuming WCF in Action Script 3 [ flash Develop ] 3 291
Flash ActionScript 6 41
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now