SunQuest
 
           Flash Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsWeb DesignFlash Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old March 14th, 2003, 03:23 AM
*erik *erik is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 3 *erik User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
problem with modifieing Colour_picker

Hello!

Iam tring to modifie sample Colour_picker in MX for my homepage..

I have decided some colour you can choose, then I have 5 differnt objects that you can fill with the colour you chooose.

Everything works well..

But I also whant a textfield that writes out the colour on every object.

But I dont know how too fix this variabel.

Hope someone will find time too look at the code and help me

I want dynamic textfields where I can see which colour they have are using.

// erik

Code
__________________

c1=255;
c2=255;
c3=255;
color2 = new Color(chip.chipfill);
color3 = new Color(colorset.colorfill);


// create colors
p1 = new Color(o1);
p2 = new Color(o2);
p3 = new Color(o3);
p4 = new Color(o4);
p5 = new Color(o5);
p6 = new Color(o6);
p7 = new Color(o7);
p8 = new Color(o8);
p9 = new Color(o9);
p10 = new Color(o10);



//
this.onEnterFrame = function() {
// set c1, c2, c3, hc1, hc2, and hc3 equal to the positions of their respective faders and vice versa
for (i=1; i<=3; i++) {
this["color"+i].setRGB(rgb);
}
//
// combine c1, c2, and c3 into one variable using bitwise left shift and bitwise OR
rgb = (c1 << 16 | c2 << 8 | c3);
};
//
k1.onRelease = function() {p1.setRGB(rgb);};
k2.onRelease = function() {p2.setRGB(rgb);};
k3.onRelease = function() {p3.setRGB(rgb);};
k4.onRelease = function() {p4.setRGB(rgb);};
k5.onRelease = function() {p5.setRGB(rgb);};
k6.onRelease = function() {p6.setRGB(rgb);};
k7.onRelease = function() {p7.setRGB(rgb);};
k8.onRelease = function() {p8.setRGB(rgb);};
k9.onRelease = function() {p9.setRGB(rgb);};
k10.onRelease = function() {p10.setRGB(rgb);};


//
// set color values equal to the color of the clicked button
swatch1.onRelease = function() {
c1 = 00;
c2 = 0;
c3 = 0;
};

swatch2.onRelease = function() {
c1 = 204;
c2 = 204;
c3 = 204;
};
swatch3.onRelease = function() {
c1 = 255;
c2 = 255;
c3 = 255;
};

swatch4.onRelease = function() {
c1 = 255;
c2 = 0;
c3 = 0;
};

swatch5.onRelease = function() {
c1 = 255;
c2 = 204;
c3 = 0;
};

Reply With Quote
  #2  
Old May 14th, 2003, 05:09 AM
solisarg solisarg is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2003
Location: Madrid - Spain
Posts: 9 solisarg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
I also whant a textfield that writes out the colour on every object.


The decimal values? the hex values? Normal string values? Why not just write by hand?

Jorge

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsWeb DesignFlash Development > problem with modifieing Colour_picker


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway