Re: [Flashcoders] Fitting squares into an area

2006-05-09 Thread Mick G

Handy TILE component...
http://chq.emehmedovic.com/?id=2



On 5/9/06, Bernard Poulin [EMAIL PROTECTED] wrote:


Wow!
I just tried your algorithm with my previous example numbers and it does
output the correct square size (100) - also, internally it has the right
number of columns/lines: e.g. 3x4 (p=3, q=4)  As for performance, it took
6
iterations: Since the output was 3x4, the number of iterations was (3 + 4
-
1) = 6. (it started at 1x1 and did 6 iterations: something like:  1x1,
1x2,
2x2, 2x3, 3x3, 3x4)

For N = 100, the number of iteration depends on the ratio: it could be
anywhere from 19 (10x10-1) to 100 iterations (worst case happens if the
output is a single line or a single column).  So that would make N
iterations (in worst cases) and ~2*SQRT(N)-1 best case.

I took the liberty of optimizing the method a little bit and renaming a
few
internal variables to my personal liking. ;-)  -- I did not do any real
life testing on this. But it seems to work on paper.

/**
* computes the largest N square size (and layout) that can fit an area
(width,height).
*
* @return an Object containing 'squareSize' and the number of 'cols' and
'rows'.
*
* 98% of the credits goes to Danny Kodicek
*/
function computeLargestSquareSizeAndLayout(width:Number, height:Number,
Nsquares:Number): Object
{
   var cols:Number = 1;
   var rows:Number = 1;
   var swidth:Number = width;
   var sheight:Number = height;
   var next_swidth:Number = width/(cols+1);
   var next_sheight:Number = height/(rows+1);
   while (true)
   {
if (cols*rows = Nsquares)
{
var squareSize:Number = Math.min(swidth, sheight);
return { squareSize:squareSize, cols:cols, rows:rows };
}

if (next_swidth  next_sheight)
{
cols++;
swidth = next_swidth;
next_swidth = width/(cols+1);
}
else
{
rows++;
sheight = next_sheight;
next_sheight = height/(rows+1);
   }
}
}


B.

2006/5/8, Danny Kodicek [EMAIL PROTECTED]:

 Danny:  I do not understand your algorithm - could you shed some more
 (high-level) light on what it is doing?

 Sure. The idea is that the optimal size will always be an exact fraction
 of
 either the width or the height. So what we do is drop down by multiples
of
 these until we get to the first size that will contain N or more
squares.
 At
 any particular width, we keep track of the two 'next-smallest' widths
and
 drop down to the largest of these. Run through the algorithm with a few
 sample numbers and it should make sense.

 It may be that there's a more algebraic approach. The problem is,
though,
 that there is no simple relationship between floor(x), floor(y) and
 floor(xy), which would be needed to come up with any truly useful
 solution.
 In the end, it turns into quite a complex optimisation problem, and
given
 that the brute force algorithm is actually pretty fast, it hardly seems
 worth the effort :)

 Danny

 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Fitting squares into an area

2006-05-09 Thread Danny Kodicek

For N = 100, the number of iteration depends on the ratio: it could be

anywhere from 19 (10x10-1) to 100 iterations (worst case happens if the
output is a single line or a single column).  So that would make N
iterations (in worst cases) and ~2*SQRT(N)-1 best case.

It occurs to me that these cases could be cleared up with a fairly small 
revision to the algorithm: when calculating initial values of rows and cols, 
take into account the ratio: (using your code)


if (widthheight) {
   var cols:Number = 1;
   var rows:Number = Math.floor(height/width)
} else {
   var rows:Number = 1;
   var cols:Number = Math.floor(width/height)
}

Danny 


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Fitting squares into an area

2006-05-09 Thread Mick G

Sorry wrong link, I'm sure there is a component on the site somewhere that
does what you need (I think) ;)

On 5/9/06, Mick G [EMAIL PROTECTED] wrote:


Handy TILE component...
http://chq.emehmedovic.com/?id=2




On 5/9/06, Bernard Poulin  [EMAIL PROTECTED] wrote:

 Wow!
 I just tried your algorithm with my previous example numbers and it does

 output the correct square size (100) - also, internally it has the right
 number of columns/lines: e.g. 3x4 (p=3, q=4)  As for performance, it
 took 6
 iterations: Since the output was 3x4, the number of iterations was (3 +
 4 -
 1) = 6. (it started at 1x1 and did 6 iterations: something like:  1x1,
 1x2,
 2x2, 2x3, 3x3, 3x4)

 For N = 100, the number of iteration depends on the ratio: it could be
 anywhere from 19 (10x10-1) to 100 iterations (worst case happens if the
 output is a single line or a single column).  So that would make N
 iterations (in worst cases) and ~2*SQRT(N)-1 best case.

 I took the liberty of optimizing the method a little bit and renaming a
 few
 internal variables to my personal liking. ;-)  -- I did not do any real

 life testing on this. But it seems to work on paper.

 /**
 * computes the largest N square size (and layout) that can fit an area
 (width,height).
 *
 * @return an Object containing 'squareSize' and the number of 'cols' and

 'rows'.
 *
 * 98% of the credits goes to Danny Kodicek
 */
 function computeLargestSquareSizeAndLayout(width:Number, height:Number,
 Nsquares:Number): Object
 {
var cols:Number = 1;
var rows:Number = 1;
var swidth:Number = width;
var sheight:Number = height;
var next_swidth:Number = width/(cols+1);
var next_sheight:Number = height/(rows+1);
while (true)
{
 if (cols*rows = Nsquares)
 {
 var squareSize:Number = Math.min(swidth, sheight);
 return { squareSize:squareSize, cols:cols, rows:rows };
 }

 if (next_swidth  next_sheight)
 {
 cols++;
 swidth = next_swidth;
 next_swidth = width/(cols+1);
 }
 else
 {
 rows++;
 sheight = next_sheight;
 next_sheight = height/(rows+1);
}
 }
 }


 B.

 2006/5/8, Danny Kodicek [EMAIL PROTECTED]:
 
  Danny:  I do not understand your algorithm - could you shed some more

  (high-level) light on what it is doing?
 
  Sure. The idea is that the optimal size will always be an exact
 fraction
  of
  either the width or the height. So what we do is drop down by
 multiples of
  these until we get to the first size that will contain N or more
 squares.
  At
  any particular width, we keep track of the two 'next-smallest' widths
 and
  drop down to the largest of these. Run through the algorithm with a
 few
  sample numbers and it should make sense.
 
  It may be that there's a more algebraic approach. The problem is,
 though,
  that there is no simple relationship between floor(x), floor(y) and
  floor(xy), which would be needed to come up with any truly useful
  solution.
  In the end, it turns into quite a complex optimisation problem, and
 given
  that the brute force algorithm is actually pretty fast, it hardly
 seems
  worth the effort :)
 
  Danny
 
  ___
  Flashcoders@chattyfig.figleaf.com
  To change your subscription options or search the archive:
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
  Brought to you by Fig Leaf Software
  Premier Authorized Adobe Consulting and Training
  http://www.figleaf.com
  http://training.figleaf.com
 
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com




___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Fitting squares into an area

2006-05-09 Thread Mike Mountain
This is great stuff! Thanks guys, I've been going round in circles with
this for quite a while.

M 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf 
 Of Danny Kodicek
 Sent: 09 May 2006 08:54
 To: Flashcoders mailing list
 Subject: Re: [Flashcoders] Fitting squares into an area
 
 For N = 100, the number of iteration depends on the ratio: 
 it could be
 anywhere from 19 (10x10-1) to 100 iterations (worst case 
 happens if the output is a single line or a single column).  
 So that would make N iterations (in worst cases) and 
 ~2*SQRT(N)-1 best case.
 
 It occurs to me that these cases could be cleared up with a 
 fairly small revision to the algorithm: when calculating 
 initial values of rows and cols, take into account the ratio: 
 (using your code)
 
 if (widthheight) {
 var cols:Number = 1;
 var rows:Number = Math.floor(height/width) } else {
 var rows:Number = 1;
 var cols:Number = Math.floor(width/height) }
 
 Danny 
 
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training 
 http://www.figleaf.com http://training.figleaf.com
 
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] LocalSharedObject.flush pending: suppress dialog box

2006-05-09 Thread Jan Oosterhuis
When a localSharedObject.flush() returns 'pending', an apparently  
inevitable dialog box pops up (asking the user to increase the amount  
of available disk space).

I would like to prevent this box to appear.
This way I could show the user some additional information (and a  
button to call System.showSettings(1)).

So my question is: how can I prevent this dialog box to appear?

regards,

Jan Oosterhuis
Faculty of Behavioral Sciences
University of Twente, Enschede, The Netherlands
E-mail: [EMAIL PROTECTED]


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Fitting squares into an area

2006-05-09 Thread Mike Mountain
One last addition:

[as]
/**
 * computes the largest N square size (and layout) that can fit an area
(width,height).
 *
 * @return an Object containing 'squareSize' and the number of 'cols'
and 'rows' 
 * and a layout array for drawing the squares on screen.
 *
 * 96% of the credits goes to Danny Kodicek, 3% to Bernard Poulin ;)
*/
function computeLargestSquareSizeAndLayout(width:Number, height:Number,
Nsquares:Number):Object {
if (widthheight) {
var cols:Number = 1;
var rows:Number = Math.floor(height/width);
} else {
var rows:Number = 1;
var cols:Number = Math.floor(width/height);
}
//var cols:Number = 1;
//var rows:Number = 1;
var swidth:Number = width;
var sheight:Number = height;
var next_swidth:Number = width/(cols+1);
var next_sheight:Number = height/(rows+1);
while (true) {
if (cols*rows=Nsquares) {
var squareSize:Number = Math.min(swidth,
sheight);
var posArray = [];
var count = 0;
for (var j = 0; jrows; j++) {
count++;
ypos = j*squareSize;
for (var k = 0; kcols; k++) {
xpos = k*squareSize;
if (countNsquares) {
posArray.push({x:xpos,
y:ypos});
}
}
}
return {squareSize:squareSize, cols:cols,
rows:rows, number:Nsquares, layout:posArray};
}
if (next_swidthnext_sheight) {
cols++;
swidth = next_swidth;
next_swidth = width/(cols+1);
} else {
rows++;
sheight = next_sheight;
next_sheight = height/(rows+1);
}
}
}
drawLayout = computeLargestSquareSizeAndLayout(500, 460, 10);
[/as]
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Fitting squares into an area

2006-05-09 Thread Mike Mountain
Eeesh silly mistake:

[as]
/**
 * computes the largest N square size (and layout) that can fit an area
(width,height).
 *
 * @return an Object containing 'squareSize' and the number of 'cols'
and 'rows' 
 * and a layout array for drawing the squares on screen.
 *
 * 96% of the credits goes to Danny Kodicek, 3% to Bernard Poulin ;) */
function computeLargestSquareSizeAndLayout(width:Number, height:Number,
Nsquares:Number):Object {
if (widthheight) {
var cols:Number = 1;
var rows:Number = Math.floor(height/width);
} else {
var rows:Number = 1;
var cols:Number = Math.floor(width/height);
}
//var cols:Number = 1;
//var rows:Number = 1;
var swidth:Number = width;
var sheight:Number = height;
var next_swidth:Number = width/(cols+1);
var next_sheight:Number = height/(rows+1);
while (true) {
if (cols*rows=Nsquares) {
var squareSize:Number = Math.min(swidth,
sheight);
var posArray = [];
var count = 0;
for (var j = 0; jrows; j++) {

ypos = j*squareSize;
for (var k = 0; kcols; k++) {
xpos = k*squareSize;
if (countNsquares) {
posArray.push({x:xpos,
y:ypos});
count++;
}
}
}
return {squareSize:squareSize, cols:cols,
rows:rows, number:Nsquares, layout:posArray};
}
if (next_swidthnext_sheight) {
cols++;
swidth = next_swidth;
next_swidth = width/(cols+1);
} else {
rows++;
sheight = next_sheight;
next_sheight = height/(rows+1);
}
}
} 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf 
 Of Mike Mountain
 Sent: 09 May 2006 10:41
 To: Flashcoders mailing list
 Subject: RE: [Flashcoders] Fitting squares into an area
 
 One last addition:
 
 [as]
 /**
  * computes the largest N square size (and layout) that can 
 fit an area (width,height).
  *
  * @return an Object containing 'squareSize' and the number of 'cols'
 and 'rows' 
  * and a layout array for drawing the squares on screen.
  *
  * 96% of the credits goes to Danny Kodicek, 3% to Bernard 
 Poulin ;) */ function 
 computeLargestSquareSizeAndLayout(width:Number, 
 height:Number, Nsquares:Number):Object {
   if (widthheight) {
   var cols:Number = 1;
   var rows:Number = Math.floor(height/width);
   } else {
   var rows:Number = 1;
   var cols:Number = Math.floor(width/height);
   }
   //var cols:Number = 1;
   //var rows:Number = 1;
   var swidth:Number = width;
   var sheight:Number = height;
   var next_swidth:Number = width/(cols+1);
   var next_sheight:Number = height/(rows+1);
   while (true) {
   if (cols*rows=Nsquares) {
   var squareSize:Number = 
 Math.min(swidth, sheight);
   var posArray = [];
   var count = 0;
   for (var j = 0; jrows; j++) {
   count++;
   ypos = j*squareSize;
   for (var k = 0; kcols; k++) {
   xpos = k*squareSize;
   if (countNsquares) {
   posArray.push({x:xpos,
 y:ypos});
   }
   }
   }
   return {squareSize:squareSize, 
 cols:cols, rows:rows, number:Nsquares, layout:posArray};
   }
   if (next_swidthnext_sheight) {
   cols++;
   swidth = next_swidth;
   next_swidth = width/(cols+1);
   } else {
   rows++;
   sheight = next_sheight;
   next_sheight = height/(rows+1);
   }
   }
 }
 drawLayout = computeLargestSquareSizeAndLayout(500, 460, 10); 
 [/as] ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training 
 http://www.figleaf.com http://training.figleaf.com
 
___

RE: [Flashcoders] Fitting squares into an area

2006-05-09 Thread Mike Mountain
OK this is cool, create an MC in the library 100px  w  h, linkage
square, create a smaller different colour square inside it just so you
can see what's going on - Then run this:

[as]
/**
 * computes the largest N square size (and layout) that can fit an area
(width,height).
 *
 * @return an Object containing 'squareSize' and the number of 'cols'
and 'rows' and a layout array for drawing the squares on screen.
 *
 * 97% of the credits goes to Danny Kodicek  */
function computeLargestSquareSizeAndLayout(width:Number, height:Number,
Nsquares:Number):Object {
if (widthheight) {
var cols:Number = 1;
var rows:Number = Math.floor(height/width);
} else {
var rows:Number = 1;
var cols:Number = Math.floor(width/height);
}
//var cols:Number = 1;
//var rows:Number = 1;
var swidth:Number = width;
var sheight:Number = height;
var next_swidth:Number = width/(cols+1);
var next_sheight:Number = height/(rows+1);
while (true) {
if (cols*rows=Nsquares) {
var squareSize:Number = Math.min(swidth,
sheight);
var posArray = [];
var count = 0;
for (var j = 0; jrows; j++) {
ypos = j*squareSize;
for (var k = 0; kcols; k++) {
xpos = k*squareSize;
if (countNsquares) {
posArray.push({x:xpos,
y:ypos});
count++;
}
}
}
return {squareSize:squareSize, cols:cols,
rows:rows, number:Nsquares, layout:posArray};
}
if (next_swidthnext_sheight) {
cols++;
swidth = next_swidth;
next_swidth = width/(cols+1);
} else {
rows++;
sheight = next_sheight;
next_sheight = height/(rows+1);
}
}
}
function drawLayout(lobj) {
var holder = this.createEmptyMovieClip(holder, 1);
var squareSize = lobj.squareSize;
var cols = lobj.cols;
var rows = lobj.rows;
var number = lobj.number;
var layout = lobj.layout;
for (var j = 0; jnumber; j++) {
var sqr = holder.attachMovie(square, square+j, j+1);
sqr._x = layout[j].x;
sqr._y = layout[j].y;
sqr._xscale = sqr._yscale=squareSize;
}
}
n=0
onEnterFrame=function(){
drawLayout(computeLargestSquareSizeAndLayout(400, 400, n++));
}
[/as]


Nice!
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Fitting squares into an area

2006-05-09 Thread Mike Mountain
Hmmm it has problems - try 8 at 640x480 

M


 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf 
 Of Mike Mountain
 Sent: 09 May 2006 11:11
 To: Flashcoders mailing list
 Subject: RE: [Flashcoders] Fitting squares into an area
 
 OK this is cool, create an MC in the library 100px  w  h, 
 linkage square, create a smaller different colour square 
 inside it just so you can see what's going on - Then run this:
 
 [as]
 /**
  * computes the largest N square size (and layout) that can 
 fit an area (width,height).
  *
  * @return an Object containing 'squareSize' and the number of 'cols'
 and 'rows' and a layout array for drawing the squares on screen.
  *
  * 97% of the credits goes to Danny Kodicek  */ function 
 computeLargestSquareSizeAndLayout(width:Number, 
 height:Number, Nsquares:Number):Object {
   if (widthheight) {
   var cols:Number = 1;
   var rows:Number = Math.floor(height/width);
   } else {
   var rows:Number = 1;
   var cols:Number = Math.floor(width/height);
   }
   //var cols:Number = 1;
   //var rows:Number = 1;
   var swidth:Number = width;
   var sheight:Number = height;
   var next_swidth:Number = width/(cols+1);
   var next_sheight:Number = height/(rows+1);
   while (true) {
   if (cols*rows=Nsquares) {
   var squareSize:Number = 
 Math.min(swidth, sheight);
   var posArray = [];
   var count = 0;
   for (var j = 0; jrows; j++) {
   ypos = j*squareSize;
   for (var k = 0; kcols; k++) {
   xpos = k*squareSize;
   if (countNsquares) {
   posArray.push({x:xpos,
 y:ypos});
   count++;
   }
   }
   }
   return {squareSize:squareSize, 
 cols:cols, rows:rows, number:Nsquares, layout:posArray};
   }
   if (next_swidthnext_sheight) {
   cols++;
   swidth = next_swidth;
   next_swidth = width/(cols+1);
   } else {
   rows++;
   sheight = next_sheight;
   next_sheight = height/(rows+1);
   }
   }
 }
 function drawLayout(lobj) {
   var holder = this.createEmptyMovieClip(holder, 1);
   var squareSize = lobj.squareSize;
   var cols = lobj.cols;
   var rows = lobj.rows;
   var number = lobj.number;
   var layout = lobj.layout;
   for (var j = 0; jnumber; j++) {
   var sqr = holder.attachMovie(square, square+j, j+1);
   sqr._x = layout[j].x;
   sqr._y = layout[j].y;
   sqr._xscale = sqr._yscale=squareSize;
   }
 }
 n=0
 onEnterFrame=function(){
 drawLayout(computeLargestSquareSizeAndLayout(400, 400, n++)); } [/as]
 
 
 Nice!
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training 
 http://www.figleaf.com http://training.figleaf.com
 
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Fitting squares into an area

