Re: [Flashcoders] ColorPicker.selectedValue to #hex?

2008-07-27 Thread Fumio Nonaka

I am a little late.  But another way to make the script short:

function dec2hex(input:Number):String {
var hex:Number;
// var stgHex:String = uint(input).toString(16);
var stgHex:String = uint(input+0x100).toString(16).substr(1);
/*
while (stgHex.length  6) {
stgHex = 0+stgHex;
}
*/
stgHex = 0x+stgHex;
return stgHex;
}
_
Robert Leisle wrote:

Hi Jason,

Is something like this what you need?

function dec2hex(input):String {
var hex:Number;
var stgHex:String = uint(input).toString(16);
while (stgHex.length  6){
stgHex = 0+stgHex;
}
stgHex = 0x+stgHex;
return stgHex;
}

function hex2dec(input):String {
return String(uint(input));
}

// test run
var decColor:Number = 102;
var hexColor:String = dec2hex(decColor);
trace(hex: +hexColor);
trace(dec: +hex2dec(hexColor));

--
Fumio Nonaka
http://www.FumioNonaka.com/
My bookshttp://www.FumioNonaka.com/Books/index.html
Flash communityhttp://F-site.org/
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Nested MC relative position in AS2 (rotated clip)- localToGlobal?

2008-07-27 Thread ali drongo
Hi there, thanks for checking my post.
I have a rectangular movie clip that is nested inside of another clip. I
want to scale, rotate and reposition the holder clip so that the nested
movieclip is the same size as the stage.

This sounds like quite an easy thing to do but the rotation makes everything
go awry!

If someone could suggest how to code this or point me in the direction of
some advice or tutorials it would make my weekend :)
Thanks guys,
Ali
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] ||= operator

2008-07-27 Thread Adam Jowett

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] ||= operator

2008-07-27 Thread Adam Jowett

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Nested MC relative position in AS2 (rotated clip)- localToGlobal?

2008-07-27 Thread Helmut Granda
is the holder clip the same size as the nested clip? It sounds to me like
the nested clip is rotated and in a awkward position and that is why you are
not getting the results you desire.

On Sun, Jul 27, 2008 at 6:08 AM, ali drongo [EMAIL PROTECTED]wrote:

 Hi there, thanks for checking my post.
 I have a rectangular movie clip that is nested inside of another clip. I
 want to scale, rotate and reposition the holder clip so that the nested
 movieclip is the same size as the stage.

 This sounds like quite an easy thing to do but the rotation makes
 everything
 go awry!

 If someone could suggest how to code this or point me in the direction of
 some advice or tutorials it would make my weekend :)
 Thanks guys,
 Ali
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




-- 
...helmut
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders