Re: [Flashcoders] AS3 Papervision Question

2009-05-01 Thread Glen Pike

Hi,

   You would probably have to roll your own for this:

   You could make up your own 3D object out of planes and assign 
different material to each plane.


   Or render a large bitmap of all your movieclips and use that as a 
material.
  
   Not 100% on this - just a suggestion...


   Glen

Omar Fouad wrote:

No one?

On Sun, Apr 26, 2009 at 8:49 AM, Omar Fouad omarfouad@gmail.com wrote:

  

So there is a way to apply multiple movieClips, or material to a sphere?


On Sun, Apr 26, 2009 at 8:41 AM, Christoffer Enedahl 
christof...@enedahl.com wrote:



That site is not using papervision, it's using prerendered clips, which is
used celeverly with rotation.

I havn't tried using a viewpoint as a material, but I think it should
work, performance might be an issue though.

/Christoffer

Omar Fouad skrev:

  

Hi all,
I am wondering if I can create a 3D object in papervision, as a
movieClip,
and apply it as a material to a Sphere, like, for example some piramids
placed on the Sphere.
Another thing, If I would let each piramid on the sphere to have a
specific
click event, in this case I think that each piramid should be a different
material object, so I can give to each one of them a different click
event.
Is this possible?
I've seen this site http://www.bartleboglehegarty.com/, and I think,
they
did in a way, what I am trying to ask.

Thanks in advance.





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

  


--
Omar M. Fouad - Adobe Flash™ Platform Developer
www.omar-fouad.net
Cellular: (+20) 1011.88.534
Mail: m...@omar-fouad.net

This e-mail and any attachment is for authorised use by the intended
recipient(s) only. It may contain proprietary material, confidential
information and/or be subject to legal privilege. It should not be copied,
disclosed to, retained or used by, any other party. If you are not an
intended recipient then please promptly delete this e-mail and any
attachment and all copies and inform the sender. Thank you.






  


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


Re: [Flashcoders] Batch wrapping a bunch of FLV files in SWFs

2009-05-01 Thread Henry Cooke
Not with any great degree of accuracy though, as far as I know?

2009/4/30 Muzak p.ginnebe...@telenet.be

 You know you can control flv's right?

 - Original Message - From: Henry Cooke 
 aninfinitenumberofmonk...@gmail.com
 To: Flash Coders List flashcoders@chattyfig.figleaf.com
 Sent: Thursday, April 30, 2009 7:23 PM
 Subject: [Flashcoders] Batch wrapping a bunch of FLV files in SWFs



  Anyone know a good way of doing this?
 I've got a big stack of FLVs that I need to wrap up in SWFs so I can
 control
 their timelines properly.

 I'd love it if there was a command line tool like swfmill or  swftools to
 do
 it, but I'm willing to try anything that works ;)

 h.


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

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


[Flashcoders] Dynamically generate blend colors

2009-05-01 Thread natalia Vikhtinskaya
Hi to all
I need dynamically generate blend colors from one color to another.
For example RGB:
1Mc 255  255 255
2?
3?
4?
5?
6?
7 136 114 141
Is there a way to calculate blend colors for 5 steps?
Thanks you for any help or links.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Dynamically generate blend colors

2009-05-01 Thread Glen Pike

Have a look at the Greensock Tween classes - they might help.

natalia Vikhtinskaya wrote:

Hi to all
I need dynamically generate blend colors from one color to another.
For example RGB:
1Mc 255  255 255
2?
3?
4?
5?
6?
7 136 114 141
Is there a way to calculate blend colors for 5 steps?
Thanks you for any help or links.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


  


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


RE: [Flashcoders] E4X question

2009-05-01 Thread Mendelsohn, Michael
Thanks for all the responses!  I ended up adapting this solution, and I got 
tripped up on the fact that parent() is a method!!  Ugh.

- MM




take the XMLList that you have and run a for each loop on it looking for a
match at the name attribute

for each (var element:XML in FloorPlanData.floor){
   if(eleme...@name == thisLabel){
   return element

   }

}


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


Re: [Flashcoders] Dynamically generate blend colors

2009-05-01 Thread natalia Vikhtinskaya
Thank you. Yes this class allows to create gradient. But I need code
that allows to have N  MovieClips with blend colors from one to
another.

2009/5/1 Glen Pike g...@engineeredarts.co.uk:
 Have a look at the Greensock Tween classes - they might help.

 natalia Vikhtinskaya wrote:

 Hi to all
 I need dynamically generate blend colors from one color to another.
 For example RGB:
 1Mc 255  255 255
 2?
 3?
 4?
 5?
 6?
 7 136 114 141
 Is there a way to calculate blend colors for 5 steps?
 Thanks you for any help or links.
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




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


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


[Flashcoders] Tween a matrix transformation

2009-05-01 Thread Mendelsohn, Michael
Hi list...

I'm trying to think of the best way to tween a sprite that's been transformed, 
with all 6 props of its matrix property having been altered.  I use TweenLite a 
lot...should I write 6 lines of code, one for each matrix property? 

Any suggestions for the most optimal way to tween a matrix transform?

Thanks,
- Michael M.

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


Re: [Flashcoders] Tween a matrix transformation

2009-05-01 Thread Hans Wichman
Hi,

there is probably a better way, but one solution is to do: x* state1Matrix +
(x-1)*state2Matrix and tween x over 0..1

greetz
JC

On Fri, May 1, 2009 at 4:31 PM, Mendelsohn, Michael 
michael.mendels...@fmglobal.com wrote:

 Hi list...

 I'm trying to think of the best way to tween a sprite that's been
 transformed, with all 6 props of its matrix property having been altered.  I
 use TweenLite a lot...should I write 6 lines of code, one for each matrix
 property?

 Any suggestions for the most optimal way to tween a matrix transform?

 Thanks,
 - Michael M.

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

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


[Flashcoders] Creating for loops for event listeners

2009-05-01 Thread zurie


Is there a better way to write Event Listeners for a large number of
buttons that increment the names by 1? example:
solution_button1.addEventListener(MouseEvent.MOUSE_DOWN, s_btn1_down);
solution_button2.addEventListener(MouseEvent.MOUSE_DOWN, s_btn2_down);
solution_button3.addEventListener(MouseEvent.MOUSE_DOWN, s_btn3_down);
solution_button4.addEventListener(MouseEvent.MOUSE_DOWN, s_btn4_down);
solution_button5.addEventListener(MouseEvent.MOUSE_DOWN, s_btn5_down);
solution_button6.addEventListener(MouseEvent.MOUSE_DOWN, s_btn6_down);
solution_button7.addEventListener(MouseEvent.MOUSE_DOWN, s_btn7_down);
solution_button8.addEventListener(MouseEvent.MOUSE_DOWN, s_btn8_down);
solution_button9.addEventListener(MouseEvent.MOUSE_DOWN, s_btn9_down); 

 can the above be accomplished with a for loop? what about more than one
event over, out, down, click. can those also be automated or would I need 4
loops for that.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Dynamically generate blend colors

2009-05-01 Thread Hans Wichman
Hi,

mask out the r,g, b and tween them individually.

eg write a class:

RGBTween.getRGB (source, dest, 0..1);

The getRGB should mask out the r,g,b values, calculate the result r,g,b
based on source, dest and a 0..1 factor and combine the parts into a new rgb
value.

It will do the trick, but Im not sure its visually correct.

HTH
JC

On Fri, May 1, 2009 at 2:38 PM, natalia Vikhtinskaya
natavi.m...@gmail.comwrote:

 Thank you. Yes this class allows to create gradient. But I need code
 that allows to have N  MovieClips with blend colors from one to
 another.

 2009/5/1 Glen Pike g...@engineeredarts.co.uk:
   Have a look at the Greensock Tween classes - they might help.
 
  natalia Vikhtinskaya wrote:
 
  Hi to all
  I need dynamically generate blend colors from one color to another.
  For example RGB:
  1Mc 255  255 255
  2?
  3?
  4?
  5?
  6?
  7 136 114 141
  Is there a way to calculate blend colors for 5 steps?
  Thanks you for any help or links.
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 
 
 
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 

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

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


Re: [Flashcoders] Creating for loops for event listeners

2009-05-01 Thread ekameleon
Hello :)
1 - creates a new class to creates your custom buttons and implement the
addEventListeners in this class (in the constructor for example)

2 - use the dynamic loop :

var down:Function = function( e:MouseEvent ):void
{
 trace( e.type +  :  + e.target ) ; // only one method and use the
target of the event to change your strategy
}

var l:Number = 100 ;