2006-05-09 Thread Danny Kodicek

Hmmm it has problems - try 8 at 640x480


Works for me. Would you have expected it to make a 4 x 2 array instead of 
3x3? The square size is 160 in either case, so I guess it's a matter of 
chance which one it discovers. If you want to look for a 'neatest' case, 
that's going to involve more complex calculations


Danny



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf
Of Mike Mountain
Sent: 09 May 2006 11:11
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Fitting squares into an area

OK this is cool, create an MC in the library 100px  w  h,
linkage square, create a smaller different colour square
inside it just so you can see what's going on - Then run this:

[as]
/**
 * computes the largest N square size (and layout) that can
fit an area (width,height).
 *
 * @return an Object containing 'squareSize' and the number of 'cols'
and 'rows' and a layout array for drawing the squares on screen.
 *
 * 97% of the credits goes to Danny Kodicek  */ function
computeLargestSquareSizeAndLayout(width:Number,
height:Number, Nsquares:Number):Object {
if (widthheight) {
var cols:Number = 1;
var rows:Number = Math.floor(height/width);
} else {
var rows:Number = 1;
var cols:Number = Math.floor(width/height);
}
//var cols:Number = 1;
//var rows:Number = 1;
var swidth:Number = width;
var sheight:Number = height;
var next_swidth:Number = width/(cols+1);
var next_sheight:Number = height/(rows+1);
while (true) {
if (cols*rows=Nsquares) {
var squareSize:Number =
Math.min(swidth, sheight);
var posArray = [];
var count = 0;
for (var j = 0; jrows; j++) {
ypos = j*squareSize;
for (var k = 0; kcols; k++) {
xpos = k*squareSize;
if (countNsquares) {
posArray.push({x:xpos,
y:ypos});
count++;
}
}
}
return {squareSize:squareSize,
cols:cols, rows:rows, number:Nsquares, layout:posArray};
}
if (next_swidthnext_sheight) {
cols++;
swidth = next_swidth;
next_swidth = width/(cols+1);
} else {
rows++;
sheight = next_sheight;
next_sheight = height/(rows+1);
}
}
}
function drawLayout(lobj) {
var holder = this.createEmptyMovieClip(holder, 1);
var squareSize = lobj.squareSize;
var cols = lobj.cols;
var rows = lobj.rows;
var number = lobj.number;
var layout = lobj.layout;
for (var j = 0; jnumber; j++) {
var sqr = holder.attachMovie(square, square+j, j+1);
sqr._x = layout[j].x;
sqr._y = layout[j].y;
sqr._xscale = sqr._yscale=squareSize;
}
}
n=0
onEnterFrame=function(){
drawLayout(computeLargestSquareSizeAndLayout(400, 400, n++)); } [/as]


Nice!
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com 


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Fitting squares into an area

2006-05-09 Thread Danny Kodicek

Not that complex, it turns out...

Change the line 
if (next_swidthnext_sheight) {
to 
if (next_swidth=next_sheight) {


Better? :)

Danny

- Original Message - 
From: Mike Mountain [EMAIL PROTECTED]

To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Tuesday, May 09, 2006 11:21 AM
Subject: RE: [Flashcoders] Fitting squares into an area


Hmmm it has problems - try 8 at 640x480 


M



-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf 
Of Mike Mountain

Sent: 09 May 2006 11:11
To: Flashcoders mailing list
Subject: RE: [Flashcoders] Fitting squares into an area

OK this is cool, create an MC in the library 100px  w  h, 
linkage square, create a smaller different colour square 
inside it just so you can see what's going on - Then run this:


[as]
/**
 * computes the largest N square size (and layout) that can 
fit an area (width,height).

 *
 * @return an Object containing 'squareSize' and the number of 'cols'
and 'rows' and a layout array for drawing the squares on screen.
 *
 * 97% of the credits goes to Danny Kodicek  */ function 
computeLargestSquareSizeAndLayout(width:Number, 
height:Number, Nsquares:Number):Object {

if (widthheight) {
var cols:Number = 1;
var rows:Number = Math.floor(height/width);
} else {
var rows:Number = 1;
var cols:Number = Math.floor(width/height);
}
//var cols:Number = 1;
//var rows:Number = 1;
var swidth:Number = width;
var sheight:Number = height;
var next_swidth:Number = width/(cols+1);
var next_sheight:Number = height/(rows+1);
while (true) {
if (cols*rows=Nsquares) {
var squareSize:Number = 
Math.min(swidth, sheight);

var posArray = [];
var count = 0;
for (var j = 0; jrows; j++) {
ypos = j*squareSize;
for (var k = 0; kcols; k++) {
xpos = k*squareSize;
if (countNsquares) {
posArray.push({x:xpos,
y:ypos});
count++;
}
}
}
return {squareSize:squareSize, 
cols:cols, rows:rows, number:Nsquares, layout:posArray};

}
if (next_swidthnext_sheight) {
cols++;
swidth = next_swidth;
next_swidth = width/(cols+1);
} else {
rows++;
sheight = next_sheight;
next_sheight = height/(rows+1);
}
}
}
function drawLayout(lobj) {
var holder = this.createEmptyMovieClip(holder, 1);
var squareSize = lobj.squareSize;
var cols = lobj.cols;
var rows = lobj.rows;
var number = lobj.number;
var layout = lobj.layout;
for (var j = 0; jnumber; j++) {
var sqr = holder.attachMovie(square, square+j, j+1);
sqr._x = layout[j].x;
sqr._y = layout[j].y;
sqr._xscale = sqr._yscale=squareSize;
}
}
n=0
onEnterFrame=function(){
drawLayout(computeLargestSquareSizeAndLayout(400, 400, n++)); } [/as]


Nice!
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training 
http://www.figleaf.com http://training.figleaf.com



___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Fitting squares into an area

2006-05-09 Thread Mike Mountain
Neatness is an issue here believe it or not...but much better yes! This
is going to prove to be very useful...

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf 
 Of Danny Kodicek
 Sent: 09 May 2006 11:37
 To: Flashcoders mailing list
 Subject: Re: [Flashcoders] Fitting squares into an area
 
 Not that complex, it turns out...
 
 Change the line
  if (next_swidthnext_sheight) {
 to
  if (next_swidth=next_sheight) {
 
 Better? :)
 
 Danny
  
 - Original Message -
 From: Mike Mountain [EMAIL PROTECTED]
 To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
 Sent: Tuesday, May 09, 2006 11:21 AM
 Subject: RE: [Flashcoders] Fitting squares into an area
 
 
 Hmmm it has problems - try 8 at 640x480 
 
 M
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] How to embed the Flash Player in a desktop application

2006-05-09 Thread Chris Velevitch

On 5/9/06, John Dowdell [EMAIL PROTECTED] wrote:

I'm not sure I'm guessing the right question here, but if it's Which of
the browser APIs does Flash Player's 'externalInterface' call into?,
then it's Microsoft's ActiveX Scripting host routines, and the NPRuntime
API for plugin-using browsers:


It's 'What is the Flash Player's APIs so my C++ program can interface to it'?

And 'What the name and location of the Flash Player DLL (or whatever
it is) that I need to link to when I compile by C++ program'?

And I'm interested in the non-OCX version for platform independence as
I believe OCX files are windows specific.


Chris
--
Chris Velevitch
Manager - Sydney Flash Platform Developers Group
www.flashdev.org.au
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Fitting squares into an area

2006-05-09 Thread eric dolecki

This is some very cool investigation for sure! Nice work guys.

On 5/9/06, Mike Mountain [EMAIL PROTECTED] wrote:


