|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
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; }; |
|
#2
|
|||
|
|||
|
Quote:
The decimal values? the hex values? Normal string values? Why not just write by hand? Jorge |
![]() |
| Viewing: Dev Articles Community Forums > Web Design > Flash Development > problem with modifieing Colour_picker |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|