for( var i:int ; il ; i++)
{
this[bt+i].addEventListener( MouseEvent.MOUSE_DOWN ,  down ) ; // use
basic name bt1, bt2, ... it's more easy
}

EKA+ :)

2009/5/1 zu...@zadesigns.com



 Is there a better way to write Event Listeners for a large number of
 buttons that increment the names by 1? example:
 solution_button1.addEventListener(MouseEvent.MOUSE_DOWN, s_btn1_down);
 solution_button2.addEventListener(MouseEvent.MOUSE_DOWN, s_btn2_down);
 solution_button3.addEventListener(MouseEvent.MOUSE_DOWN, s_btn3_down);
 solution_button4.addEventListener(MouseEvent.MOUSE_DOWN, s_btn4_down);
 solution_button5.addEventListener(MouseEvent.MOUSE_DOWN, s_btn5_down);
 solution_button6.addEventListener(MouseEvent.MOUSE_DOWN, s_btn6_down);
 solution_button7.addEventListener(MouseEvent.MOUSE_DOWN, s_btn7_down);
 solution_button8.addEventListener(MouseEvent.MOUSE_DOWN, s_btn8_down);
 solution_button9.addEventListener(MouseEvent.MOUSE_DOWN, s_btn9_down);

  can the above be accomplished with a for loop? what about more than one
 event over, out, down, click. can those also be automated or would I need 4
 loops for that.
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


Re: [Flashcoders] Creating for loops for event listeners

2009-05-01 Thread Gregory Boland
Store your buttons in an array

then for loop through the array

If you have instances of them on stage already and are not creating them
dynamically then its a little more work but u could still pass a reference
of each button into the array

greg

On Fri, May 1, 2009 at 12:10 PM, zu...@zadesigns.com wrote:



 Is there a better way to write Event Listeners for a large number of
 buttons that increment the names by 1? example:
 solution_button1.addEventListener(MouseEvent.MOUSE_DOWN, s_btn1_down);
 solution_button2.addEventListener(MouseEvent.MOUSE_DOWN, s_btn2_down);
 solution_button3.addEventListener(MouseEvent.MOUSE_DOWN, s_btn3_down);
 solution_button4.addEventListener(MouseEvent.MOUSE_DOWN, s_btn4_down);
 solution_button5.addEventListener(MouseEvent.MOUSE_DOWN, s_btn5_down);
 solution_button6.addEventListener(MouseEvent.MOUSE_DOWN, s_btn6_down);
 solution_button7.addEventListener(MouseEvent.MOUSE_DOWN, s_btn7_down);
 solution_button8.addEventListener(MouseEvent.MOUSE_DOWN, s_btn8_down);
 solution_button9.addEventListener(MouseEvent.MOUSE_DOWN, s_btn9_down);

  can the above be accomplished with a for loop? what about more than one
 event over, out, down, click. can those also be automated or would I need 4
 loops for that.
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


Re: [Flashcoders] Creating for loops for event listeners

2009-05-01 Thread Hans Wichman
yes you can accomplish that with one loop.

On Fri, May 1, 2009 at 6:10 PM, zu...@zadesigns.com wrote:



 Is there a better way to write Event Listeners for a large number of
 buttons that increment the names by 1? example:
 solution_button1.addEventListener(MouseEvent.MOUSE_DOWN, s_btn1_down);
 solution_button2.addEventListener(MouseEvent.MOUSE_DOWN, s_btn2_down);
 solution_button3.addEventListener(MouseEvent.MOUSE_DOWN, s_btn3_down);
 solution_button4.addEventListener(MouseEvent.MOUSE_DOWN, s_btn4_down);
 solution_button5.addEventListener(MouseEvent.MOUSE_DOWN, s_btn5_down);
 solution_button6.addEventListener(MouseEvent.MOUSE_DOWN, s_btn6_down);
 solution_button7.addEventListener(MouseEvent.MOUSE_DOWN, s_btn7_down);
 solution_button8.addEventListener(MouseEvent.MOUSE_DOWN, s_btn8_down);
 solution_button9.addEventListener(MouseEvent.MOUSE_DOWN, s_btn9_down);

  can the above be accomplished with a for loop? what about more than one
 event over, out, down, click. can those also be automated or would I need 4
 loops for that.
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


[Flashcoders] Window Shade Component for Flex?

2009-05-01 Thread Charles Parcell
Anyone know of a component that does a simple window shade?

Window Shade
One line of title text that when clicked, reveals a block of content under
the title text.

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