Neatness is an issue here believe it or not...but much better yes! This
is going to prove to be very useful...

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf
 Of Danny Kodicek
 Sent: 09 May 2006 11:37
 To: Flashcoders mailing list
 Subject: Re: [Flashcoders] Fitting squares into an area

 Not that complex, it turns out...

 Change the line
  if (next_swidthnext_sheight) {
 to
  if (next_swidth=next_sheight) {

 Better? :)

 Danny

 - Original Message -
 From: Mike Mountain [EMAIL PROTECTED]
 To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
 Sent: Tuesday, May 09, 2006 11:21 AM
 Subject: RE: [Flashcoders] Fitting squares into an area


 Hmmm it has problems - try 8 at 640x480

 M
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Fitting squares into an area

2006-05-09 Thread Éric Thibault
I've shown the resulting SWF to our graphist and she's thinking where to 
implement this in our projects and the transitions/rollover/onclick 
events ... totaly inspiring!


Thanks all!

--
===

Éric Thibault
Programmeur analyste
Réseau de valorisation de l'enseignement
Université Laval, pavillon Félix-Antoine Savard
Québec, Canada
Tel.: 656-2131 poste 18015
Courriel : [EMAIL PROTECTED]

===

Avis relatif à la confidentialité / Notice of Confidentiality / Advertencia de 
confidencialidad http://www.rec.ulaval.ca/lce/securite/confidentialite.htm

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] How to embed the Flash Player in a desktopapplication

2006-05-09 Thread Tom Lee
You might try the Flash Player SDK:

http://www.adobe.com/products/flashplayer_sdk/

Good luck.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Chris
Velevitch
Sent: Tuesday, May 09, 2006 7:09 AM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] How to embed the Flash Player in a
desktopapplication

On 5/9/06, John Dowdell [EMAIL PROTECTED] wrote:
 I'm not sure I'm guessing the right question here, but if it's Which of
 the browser APIs does Flash Player's 'externalInterface' call into?,
 then it's Microsoft's ActiveX Scripting host routines, and the NPRuntime
 API for plugin-using browsers:

It's 'What is the Flash Player's APIs so my C++ program can interface to
it'?

And 'What the name and location of the Flash Player DLL (or whatever
it is) that I need to link to when I compile by C++ program'?

And I'm interested in the non-OCX version for platform independence as
I believe OCX files are windows specific.


Chris
--
Chris Velevitch
Manager - Sydney Flash Platform Developers Group
www.flashdev.org.au
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] [OT] Studio 8 licensing in intelMac dual boot scenario

2006-05-09 Thread Brooks Andrus
Does anyone know if two separate licenses for Studio 8 are needed if running
bootcamp on the new mactels? We are currently exploring moving some of our
workstations to a dual boot scenario, but right now the licensing is a show
stopper for us. If anyone at Adobe could clarify that would be wonderful.

 

Regards,

 

Brooks

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] FDT weirdness

2006-05-09 Thread Ed Haack
I just thought I'd make a quick comment about using VSS in your favorite
AS Editor...
 
I use SEPY and created a tutorial and downloadable scripts on how to
integrate VSS and SOS (SourceOffSite) with Sepy, using the User Toolset.
 
It can also be used with the new Workspace panel (vey similar to
Eclipse)...
 
Here's the link: http://www.sephiroth.it/phpBB/showthread.php?t=6004
 
edHAACK

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] FDT weirdness

2006-05-09 Thread Thomas Fowler

Well done Ed! Thanks!

On 5/9/06, Ed Haack [EMAIL PROTECTED] wrote:


I just thought I'd make a quick comment about using VSS in your favorite
AS Editor...

I use SEPY and created a tutorial and downloadable scripts on how to
integrate VSS and SOS (SourceOffSite) with Sepy, using the User Toolset.

It can also be used with the new Workspace panel (vey similar to
Eclipse)...

Here's the link: http://www.sephiroth.it/phpBB/showthread.php?t=6004

edHAACK

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] [OT] Studio 8 licensing in intelMac dual boot scenario

2006-05-09 Thread Weyert de Boer
Well, I think you are able to use Studio 8 on two computers but not at 
the same time.

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] [OT] Studio 8 licensing in intelMac dual bootscenario

2006-05-09 Thread Mike Mountain
But they do have to have the same OS - AFAIK you license the product for
an OS. Change OS and you'll need to relicense.

M 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf 
 Of Weyert de Boer
 Sent: 09 May 2006 16:52
 To: Flashcoders mailing list
 Subject: Re: [Flashcoders] [OT] Studio 8 licensing in 
 intelMac dual bootscenario
 
 Well, I think you are able to use Studio 8 on two computers 
 but not at the same time.
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training 
 http://www.figleaf.com http://training.figleaf.com
 
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] playing multiple flvs as one. and seeking

2006-05-09 Thread flashcoders
does anyone know of any example src or tutorials on pulling multiple flvs
together and playing them as one. and being able to seek seamlessly. ?

thanks. smith
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] Tooltip and ObjectSwap

2006-05-09 Thread Karina Steffens
Hi gang,
 
There's a new version of ObjectSwap for anyone who's interested. http://
http://www.neo-archaic.net/scripts/objectSwap.js
www.neo-archaic.net/scripts/objectSwap.js The old one had a bug that showed
up when using flash detection with multiple objects in the same html. It's
now fixed, but if you spot any other bugs, please let me know.
 
Also, I made some changes, bug fixes and enhancements to the Tooltip class
that's used by John Grden's Xray, and you can find all the source files,
examples, demo and article here:
http://www.neo-archaic.net/blog/2006/05/09/tooltip.htm
http://www.neo-archaic.net/blog/2006/05/09/tooltip.htm. 
 
Cheers,
Karina
 
 
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] [OT] Studio 8 licensing in intelMac dualbootscenario

2006-05-09 Thread Tom Lee
The license permits you to activate the software on two computers, the idea
being that a lot of folks have both a workstation and a laptop.  Each OS on
your dual boot machine would most likely qualify as an individual computer. 

Check out http://www.adobe.com/products/eula/tools, section 2b.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mike
Mountain
Sent: Tuesday, May 09, 2006 12:00 PM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] [OT] Studio 8 licensing in intelMac
dualbootscenario

But they do have to have the same OS - AFAIK you license the product for
an OS. Change OS and you'll need to relicense.

M 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf 
 Of Weyert de Boer
 Sent: 09 May 2006 16:52
 To: Flashcoders mailing list
 Subject: Re: [Flashcoders] [OT] Studio 8 licensing in 
 intelMac dual bootscenario
 
 Well, I think you are able to use Studio 8 on two computers 
 but not at the same time.
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training 
 http://www.figleaf.com http://training.figleaf.com
 
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] Flex 2.0 Heap issue

2006-05-09 Thread Wade Arnold
Hey All,

I am seeing the following error right now on FLEX 

 

An out of memory error has occurred. You can prevent these errors in the
future by increasing your heap size before you start the workbench using the
-vmargs -Xmx command line option

 

I tried the following as command line..but didn't work.

 

C:\Program Files\Adobe\Flex Builder 2 Beta 2FlexBuilder.exe -vmargs -Xmx

 

C:\Program Files\Adobe\Flex Builder 2 Beta 2eclipse -clean -vmargs
-Xmx1024m

 

C:\Program Files\Adobe\Flex Builder 2 Beta 2FlexBuilder.exe -clean -vmargs
-Xmx1024m

 

C:\Program Files\Adobe\Flex Builder 2 Beta 2FlexBuilder.exe -vmargs
-Xmx1024m

 

C:\Program Files\Adobe\Flex Builder 2 Beta 2FlexBuilder.exe -vmargs
-Xmx512m

 

How do I increase the heap size. Any help would be greatly appreciated.

Thanks

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] How to embed the Flash Player in a desktopapplication

2006-05-09 Thread André Goliath
I know that MDM Zinc uses the Mac Flash Netscape plugin to create MAC OSX
binaries,
but I don´t know how to access it.

I´m a Windows-only coder so my knowledge on other OSes in terms of
programming is rather limited,...

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Chris
Velevitch
Sent: Tuesday, May 09, 2006 1:09 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] How to embed the Flash Player in a
desktopapplication

On 5/9/06, John Dowdell [EMAIL PROTECTED] wrote:
 I'm not sure I'm guessing the right question here, but if it's Which of
 the browser APIs does Flash Player's 'externalInterface' call into?,
 then it's Microsoft's ActiveX Scripting host routines, and the NPRuntime
 API for plugin-using browsers:

It's 'What is the Flash Player's APIs so my C++ program can interface to
it'?

And 'What the name and location of the Flash Player DLL (or whatever
it is) that I need to link to when I compile by C++ program'?

And I'm interested in the non-OCX version for platform independence as
I believe OCX files are windows specific.


Chris
--
Chris Velevitch
Manager - Sydney Flash Platform Developers Group
www.flashdev.org.au
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] File is cached or not ?

2006-05-09 Thread Patrick Matte
I need to know if a sound is already inside the browser's cache.

Right now I use a getTimer when I fire the loadSound and another getTimer
when the sound is loaded.

One minus the other gives me a value of 0.03 seconds if the file is in the
cache.

Do you think it would be reliable to say that the sound is cached if it
loads under 0.1 seconds ?

Do you have another idea ?

I use this sound to calculate the user's download speed and then I store the
value inside a shared object. Then if the sound is cached, I use the value
inside the shared object. And then I load lo-res or hi-res videos depending
on the bandwidth speed.


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] File is cached or not ?

2006-05-09 Thread Tom Lee
My suggestions for you would be 

