| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
Registered User
Join Date: Mar 2001
Location: new york
Posts: 37
|
I'm trying to use a 3 variables to set the tint of a movie clip by typing the variable names in the red green and blue fields. it doesn't seem to work (i guess it doesn't recognize it as an integer). So i guess my question is how do i solve this? is there a way to convert the variable through flash5 actionscript? or perhaps i'm approaching this wrong.
|
|
|
|
|
|
#2 |
|
Administrator
Join Date: Nov 2000
Location: Australia
Posts: 8,612
|
Do you mean you have a variable called 'color1' which has the value "FF3300" and you want to be able to enter "color1" in a text field and have your object's color change to FF3300?
If that's what you're after you could use code like this (adapated from Macromedia's ActionScript Reference example) on (release) { c = new Color(mcName); c.setRGB(parseInt(color1, 16)); } This would make the clip witht he instance name 'mcName' change color to FF3300 (a nice reddy color) Cheers Jesse
__________________
Cheers Jesse Stratford ActionScript.org Cofounder Email: presented in this way to stop spam-bots: My email is composed of my first name (jesse) followed by my last name (stratford) followed by @ followed by actionscript.org Please don't email or PM me Flash questions, that's what the Forums are for! ![]() Please don't rely on me reading my PMs either. Email me about important stuff. |
|
|
|
|
|
|
|
|
#3 |
|
Registered User
Join Date: Mar 2001
Location: new york
Posts: 37
|
Thank you for your help it is not what i meant but anyway is started working now. i think i'm encountering a lot of stupid bugs in genereator, do you know where can i find known bugs?
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| LP Colorpicker | biosonik | Components | 0 | 03-25-2005 07:37 AM |
| Variable musings | retrotron | ActionScript 1.0 (and below) | 8 | 06-24-2003 11:33 PM |
| strange variable behavior | flashdudette | ActionScript 1.0 (and below) | 3 | 05-09-2003 07:49 PM |
| checking variable problem | flashdudette | Server-Side Scripting | 0 | 04-29-2003 06:51 PM |
| Paths problems or variable problem... | Enoch | ActionScript 1.0 (and below) | 4 | 04-24-2003 03:02 AM |