RE: [Flashcoders] Tween a matrix transformation

2009-05-01 Thread Jack Doyle
You could do this:

var matrix:Matrix = mc.transform.matrix;

TweenLite.to(matrix, 1, {a:1.5, b:0.2, c:0.2, d:1.5, tx:100, ty:100,
onUpdate:applyMatrix, onUpdateParams:[mc, matrix]});

function applyMatrix($mc:DisplayObject, $matrix:Matrix):void {
$mc.transform.matrix = $matrix; //for changes in the matrix to take
effect, it must be re-applied.
}

Jack

-Original Message-
From: Mendelsohn, Michael [mailto:michael.mendels...@fmglobal.com] 
Sent: Friday, May 01, 2009 9:31 AM
To: Flash Coders List
Subject: [Flashcoders] Tween a matrix transformation

Hi list...

I'm trying to think of the best way to tween a sprite that's been
transformed, with all 6 props of its matrix property having been altered.  I
use TweenLite a lot...should I write 6 lines of code, one for each matrix
property? 

Any suggestions for the most optimal way to tween a matrix transform?

Thanks,
- Michael M.




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


Re: [Flashcoders] Dynamically generate blend colors

2009-05-01 Thread natalia Vikhtinskaya
I am sorry. I did not understand your advice. I am working with AS2.

2009/5/1 Hans Wichman j.c.wich...@objectpainters.com:
 Hi,

 mask out the r,g, b and tween them individually.

 eg write a class:

 RGBTween.getRGB (source, dest, 0..1);

 The getRGB should mask out the r,g,b values, calculate the result r,g,b
 based on source, dest and a 0..1 factor and combine the parts into a new rgb
 value.

 It will do the trick, but Im not sure its visually correct.

 HTH
 JC

 On Fri, May 1, 2009 at 2:38 PM, natalia Vikhtinskaya
 natavi.m...@gmail.comwrote:

 Thank you. Yes this class allows to create gradient. But I need code
 that allows to have N  MovieClips with blend colors from one to
 another.

 2009/5/1 Glen Pike g...@engineeredarts.co.uk:
   Have a look at the Greensock Tween classes - they might help.
 
  natalia Vikhtinskaya wrote:
 
  Hi to all
  I need dynamically generate blend colors from one color to another.
  For example RGB:
  1Mc 255  255 255
  2?
  3?
  4?
  5?
  6?
  7 136 114 141
  Is there a way to calculate blend colors for 5 steps?
  Thanks you for any help or links.
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 
 
 
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 

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

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


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


Re: [Flashcoders] Tween a matrix transformation

2009-05-01 Thread Joel Stransky

As with everything else you beat me to it Jack. Congrats on v11!

--Joel

On May 1, 2009, at 10:04 AM, Jack Doyle j...@greensock.com wrote:


You could do this:

var matrix:Matrix = mc.transform.matrix;

TweenLite.to(matrix, 1, {a:1.5, b:0.2, c:0.2, d:1.5, tx:100, ty:100,
onUpdate:applyMatrix, onUpdateParams:[mc, matrix]});

function applyMatrix($mc:DisplayObject, $matrix:Matrix):void {
   $mc.transform.matrix = $matrix; //for changes in the matrix to take
effect, it must be re-applied.
}

Jack

-Original Message-
From: Mendelsohn, Michael [mailto:michael.mendels...@fmglobal.com]
Sent: Friday, May 01, 2009 9:31 AM
To: Flash Coders List
Subject: [Flashcoders] Tween a matrix transformation

Hi list...

I'm trying to think of the best way to tween a sprite that's been
transformed, with all 6 props of its matrix property having been  
altered.  I
use TweenLite a lot...should I write 6 lines of code, one for each  
matrix

property?

Any suggestions for the most optimal way to tween a matrix transform?

Thanks,
- Michael M.




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

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


RE: [Flashcoders] Tween a matrix transformation

2009-05-01 Thread Mendelsohn, Michael
Wow, straight from the source!
Cheers Jack!

- MM


 You could do this:

 var matrix:Matrix = mc.transform.matrix;

 TweenLite.to(matrix, 1, {a:1.5, b:0.2, c:0.2, d:1.5, tx:100, ty:100,
 onUpdate:applyMatrix, onUpdateParams:[mc, matrix]});

 function applyMatrix($mc:DisplayObject, $matrix:Matrix):void {
$mc.transform.matrix = $matrix; //for changes in the matrix to take
 effect, it must be re-applied.
 }

 Jack


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


RE: [Flashcoders] Dynamically generate blend colors

2009-05-01 Thread Jack Doyle
Here's a function that you can feed a start hex color, end hex color, and
however many steps you want, and it'll generate an Array with hex values for
that many steps:

--

function getHexSteps($start:uint, $end:uint, $steps:uint):Array {
var startVals:Object = {r:$start  16, g:($start  8)  0xff,
b:$start  0xff};
var changeVals:Object = {r:($end  16) - startVals.r, g:(($end 
8)  0xff) - startVals.g, b:($end  0xff) - startVals.b};
var hexSteps:Array = [];
var spacing:Number = 1 / ($steps - 1);
var changeFactor:Number;
for (var i:int = 0; i  $steps; i++) {
changeFactor = i * spacing;
hexSteps[i] = ((startVals.r + (changeFactor * changeVals.r))
 16 | (startVals.g + (changeFactor * changeVals.g))  8 | (startVals.b +
(changeFactor * changeVals.b)));
}
return hexSteps;
}

--

For example, getHexSteps(0xFF, 0xFF, 8) would return an Array that
has 8 steps total, going from red to blue:
[0xff, 0xda0024, 0xb60048, 0x91006d, 0x6d0091, 0x4800b6, 0x2400da,
0xFF]

So a simple use case that builds 30-pixel blocks across the stage, one for
each step would look like:

var colors:Array = getHexSteps(0xFF, 0xFF, 8);
var s:Sprite;
for (var i:int = 0; i  colors.length; i++) {
s = new Sprite();
s.graphics.beginFill(colors[i], 1);
s.graphics.drawRect(0, 0, 30, 30);
s.graphics.endFill();
addChild(s);
s.x = i * s.width;
}

Hope that helps.

Jack


-Original Message-
From: natalia Vikhtinskaya [mailto:natavi.m...@gmail.com] 
Sent: Friday, May 01, 2009 7:38 AM
To: Flash Coders List
Subject: Re: [Flashcoders] Dynamically generate blend colors

Thank you. Yes this class allows to create gradient. But I need code
that allows to have N  MovieClips with blend colors from one to
another.

2009/5/1 Glen Pike g...@engineeredarts.co.uk:
 Have a look at the Greensock Tween classes - they might help.

 natalia Vikhtinskaya wrote:

 Hi to all
 I need dynamically generate blend colors from one color to another.
 For example RGB:
 1Mc 255  255 255
 2?
 3?
 4?
 5?
 6?
 7 136 114 141
 Is there a way to calculate blend colors for 5 steps?
 Thanks you for any help or links.
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




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






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


Re: [Flashcoders] Dynamically generate blend colors

2009-05-01 Thread natalia Vikhtinskaya
Thank you so much!!! That is exactly what I am looking: changeFactor.

2009/5/1 Jack Doyle j...@greensock.com:
 Here's a function that you can feed a start hex color, end hex color, and
 however many steps you want, and it'll generate an Array with hex values for
 that many steps:

 --

 function getHexSteps($start:uint, $end:uint, $steps:uint):Array {
        var startVals:Object = {r:$start  16, g:($start  8)  0xff,
 b:$start  0xff};
        var changeVals:Object = {r:($end  16) - startVals.r, g:(($end 
 8)  0xff) - startVals.g, b:($end  0xff) - startVals.b};
        var hexSteps:Array = [];
        var spacing:Number = 1 / ($steps - 1);
        var changeFactor:Number;
        for (var i:int = 0; i  $steps; i++) {
                changeFactor = i * spacing;
                hexSteps[i] = ((startVals.r + (changeFactor * changeVals.r))
  16 | (startVals.g + (changeFactor * changeVals.g))  8 | (startVals.b +
 (changeFactor * changeVals.b)));
        }
        return hexSteps;
 }

 --

 For example, getHexSteps(0xFF, 0xFF, 8) would return an Array that
 has 8 steps total, going from red to blue:
 [0xff, 0xda0024, 0xb60048, 0x91006d, 0x6d0091, 0x4800b6, 0x2400da,
 0xFF]

 So a simple use case that builds 30-pixel blocks across the stage, one for
 each step would look like:

 var colors:Array = getHexSteps(0xFF, 0xFF, 8);
 var s:Sprite;
 for (var i:int = 0; i  colors.length; i++) {
        s = new Sprite();
        s.graphics.beginFill(colors[i], 1);
        s.graphics.drawRect(0, 0, 30, 30);
        s.graphics.endFill();
        addChild(s);
        s.x = i * s.width;
 }

 Hope that helps.

 Jack


 -Original Message-
 From: natalia Vikhtinskaya [mailto:natavi.m...@gmail.com]
 Sent: Friday, May 01, 2009 7:38 AM
 To: Flash Coders List
 Subject: Re: [Flashcoders] Dynamically generate blend colors

 Thank you. Yes this class allows to create gradient. But I need code
 that allows to have N  MovieClips with blend colors from one to
 another.

 2009/5/1 Glen Pike g...@engineeredarts.co.uk:
 Have a look at the Greensock Tween classes - they might help.

 natalia Vikhtinskaya wrote:

 Hi to all
 I need dynamically generate blend colors from one color to another.
 For example RGB:
 1Mc 255  255 255
 2?
 3?
 4?
 5?
 6?
 7 136 114 141
 Is there a way to calculate blend colors for 5 steps?
 Thanks you for any help or links.
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




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






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


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


Re: [Flashcoders] Batch wrapping a bunch of FLV files in SWFs

2009-05-01 Thread Peter B
The accuracy is pretty much dependant on the density of keyframes in
your FLV, as you can only seek to a timecode with a keyframe. This
though is absolutely accurate.

If your FLVs are of any lenght, and if they have audio, you are likely
to run into difficulties wrapping them in a SWF.

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


Re: [Flashcoders] Batch wrapping a bunch of FLV files in SWFs

2009-05-01 Thread Karl DeSaulniers
I have had good luck with making markers in my video that I transfer  
to my FLV and control via actionscript.
I could never get my audio and video to match well when I stuffed  
them in a swf separately before I learned to use FLVs.

In AS2 mind you.
TMH

Karl DeSaulniers
Design Drumm
http://designdrumm.com

On May 1, 2009, at 5:44 PM, Peter B wrote:


The accuracy is pretty much dependant on the density of keyframes in
your FLV, as you can only seek to a timecode with a keyframe. This
though is absolutely accurate.

If your FLVs are of any lenght, and if they have audio, you are likely
to run into difficulties wrapping them in a SWF.

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


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


[Flashcoders] Nested 3D transforms conflicting with interactivity

2009-05-01 Thread Ashim D'Silva
Hi All,

I'm having a bit of a problem with nested transforms and interactivity.

I have a parent sprite that has 9 children sprites, and the children
have listeners for roll over/out.

Transforming/animating the parent seems to be absolutely fine; it
rotates fine and the children act as expected.
However, when I individually animate the children or even just change
a 3D property) the children start flickering, firing over and out
events repeatedly while the mouse is moving. I then tried setting the
transform.matrix3D to null after the animation finishing - and
resetting the positions - and this seems to help to some extent. It
works fine right upto about 1000px from the left of the stage.
Everything to the right of this point has the same old problem.

I've seen some really interactive flash3d stuff (although that's
possibly papervision) that work fine. I'm just not sure where the
problem is and need some help.

Tried looking around for info, but maybe I just failed at google. Help
is much appreciated either way.

Cheers,

Ashim
The Random Lines
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Does anyone know if a Flash Map api exists from microsoft?

2009-05-01 Thread Carl Welch
I'm working on a project for a client that insists that there is a Map  
API from Microsoft for Flash. I haven't been able to find anything  
with a google search. Can anyone confirm that such a thing actually  
exists? I've only been able to find an AJAX solution form msn maps


Thanks.
--
Carl Welch
http://www.carlwelch.com
http://blog.jointjam.com
carlwelchdes...@gmail.com
805.403.4819





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


[Flashcoders] Dynamic Images and the Library

2009-05-01 Thread Karl DeSaulniers

Hello all,
Is there a way to get a dynamically loaded image to be inserted into  
the library of the SWF?
For instance. I have an upload form that creates a preview image of  
what is being uploaded.
I want the preview that is created of the image to be the thumbnail  
of the image once displayed in a list of images later down the road.
My thoughts are to place the dynamically loaded image into the  
library somehow so its always available.
This may not be the best way of doing this, so any suggestions are  
welcome.

Thanks,


Karl DeSaulniers
Design Drumm
http://designdrumm.com

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