1) Always give the user an option to manually select low-band or hi-band.  
2) If you test connection speed, do so with every visit: network conditions
will vary.
3) To force the test file to download from the server every time, add a
random number (or current date time) on a query string to the file request:
http://www.myserver.com/myfile.mp3?200605093455758.  As long as the number
is different each time, the file will not load from cache.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Patrick
Matte
Sent: Tuesday, May 09, 2006 2:19 PM
To: Flashcoders mailing list
Subject: [Flashcoders] File is cached or not ?

I need to know if a sound is already inside the browser's cache.

Right now I use a getTimer when I fire the loadSound and another getTimer
when the sound is loaded.

One minus the other gives me a value of 0.03 seconds if the file is in the
cache.

Do you think it would be reliable to say that the sound is cached if it
loads under 0.1 seconds ?

Do you have another idea ?

I use this sound to calculate the user's download speed and then I store the
value inside a shared object. Then if the sound is cached, I use the value
inside the shared object. And then I load lo-res or hi-res videos depending
on the bandwidth speed.


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] How to embed the Flash Player in a desktopapplication

2006-05-09 Thread Chris Velevitch

On 5/10/06, Tom Lee [EMAIL PROTECTED] wrote:

You might try the Flash Player SDK:

http://www.adobe.com/products/flashplayer_sdk/


That is for device manufacturer's to embed the player which includes
the source of the Flash Player which requires you to become a
licensee. Something that no doubt costly.


Chris
--
Chris Velevitch
Manager - Sydney Flash Platform Developers Group
www.flashdev.org.au
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] How to embed the Flash Player in a desktop application

2006-05-09 Thread John Dowdell

Chris Velevitch wrote:
'What is the Flash Player's APIs so my C++ program can interface to 
it'?


Like I wrote, the Player itself doesn't expose APIs to hosts so much as 
use whatever APIs the various hosts expose for communication. (You could 
say there's a type of API in the predefined play/stop/get/set commands, 
but this is a given set of commands passed through whichever 
communication interface the hosting browser offers.)


That's ActiveX Scripting for ActiveX Controls (Windows only, usually 
IE/Win) and NPRuntime for currently-released plugin-using browsers, on 
Mac or Win. (Previously there was LiveConnect and then the first 
Mozilla/Firefox API. I think there may be a Linux browser 
intercommunication protocol too, but Linux browsers vary so greatly that 
I don't keep this in memory.)


Rephrased, to host and communicate with the Adobe Flash Player, you need 
to either support ActiveX or Plugin hosting, and then implement the 
communication model which hosts of that type support.


jd






--
John Dowdell . Adobe Developer Support . San Francisco CA USA
Weblog: http://weblogs.macromedia.com/jd
Aggregator: http://weblogs.macromedia.com/mxna
Technotes: http://www.macromedia.com/support/
Spam killed my private email -- public record is best, thanks.
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] Best SWF Wrapper

2006-05-09 Thread eric dolecki

I'm looking for some opinions on the best SWF wrapper you think is out
there. The ability to save out files (XML), perhaps communicate with dbases
(local/online), etc.

- e.dolecki
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] for (var i in ..) loop interupted by frame change

2006-05-09 Thread Tyler Wright

I have sevaral for (var i in .. ) loops running looping through objects that
get thrown (interupted OR actually go forever) when I change the frame of a
movieClip where one exists.

Just as an example:

for (var i in listeners)
{
 dispatch(listeners[i].event);
{

// the listener
function setState()
{
 this.gotoAndStop(over);
}

or so, produced and endless loop (when the listeners object was defined on
the movieClip using the for .. i .. in)

Anyone have any ideas on fixes? I changed my listener to loop through it as
an Array (which isn't as fast and doesn't allow you to remove listening
objects halfway through the process). I've run into a circumstance where I
can't use an Array.

Tyler
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] for (var i in ..) loop interupted by frame change

2006-05-09 Thread Tyler Wright

thanks for the quick response.

If you view the source for MM's EventDispatcher you'll see that it traverses
the event listeners array with a for..i..in.  This is so that one of the
listening methods can removeEventListener and not screw up the array
mid-process. A for..i..in simply hits every uniqe property despite order or
number.

The code I sent is an illustritive example. I've resolved my
EventDispatcher, but I'm finding this issue is the case in other
circumstanced (states, for example, are changing the frames while a
for..i..in loop is running on that object).

Tyler

On 5/9/06, Kevin Newman [EMAIL PROTECTED] wrote:


Logically it seems as though a list of listeners should be in an array,
instead of a collection of object properties, but to each his own :-)

You seem to have a small typo in here:

