LOADING
Loading
Hi , welcome back.
LogoutLOGOUT
 
  Lost password?  
Hi
 




 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-16-2010, 11:37 PM
magicrat80 magicrat80 is offline
Registered User
 
Join Date: Jun 2010
Posts: 1
Rep Power: 0
magicrat80 is on a distinguished road
Send MovieClip colour value to dynamic text box

Hi,

I've been struggling to figure this bit out and it's driving me crazy.

What happens in my flash file is I click on a colour swatch and that colour is then stored until I click on the part of the shirt I want to change colour. Once that part of the jersey has changed colour I want to be able to send the colour from just that section to a dynamic text field (to be emailed later as a reference). As an example, I click on "btn_orange" and then click on the Movie Clip "block1". "block1" changes to orange. As it changes I want to send "block1"'s colour to a text box called "hexcode1". If "block1" colour changes, then so will the text box "hexcode1". "block2" will be linked to "hexcode2" etc.

Hopefully this explains it better. I would really appreciate any help as this is the major thing holding me back from completing this.

Thanks for checking this out.


Actionscript:
var storedColor:String;
color_txt.html = true;
color_txt.autoSize = true;
color_txt.htmlText = "Choose a color swatch";
function setSwatchColor(colorNum:String):Void {
    storedColor = colorNum;
    var swatch:Color = new Color(swatch_mc);
    swatch.setRGB(parseInt(colorNum));
    color_txt.htmlText = colorNum;
}
function changeColor():Void {
    var col:Color = new Color(this);
    col.setRGB(parseInt(storedColor));
}
btn_maroon.onPress = function() {
    setSwatchColor("0x660033");
};
btn_red.onPress = function() {
    setSwatchColor("0xFF0000");
};
btn_orange.onPress = function() {
    setSwatchColor("0xFF6600");
};
block1.onPress = changeColor;
block2.onPress = changeColor;

Screendump of the flash on operation
http://i50.tinypic.com/ir23km.jpg
Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
dynamic text box appearing before called and not fading in 47rickym Flash CS3 / Flash 9 3 02-01-2009 02:21 PM
Dynamic text box from a text file, 1 after another ? bobgt Flash MX 0 01-22-2009 01:59 AM
HTML formatted dynamic text box screws up font!!! whaa?!? harky Flash 8 6 05-24-2007 07:18 AM
PHP to send varaibles to a dynamic text box asgsoft Flash MX 1 11-14-2005 10:36 PM
Dynamic Text - change text box variable on click kenisswell Flash MX ActionScript 10 11-01-2005 09:20 PM




All times are GMT. The time now is 10:57 PM.