Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > Supporting Technologies > Server-Side Scripting

Reply
 
Thread Tools Rate Thread Display Modes
Old 03-08-2001, 04:43 PM   #1
jonath
Registered User
 
Join Date: Mar 2001
Location: new york
Posts: 37
Question

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.
jonath is offline   Reply With Quote
Old 03-09-2001, 05:03 AM   #2
Jesse
Administrator
 
Jesse's Avatar
 
Join Date: Nov 2000
Location: Australia
Posts: 8,612
Default

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.
Jesse is offline   Reply With Quote
Old 03-09-2001, 02:42 PM   #3
jonath
Registered User
 
Join Date: Mar 2001
Location: new york
Posts: 37
Default

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?
jonath is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

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


All times are GMT. The time now is 05:20 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2009 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.