for (var i in listeners)
{
dispatch(listeners[i].event);
{

The second curly bracket is backwards. I don't know if that is causing
your problem though, could you give information?

Also, there is an mx object that can do event
dispatching/management/delegation:

mx.events.EventDispatcher


http://livedocs.macromedia.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Flash_MX_2004file=2443.html


Kevin N.


Tyler Wright wrote:
 I have sevaral for (var i in .. ) loops running looping through
 objects that
 get thrown (interupted OR actually go forever) when I change the frame
 of a
 movieClip where one exists.

 Just as an example:

 for (var i in listeners)
 {
  dispatch(listeners[i].event);
 {

 // the listener
 function setState()
 {
  this.gotoAndStop(over);
 }

 or so, produced and endless loop (when the listeners object was
 defined on
 the movieClip using the for .. i .. in)

 Anyone have any ideas on fixes? I changed my listener to loop through
 it as
 an Array (which isn't as fast and doesn't allow you to remove listening
 objects halfway through the process). I've run into a circumstance
 where I
 can't use an Array.

 Tyler


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] Non-breaking spaces

2006-05-09 Thread Dave Wood

Hi

Can anyone confirm that in Flash Player 8, non-breaking spaces in  
text fields are broken?


I have an old calendar make back on Flash 5 days. It used a single  
text field to display each month's calendar using non-breaking spaces  
and a mono-spaced font to ensure all the dates lined up. I just  
updated it to Flash 8 and updated the code to AS2 and it's broken -  
the calendar dates no longer line up.


I backed up a bit and made a version for to Flash Player 7 (also  
converting the code to AS2) and there is no problem there.


Anyone?

Thanks

David




___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] for (var i in ..) loop interupted by frame change

2006-05-09 Thread Thomas Fowler

I would love to help on this but I need a little more context. From what I
can gather it looks as if you're trying to dispatch an event a series of
events and have the corresponding listener/handler do something? Is that
correct?

As Kevin stated, it would be better to have a class backing these different
movie clips that dispatch events that trigger another clip to do something
when said events occurs.

On 5/9/06, Kevin Newman [EMAIL PROTECTED] wrote:


Logically it seems as though a list of listeners should be in an array,
instead of a collection of object properties, but to each his own :-)

You seem to have a small typo in here:

for (var i in listeners)
{
dispatch(listeners[i].event);
{

The second curly bracket is backwards. I don't know if that is causing
your problem though, could you give information?

Also, there is an mx object that can do event
dispatching/management/delegation:

mx.events.EventDispatcher


http://livedocs.macromedia.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Flash_MX_2004file=2443.html


Kevin N.


Tyler Wright wrote:
 I have sevaral for (var i in .. ) loops running looping through
 objects that
 get thrown (interupted OR actually go forever) when I change the frame
 of a
 movieClip where one exists.

 Just as an example:

 for (var i in listeners)
 {
  dispatch(listeners[i].event);
 {

 // the listener
 function setState()
 {
  this.gotoAndStop(over);
 }

 or so, produced and endless loop (when the listeners object was
 defined on
 the movieClip using the for .. i .. in)

 Anyone have any ideas on fixes? I changed my listener to loop through
 it as
 an Array (which isn't as fast and doesn't allow you to remove listening
 objects halfway through the process). I've run into a circumstance
 where I
 can't use an Array.

 Tyler


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Flex 2.0 Heap issue

2006-05-09 Thread Wade Arnold
I have tried this but it failed to help. 
Flex Builder running slow or hang, or get out of Memory message
Flex Builder will consuming memory over times, especially when you have a
lot of projects created in FB. You can monitor the memory usage of FB from
windows task manager. Look at the javaw.exe process, the above mentioned
problems usually happens when the memory usage of javaw.exe is too height.
You can close and restart the FB to clean up the memory.

By default, FB set the heap size for Java virtual machine in FlexBuilder.ini
as following:

-vmargs
-Xms256M
-Xmx512M

If you exceed the maximum value, OutOfMemory errors can occur.
If your system has more total memory available, then you can increase the
maximum heap size value. The rule of thumb used to be set the maximum heap
size no more than half of the total memory available. However, with the new
features and settings in the newer version of JDK, there are more factors
you need to consider when deciding what is the best maximum heap size you
can use. You can consult articles about heap size online.
To change the heap size settings, you can modify them in FlexBuilder.ini
under the FB root directory.
If you start FB by command line (or using Eclipse), then you can change them
by command line (or FB2 shortcut) such as C:\Program Files\Adobe\Flex
Builder 2 Beta 1\FlexBuilder.exe -vmargs -Xms256M -Xmx512M

7. NullPointer Exception when open FB
If you leave some files open when you close FB and restart FB later, by
default FB will open the files you previously opened. If one of those opened
file has been deleted already at this time, then FB will throw NullPointer
exception. All you need to do to get rid of the exception is to close that
file.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Wade Arnold
Sent: Tuesday, May 09, 2006 11:56 AM
To: Flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] Flex 2.0 Heap issue

Hey All,

I am seeing the following error right now on FLEX 

 

An out of memory error has occurred. You can prevent these errors in the
future by increasing your heap size before you start the workbench using the
-vmargs -Xmx command line option

 

I tried the following as command line..but didn't work.

 

C:\Program Files\Adobe\Flex Builder 2 Beta 2FlexBuilder.exe -vmargs -Xmx

 

C:\Program Files\Adobe\Flex Builder 2 Beta 2eclipse -clean -vmargs
-Xmx1024m

 

C:\Program Files\Adobe\Flex Builder 2 Beta 2FlexBuilder.exe -clean -vmargs
-Xmx1024m

 

C:\Program Files\Adobe\Flex Builder 2 Beta 2FlexBuilder.exe -vmargs
-Xmx1024m

 

C:\Program Files\Adobe\Flex Builder 2 Beta 2FlexBuilder.exe -vmargs
-Xmx512m

 

How do I increase the heap size. Any help would be greatly appreciated.

Thanks

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Best SWF Wrapper

2006-05-09 Thread Wade Arnold
MDM Zink is the best for everything I have ever wanted to do. I like the
ability to make your own DLL extensions too! Maybe they will send me a
t-shirt for that testimony! 

Wade


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of eric dolecki
Sent: Tuesday, May 09, 2006 2:41 PM
To: Flashcoders mailing list
Subject: [Flashcoders] Best SWF Wrapper

I'm looking for some opinions on the best SWF wrapper you think is out
there. The ability to save out files (XML), perhaps communicate with dbases
(local/online), etc.

- e.dolecki
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] tabIndex problems

2006-05-09 Thread Chris Fry

Hey there,
I have been having some problems using the tabIndex feature with Flash 8
Pro. You can view the file here: http://132.162.36.103/albert/MUTH/ The
problem is that, though I am confident that I have properly indexed all of
the objects, the tabbing does not follow the index I provided. For instance,
on the first page of the actual exam (this is a placement exam for a Music
Theory course) the first question follows the index properly. The second
question, however, insists on going across rather than down first. The
similar problems occur on question 4 where the second part of the answer is
selected, then the first. All of the objects that I have placed in the index
are editable objects, and they all seem to get selected, just not according
to the index I layed out. The only oddity is the Submit button which is a
single object which exists across all of the frames. I dealt with this by
just giving it the highest index on any frame in the hope that it would just
work. I didn't see anything in the documentation which would suggest that
this won't work, though I'm not really holding my breath. All other objects
are in their frame alone and do not last across frames (or layers for that
matter). Any suggestions would be appreciated... I'm wondering if there is
some global setting I don't have on to use the tabIndex?? Didn't see
anything in the documentation suggesting that, but thought it was possible.

Chris
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Best SWF Wrapper

2006-05-09 Thread André Goliath
Not long ago I´ve posted a little comparison of SWF Studio and Zinc here, my
clear favorite is SWF Studio,
using it now for about 4 years and was never disappointed.

There where many discussions about that topic on this list, I suggest simply
grab rhe demo and the help file from
each of them and check out for your on. All tools out there have advantages
and disadvantages.

As for offline DBs, Zinc and SWF Studio both have SQLite interfaces
available.
While Zinc´s is free, SS´ has much more features.

Check what you need against the tool`s feature lists, and then try two or
three demos out.

André

p.s.: Hey Derek, what about an SWF Studio T-Shirt? ;)  

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Wade Arnold
Sent: Tuesday, May 09, 2006 11:01 PM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] Best SWF Wrapper

MDM Zink is the best for everything I have ever wanted to do. I like the
ability to make your own DLL extensions too! Maybe they will send me a
t-shirt for that testimony! 

Wade


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of eric dolecki
Sent: Tuesday, May 09, 2006 2:41 PM
To: Flashcoders mailing list
Subject: [Flashcoders] Best SWF Wrapper

I'm looking for some opinions on the best SWF wrapper you think is out
there. The ability to save out files (XML), perhaps communicate with dbases
(local/online), etc.

- e.dolecki
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] How to embed the Flash Player in adesktop application

2006-05-09 Thread Tom Lee
Or license the source code of the Flash Player and stick it in your C++ app.
;) Your call.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of John Dowdell
Sent: Tuesday, May 09, 2006 3:20 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] How to embed the Flash Player in adesktop
application

Chris Velevitch wrote:
 'What is the Flash Player's APIs so my C++ program can interface to 
 it'?

Like I wrote, the Player itself doesn't expose APIs to hosts so much as 
use whatever APIs the various hosts expose for communication. (You could 
say there's a type of API in the predefined play/stop/get/set commands, 
but this is a given set of commands passed through whichever 
communication interface the hosting browser offers.)

That's ActiveX Scripting for ActiveX Controls (Windows only, usually 
IE/Win) and NPRuntime for currently-released plugin-using browsers, on 
Mac or Win. (Previously there was LiveConnect and then the first 
Mozilla/Firefox API. I think there may be a Linux browser 
intercommunication protocol too, but Linux browsers vary so greatly that 
I don't keep this in memory.)

Rephrased, to host and communicate with the Adobe Flash Player, you need 
to either support ActiveX or Plugin hosting, and then implement the 
communication model which hosts of that type support.

jd






-- 
John Dowdell . Adobe Developer Support . San Francisco CA USA
Weblog: http://weblogs.macromedia.com/jd
Aggregator: http://weblogs.macromedia.com/mxna
Technotes: http://www.macromedia.com/support/
Spam killed my private email -- public record is best, thanks.
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] for (var i in ..) loop interupted by frame change

2006-05-09 Thread Tyler Wright

I apologize, I mislead you. My EventDispatcher is no longer a problem and
the issue I face now seems to be different. I can only duplicate it making a
component class that extends MovieClip. The issue is that the for..i..in
loop stops after a gotoAndStop.

class Test extends MovieClip
{
   var list:Object;

   function Test()
   {
   list =
   {
   one:one,
   two:two,
   three:three,
   four:four,
   five:five
   };

   for (var i in list)
   {
   trace(i);
   gotoAndStop(list[i]);
   }
   }

}

If you define this class and set it up as a component in the Library you
will see that only one is traced out. Then you can comment out the
gotoAndStop(); and it loops through all 5. It behaves the same whether or
not these frames actually exist.

Tyler

On 5/9/06, Thomas Fowler [EMAIL PROTECTED] wrote:


I would love to help on this but I need a little more context. From what I
can gather it looks as if you're trying to dispatch an event a series of
events and have the corresponding listener/handler do something? Is that
correct?

As Kevin stated, it would be better to have a class backing these
different
movie clips that dispatch events that trigger another clip to do something
when said events occurs.

On 5/9/06, Kevin Newman [EMAIL PROTECTED] wrote:

 Logically it seems as though a list of listeners should be in an array,
 instead of a collection of object properties, but to each his own :-)

 You seem to have a small typo in here:

 for (var i in listeners)
 {
 dispatch(listeners[i].event);
 {

 The second curly bracket is backwards. I don't know if that is causing
 your problem though, could you give information?

 Also, there is an mx object that can do event
 dispatching/management/delegation:

 mx.events.EventDispatcher



http://livedocs.macromedia.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Flash_MX_2004file=2443.html


 Kevin N.


 Tyler Wright wrote:
  I have sevaral for (var i in .. ) loops running looping through
  objects that
  get thrown (interupted OR actually go forever) when I change the frame
  of a
  movieClip where one exists.
 
  Just as an example:
 
  for (var i in listeners)
  {
   dispatch(listeners[i].event);
  {
 
  // the listener
  function setState()
  {
   this.gotoAndStop(over);
  }
 
  or so, produced and endless loop (when the listeners object was
  defined on
  the movieClip using the for .. i .. in)
 
  Anyone have any ideas on fixes? I changed my listener to loop through
  it as
  an Array (which isn't as fast and doesn't allow you to remove
listening
  objects halfway through the process). I've run into a circumstance
  where I
  can't use an Array.
 
  Tyler


 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Flex 2.0 Heap issue

2006-05-09 Thread Merrill, Jason
Hi Wade,

There is a really good Flexcoders list here:

http://groups.yahoo.com/group/flexcoders/

Macromedia guys are on there and they listen.  I'm sure you're not the
first to encounter that with the beta - someone there should be able to
help.  Sorry I don't know the answer to that one myself.

Jason Merrill   |   E-Learning Solutions   |  ICF International









___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] for (var i in ..) loop interupted by frame change

2006-05-09 Thread Thomas Fowler

This is probably not it, but when you instantiate an instance of your Test
class, does the instance persist throughout the entire timeline?

On 5/9/06, Tyler Wright [EMAIL PROTECTED] wrote:


I apologize, I mislead you. My EventDispatcher is no longer a problem and
the issue I face now seems to be different. I can only duplicate it making
a
component class that extends MovieClip. The issue is that the for..i..in
loop stops after a gotoAndStop.

class Test extends MovieClip
{
var list:Object;

function Test()
{
list =
{
one:one,
two:two,
three:three,
four:four,
five:five
};

for (var i in list)
{
trace(i);
gotoAndStop(list[i]);
}
}

}

If you define this class and set it up as a component in the Library you
will see that only one is traced out. Then you can comment out the
gotoAndStop(); and it loops through all 5. It behaves the same whether or
not these frames actually exist.

Tyler

On 5/9/06, Thomas Fowler [EMAIL PROTECTED] wrote:

 I would love to help on this but I need a little more context. From what
I
 can gather it looks as if you're trying to dispatch an event a series of
 events and have the corresponding listener/handler do something? Is that
 correct?

 As Kevin stated, it would be better to have a class backing these
 different
 movie clips that dispatch events that trigger another clip to do
something
 when said events occurs.

 On 5/9/06, Kevin Newman [EMAIL PROTECTED] wrote:
 
  Logically it seems as though a list of listeners should be in an
array,
  instead of a collection of object properties, but to each his own :-)
 
  You seem to have a small typo in here:
 
  for (var i in listeners)
  {
  dispatch(listeners[i].event);
  {
 
  The second curly bracket is backwards. I don't know if that is causing
  your problem though, could you give information?
 
  Also, there is an mx object that can do event
  dispatching/management/delegation:
 
  mx.events.EventDispatcher
 
 
 

http://livedocs.macromedia.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Flash_MX_2004file=2443.html
 
 
  Kevin N.
 
 
  Tyler Wright wrote:
   I have sevaral for (var i in .. ) loops running looping through
   objects that
   get thrown (interupted OR actually go forever) when I change the
frame
   of a
   movieClip where one exists.
  
   Just as an example:
  
   for (var i in listeners)
   {
dispatch(listeners[i].event);
   {
  
   // the listener
   function setState()
   {
this.gotoAndStop(over);
   }
  
   or so, produced and endless loop (when the listeners object was
   defined on
   the movieClip using the for .. i .. in)
  
   Anyone have any ideas on fixes? I changed my listener to loop
through
   it as
   an Array (which isn't as fast and doesn't allow you to remove
 listening
   objects halfway through the process). I've run into a circumstance
   where I
   can't use an Array.
  
   Tyler
 
 
  ___
  Flashcoders@chattyfig.figleaf.com
  To change your subscription options or search the archive:
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
  Brought to you by Fig Leaf Software
  Premier Authorized Adobe Consulting and Training
  http://www.figleaf.com
  http://training.figleaf.com
 
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] for (var i in ..) loop interupted by frame change

2006-05-09 Thread elibol

=]

On 5/9/06, Tyler Wright [EMAIL PROTECTED] wrote:


I apologize, I mislead you. My EventDispatcher is no longer a problem and
the issue I face now seems to be different. I can only duplicate it making
a
component class that extends MovieClip. The issue is that the for..i..in
loop stops after a gotoAndStop.

class Test extends MovieClip
{
var list:Object;

function Test()
{
list =
{
one:one,
two:two,
three:three,
four:four,
five:five
};

for (var i in list)
{
trace(i);
gotoAndStop(list[i]);
}
}

}

If you define this class and set it up as a component in the Library you
will see that only one is traced out. Then you can comment out the
gotoAndStop(); and it loops through all 5. It behaves the same whether or
not these frames actually exist.

Tyler

On 5/9/06, Thomas Fowler [EMAIL PROTECTED] wrote:

 I would love to help on this but I need a little more context. From what
I
 can gather it looks as if you're trying to dispatch an event a series of
 events and have the corresponding listener/handler do something? Is that
 correct?

 As Kevin stated, it would be better to have a class backing these
 different
 movie clips that dispatch events that trigger another clip to do
something
 when said events occurs.

 On 5/9/06, Kevin Newman [EMAIL PROTECTED] wrote:
 
  Logically it seems as though a list of listeners should be in an
array,
  instead of a collection of object properties, but to each his own :-)
 
  You seem to have a small typo in here:
 
  for (var i in listeners)
  {
  dispatch(listeners[i].event);
  {
 
  The second curly bracket is backwards. I don't know if that is causing
  your problem though, could you give information?
 
  Also, there is an mx object that can do event
  dispatching/management/delegation:
 
  mx.events.EventDispatcher
 
 
 

http://livedocs.macromedia.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Flash_MX_2004file=2443.html
 
 
  Kevin N.
 
 
  Tyler Wright wrote:
   I have sevaral for (var i in .. ) loops running looping through
   objects that
   get thrown (interupted OR actually go forever) when I change the
frame
   of a
   movieClip where one exists.
  
   Just as an example:
  
   for (var i in listeners)
   {
dispatch(listeners[i].event);
   {
  
   // the listener
   function setState()
   {
this.gotoAndStop(over);
   }
  
   or so, produced and endless loop (when the listeners object was
   defined on
   the movieClip using the for .. i .. in)
  
   Anyone have any ideas on fixes? I changed my listener to loop
through
   it as
   an Array (which isn't as fast and doesn't allow you to remove
 listening
   objects halfway through the process). I've run into a circumstance
   where I
   can't use an Array.
  
   Tyler
 
 
  ___
  Flashcoders@chattyfig.figleaf.com
  To change your subscription options or search the archive:
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
  Brought to you by Fig Leaf Software
  Premier Authorized Adobe Consulting and Training
  http://www.figleaf.com
  http://training.figleaf.com
 
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] Re: [Off List Response] for (var i in ..) loop interupted by frame change

2006-05-09 Thread Tyler Wright

This is Great! What a horrible thing to have to know, it just doesn't make
sense that the keyword this would fix it. I can't imagine what other scope
gotoAndStop would effect in this way.

Thanks Elibol. It fixes the problem for both situations, endless looping
for..i..in and the for..i..in's that end prematurely.

Browser Power for Flash
http://www.flashforwardconference.com/sessions?sid=158

Tyler

On 5/9/06, elibol [EMAIL PROTECTED] wrote:


Hey that's great man! Congratulations, I'm very happy for you =] So what
is it you're going to speak about?

Weird... Try this:


for (var i in list){
trace(i);
this.gotoAndStop (i);
}
}

Seems that you need to explicity refer to this. I remember there being
problems with certain MovieClip functions when they weren't refered to with
the this object. I think that in the object stack there might be two
definitions of the function and 'this' makes sure that the actual movieclip
is the first one that is examined...

Extending MovieClips is always full of suprises man...

This is interesting, I'm wondering if it's gonna fix your problem though?

M

On 5/9/06, Tyler Wright [EMAIL PROTECTED] wrote:

 Hello Elibol!

 I apologize, I mislead you. My EventDispatcher is no longer a problem
 and the issue I face now seems to be different. I can only duplicate it
 making a component class that extends MovieClip. The issue is that the
 for..i..in loop stops after a gotoAndStop.

 class Test extends MovieClip
 {
 var list:Object;

 function Test()
 {
 list =
 {
 one:one,
 two:two,
 three:three,
 four:four,
 five:five
 };

 for (var i in list)
 {
 trace(i);
 gotoAndStop(list[i]);
 }
 }

 }

 If you define this class and set it up as a component in the Library you
 will see that only one is traced out. Then you can comment out the
 gotoAndStop(); and it loops through all 5. It behaves the same whether or
 not these frames actually exist. I think I'll post this to the list as well,
 but thanks for responding so quickly. Did I tell you I got accepted to speak
 at FlashForward in September? On Flash and JavaScript.

 Tyler


 On 5/9/06, elibol [EMAIL PROTECTED] wrote:
 
  Nevermind my former message. You can also use the AsBroadcaster class.
  I find it's very solid, however, it doesn't seem to be your problem at all.
 
  If you are coding in frames, and frames with function calls and
  variable definitions are called more than once, then this can mislead your
  assumptions about how many times a piece of code is executed. It might just
  be that you are adding the same object to a broadcaster more than once.
 
  I'm not sure but it seems like this is a possibility. Again though, an
  ends to what you've mentioned on object enumeration, the for in should never
  go into an infinite loop.
 
  M
 




___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Best SWF Wrapper

2006-05-09 Thread Steven Sacks
 I'm looking for some opinions on the best SWF wrapper you think is out
 there. The ability to save out files (XML), perhaps 
 communicate with dbases
 (local/online), etc.

mProjector hands down is the best performing SWF wrapper out there.  It also
has the easiest API to develop against.  It also does asynchronous calls to
the system.

http://www.screentime.com/software/mprojector/

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Best SWF Wrapper

2006-05-09 Thread John Hattan
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf 
 Of André Goliath
 Sent: Tuesday, May 09, 2006 4:10 PM
 To: 'Flashcoders mailing list'
 Subject: RE: [Flashcoders] Best SWF Wrapper
 
 Not long ago I´ve posted a little comparison of SWF Studio 
 and Zinc here, my clear favorite is SWF Studio, using it now 
 for about 4 years and was never disappointed.
 
 There where many discussions about that topic on this list, I 
 suggest simply grab rhe demo and the help file from each of 
 them and check out for your on. All tools out there have 
 advantages and disadvantages.
 
 As for offline DBs, Zinc and SWF Studio both have SQLite 
 interfaces available.
 While Zinc´s is free, SS´ has much more features.

What features does the SS SQLite wrapper have that the Zinc one is missing?

Not that it matters much. What I have appears to be working properly, so new
features in the wrapper will only be added if they'll improve performance or
make things easier for me.

Disclaimer: I am in no way related to author of the Zinc SQLite wrapper
beyond the fact that I am him.

 p.s.: Hey Derek, what about an SWF Studio T-Shirt? ;)

You can keep the T-shirt. I need a review copy for gamedev ;)

---
John Hattan
[EMAIL PROTECTED]
Gamedev.net - more 1's and 0's than you can shake a stick at 

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] tabIndex problems

2006-05-09 Thread Kevin Aebig
Though I'm not sure whether or not it's been fixed with Flash 8, with 2004
MX, tabbing was an absolute nightmare. It didn't work properly in anything
but absolutely simple scenarios.

!k

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Chris Fry
Sent: May 9, 2006 3:02 PM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] tabIndex problems

Hey there,
I have been having some problems using the tabIndex feature with Flash 8
Pro. You can view the file here: http://132.162.36.103/albert/MUTH/ The
problem is that, though I am confident that I have properly indexed all of
the objects, the tabbing does not follow the index I provided. For instance,
on the first page of the actual exam (this is a placement exam for a Music
Theory course) the first question follows the index properly. The second
question, however, insists on going across rather than down first. The
similar problems occur on question 4 where the second part of the answer is
selected, then the first. All of the objects that I have placed in the index
are editable objects, and they all seem to get selected, just not according
to the index I layed out. The only oddity is the Submit button which is a
single object which exists across all of the frames. I dealt with this by
just giving it the highest index on any frame in the hope that it would just
work. I didn't see anything in the documentation which would suggest that
this won't work, though I'm not really holding my breath. All other objects
are in their frame alone and do not last across frames (or layers for that
matter). Any suggestions would be appreciated... I'm wondering if there is
some global setting I don't have on to use the tabIndex?? Didn't see
anything in the documentation suggesting that, but thought it was possible.

Chris
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] obfuscation swf !

2006-05-09 Thread Andy Bueler

Hi,

is there a way to protect flash components?
Unfortunalty encrypting breaks the components, but is there a tool
to at least obfuscation them?

Kind Regards,
Andy

On 5/10/06, John Hattan [EMAIL PROTECTED] wrote:


 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf
 Of Burak KALAYCI
 Sent: Monday, May 08, 2006 11:57 AM
 To: Flashcoders mailing list
 Subject: Re: [Flashcoders] obfuscation swf !

 Hi John,

 I wouldn't say SWF Encrypt is absolute crap - though it took
 just minutes for us to bypass their initial 3.0 version.

 As per requests from our customers, we have been deliberately
 not bypassing it (but we gave no promises).

 Recently, it turned out it broke some of our applications
 (namely UAE and
 ASR) because our software does not preserve the tag order
 when saving a SWF file and the obfuscation moves real
 actionscript bytecode to other tags. We had to move the
 scripts back and though we didn't add even a single line of
 code to bypass the obfuscation, it turned out some of the
 scripts can now be decompiled. I'm sure SWF Encrypt guys can
 fix this quickly (or they already may have) because we are
 not actively trying to bypass the obfuscation.

 Current release version of ASR can show the script in
 fish_secure.swf, with the right options selected. We will
 have the same option with the ASV update (as it also uses the
 same decompiler engine), which will be released in 10 days
 (We hope to have it released by ASVs 6th anniversary - May 16).

 I'd agree that SWF Encrypt is currently a good choice.. But,
 one must not depend on it too much.

 Also, I'd suggest identifier renaming ( like
 http://www.genable.com/asolite.html ) in addition to any
 other obfuscation, as it will be non-reversible even in
 theory. It may require more work and care but I think it's worth it.

Big thanks for the info. I've heard loads of FUD about flash encryption
versus decompilers, but very little real information.

---
John Hattan
[EMAIL PROTECTED]
Gamedev.net - more 1's and 0's than you can shake a stick at

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] Extension Manager / International Flash version problem

2006-05-09 Thread Todd Dominey

Hi everyone -

I'm experiencing a problem loading MXP files in the latest version of
Extension Manager and with users who have a non-English version of
Flash 8. Specifically, here's what happens.

Say for example a person has a French version of Flash 8 for OS X.
They load an MXP into Extension Manager, and it confirms installation.
But when you open Flash, the component installed by the MXP isn't
there. Turns out Extension Manager creates an en directory and
installs the extension to the Components folder in that directory.
So you have to physically move the component from the en folder into
the correct language folder in order for it to appear in the French
version of Flash 8.

Anyone seen / experienced this and know of a workaround?


-- Todd Dominey
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] external interface not working

2006-05-09 Thread Thomas Fowler

You might want to look into Macromedia/Adobe's Flash JavaScript Integration
Kit.

http://weblogs.macromedia.com/flashjavascript/

On 5/9/06, Doug Tangren [EMAIL PROTECTED] wrote:


I am a mac user using flash 8 testing on safari 2.0.3. , flash's
external interface and I am not getting flash to communicate with
javascript or visa versa. Can anyone help?
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Re: [Off List Response] for (var i in ..) loop interupted by frame change

2006-05-09 Thread Michael Bedar
If I remeber correctly, goToAndStop() and MoviClip.gotoAndStop() are  
completely separate functions, and even have different behavior on  
the root timeline.



On May 9, 2006, at 5:47 PM, Tyler Wright wrote:

This is Great! What a horrible thing to have to know, it just  
doesn't make
sense that the keyword this would fix it. I can't imagine what  
other scope

gotoAndStop would effect in this way.

Thanks Elibol. It fixes the problem for both situations, endless  
looping

for..i..in and the for..i..in's that end prematurely.

Browser Power for Flash
http://www.flashforwardconference.com/sessions?sid=158

Tyler

On 5/9/06, elibol [EMAIL PROTECTED] wrote:


Hey that's great man! Congratulations, I'm very happy for you =]  
So what

is it you're going to speak about?

Weird... Try this:


for (var i in list){
trace(i);
this.gotoAndStop (i);
}
}

Seems that you need to explicity refer to this. I remember there  
being
problems with certain MovieClip functions when they weren't  
refered to with

the this object. I think that in the object stack there might be two
definitions of the function and 'this' makes sure that the actual  
movieclip

is the first one that is examined...

Extending MovieClips is always full of suprises man...

This is interesting, I'm wondering if it's gonna fix your problem  
though?


M

On 5/9/06, Tyler Wright [EMAIL PROTECTED] wrote:

 Hello Elibol!

 I apologize, I mislead you. My EventDispatcher is no longer a  
problem
 and the issue I face now seems to be different. I can only  
duplicate it
 making a component class that extends MovieClip. The issue is  
that the

 for..i..in loop stops after a gotoAndStop.

 class Test extends MovieClip
 {
 var list:Object;

 function Test()
 {
 list =
 {
 one:one,
 two:two,
 three:three,
 four:four,
 five:five
 };

 for (var i in list)
 {
 trace(i);
 gotoAndStop(list[i]);
 }
 }

 }

 If you define this class and set it up as a component in the  
Library you
 will see that only one is traced out. Then you can comment out  
the
 gotoAndStop(); and it loops through all 5. It behaves the same  
whether or
 not these frames actually exist. I think I'll post this to the  
list as well,
 but thanks for responding so quickly. Did I tell you I got  
accepted to speak

 at FlashForward in September? On Flash and JavaScript.

 Tyler


 On 5/9/06, elibol [EMAIL PROTECTED] wrote:
 
  Nevermind my former message. You can also use the  
AsBroadcaster class.
  I find it's very solid, however, it doesn't seem to be your  
problem at all.

 
  If you are coding in frames, and frames with function calls and
  variable definitions are called more than once, then this can  
mislead your
  assumptions about how many times a piece of code is executed.  
It might just
  be that you are adding the same object to a broadcaster more  
than once.

 
  I'm not sure but it seems like this is a possibility. Again  
though, an
  ends to what you've mentioned on object enumeration, the for  
in should never

  go into an infinite loop.
 
  M
 




___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] external interface not working

2006-05-09 Thread Doug Tangren
This doesn't explain why the InternalInterface.call(methodName)  
doesn't call the methodName js function that was defined in the html  
page.  I would like to know the root cause of the problem. The abobe  
js/flash bridge just seems like another way of doing the same thing.


On May 9, 2006, at 11:07 PM, Thomas Fowler wrote:

You might want to look into Macromedia/Adobe's Flash JavaScript  
Integration

Kit.

http://weblogs.macromedia.com/flashjavascript/

On 5/9/06, Doug Tangren [EMAIL PROTECTED] wrote:


I am a mac user using flash 8 testing on safari 2.0.3. , flash's
external interface and I am not getting flash to communicate with
javascript or visa versa. Can anyone help?
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] external interface not working

2006-05-09 Thread Mike Chambers

Well, you might want to start by posting some code examples.

mike chambers

Doug Tangren wrote:
I am a mac user using flash 8 testing on safari 2.0.3. , flash's 
external interface and I am not getting flash to communicate with 
javascript or visa versa. Can anyone help?

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com