Can someone explain why this code does not work then? I tried to make it so that it will change the button color to red then back to its original color but its not working?
?xml version="1.0" encoding="utf-8"?mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" xmlns="*"
mx:Script
Well what I am actually trying to do is restore a button to its original fillcolors setting?
Yahoo! Groups Links
To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups
On 6/7/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Can someone explain why this code does not work then? I tried to make it so
that it will change the button color to red then back to its original color
but its not working?
public function changecolor(){
oldColor=
You are setting 'color'
style instead of 'fillColors' style in your changebackcolor() function. Change
the 'color' to 'fillColors' in changebackcolor() as well as in changecolor()
function and it should work.
Thanks
-Ashish
From: flexcoders@yahoogroups.com
[mailto:[EMAIL
I changed color to fillColors in both the changebackcolor() method and the changecolor() method but all I get when I change the color back is a black button?
?xml version="1.0" encoding="utf-8"?mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" xmlns="*"mx:Script![CDATA[public var
On 6/8/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
I changed color to fillColors in both the changebackcolor() method and the
changecolor() method but all I get when I change the color back is a black
button?
[...]
buttonthree.setStyle(fillColors, [oldColor])
^^^
As
It works now thanks
Yahoo! Groups Links
To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
getRGB()
http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary143.html
On 6/6/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
I am asking because what I want to do is change the color of a button
to a different color but later on reset it to its
On 6/7/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
I am asking because what I want to do is change the color of a button to a
different color but later on reset it to its original color. How do you
first store the value of the original color and how do you call it back
later?
Save the
You should never need to use getRGB() in
Flex; this is a low-level Flash API. You would use getStyle() and setStyle() on
the Button object, and store the old color in a instance var.
?xml version=1.0
encoding=utf-8?
mx:Application
xmlns:mx=http://www.macromedia.com/2003/mxml
You can create a variable
at application level and store values in there. You can write some code to
back up styles and retrieve later. I am giving following example for just idea,
it is not production quality codeIt can be more generic and
better...
mx:Application
11 matches
Mail list logo