[Flashcoders] Unique array AS3

2011-01-13 Thread natalia Vikhtinskaya
Hi
I use function that creates unique array

function uniqueRandomInt(min:Number, max:Number, n:Number) {
var a:Array = [];
var i:Number = min;
while (a.push(i++)max) {
;
}
a.sort(function (a:Number, b:Number) { return 
Math.random()*2-1;});
return a.slice(0, n);
}

It works fine for AS2. But for AS3 it gives always the same result
if I ask
uniqueRandomInt(1, 6, 6); I always get 4,2,3,1,5,6

What is wrong in this code for AS3?

Thank you in andvance.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Android development using Flash/Flex

2011-01-13 Thread Andrew Sinning
A recent comment from Anthony Pace reads If you would prefer I help 
kick off the new year by asking some stupid questions, rather than 
Google the answers, I will gladly accommodate you. 


Here's one for you guys.  I'm trying to find some good literature on 
what the options are for developing Android apps using Flash/Flex.


Are there delivery platforms other than the browser and AIR, for example 
are there other wrappers that will present a swf in the form of an app?


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


Re: [Flashcoders] Unique array AS3

2011-01-13 Thread Juan Pablo Califano
Try this:

function uniqueRandomInt(min:Number, max:Number, n:Number) {
 var a:Array = [];
 var i:Number = min;
 while (a.push(i++)max);
 a.sort(function (a:Number, b:Number) {
  return Math.floor(Math.random()*3)-1;
 });
 return a.slice(0,n);
}

Although a random sort is not the best means to randomize an array, it
should work reasonably.

The problem with your code was this line:

Math.random()*2-1;

Your sort function should return 3 diferent values (n  1, n = 0 and; n  0)
as evenly distributed as possible. Math.random gives you a number that
is great or equal to 0 and *less* than 1. It will not give you 1 back
(0.9, but not 1).

So if you do:

Math.random() * 2

You'll either get 0 or 1 (with decimals); it's not posibble to get 2. You
should instead use 3 as the multiplier and floor it; the result should be 0,
1 or 2 (this will have as much randomness as Math.random provides). Now
substract 1 and you'll get -1, 0 or 1, which is what you want for your sort
function.


Cheers
Juan Pablo Califano
2011/1/13 natalia Vikhtinskaya natavi.m...@gmail.com

 Hi
 I use function that creates unique array

 function uniqueRandomInt(min:Number, max:Number, n:Number) {
var a:Array = [];
var i:Number = min;
while (a.push(i++)max) {
;
}
a.sort(function (a:Number, b:Number) { return
 Math.random()*2-1;});
return a.slice(0, n);
}

 It works fine for AS2. But for AS3 it gives always the same result
 if I ask
 uniqueRandomInt(1, 6, 6); I always get 4,2,3,1,5,6

 What is wrong in this code for AS3?

 Thank you in andvance.
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


Re: [Flashcoders] Unique array AS3

2011-01-13 Thread Juan Pablo Califano
PS:

I mentioned that a random sort was not the best approach.

Here's a better way to randomize an array:

public static function shuffle(array:Array):void {
var tmp:*;
var cur:int;
var top:int;

cur = top = array.length;
if(top) {
while(--top) {
cur = Math.floor(Math.random() * (top + 1));
tmp = array[cur];
array[cur] = array[top];
array[top] = tmp;
}
}
}


2011/1/13 Juan Pablo Califano califa010.flashcod...@gmail.com

 Try this:

  function uniqueRandomInt(min:Number, max:Number, n:Number) {
  var a:Array = [];
  var i:Number = min;
  while (a.push(i++)max);
  a.sort(function (a:Number, b:Number) {
   return Math.floor(Math.random()*3)-1;

  });
  return a.slice(0,n);
 }

 Although a random sort is not the best means to randomize an array, it
 should work reasonably.

 The problem with your code was this line:

 Math.random()*2-1;

 Your sort function should return 3 diferent values (n  1, n = 0 and; n 
 0) as evenly distributed as possible. Math.random gives you a number that
 is great or equal to 0 and *less* than 1. It will not give you 1 back
 (0.9, but not 1).

 So if you do:

 Math.random() * 2

 You'll either get 0 or 1 (with decimals); it's not posibble to get 2. You
 should instead use 3 as the multiplier and floor it; the result should be 0,
 1 or 2 (this will have as much randomness as Math.random provides). Now
 substract 1 and you'll get -1, 0 or 1, which is what you want for your sort
 function.


 Cheers
 Juan Pablo Califano
 2011/1/13 natalia Vikhtinskaya natavi.m...@gmail.com

 Hi
 I use function that creates unique array

 function uniqueRandomInt(min:Number, max:Number, n:Number) {
var a:Array = [];
var i:Number = min;
while (a.push(i++)max) {
;
}
a.sort(function (a:Number, b:Number) { return
 Math.random()*2-1;});
return a.slice(0, n);
}

 It works fine for AS2. But for AS3 it gives always the same result
 if I ask
 uniqueRandomInt(1, 6, 6); I always get 4,2,3,1,5,6

 What is wrong in this code for AS3?

 Thank you in andvance.
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



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


Re: [Flashcoders] Unique array AS3

2011-01-13 Thread natalia Vikhtinskaya
Thank you very much!! Now it works well.

2011/1/13 Juan Pablo Califano califa010.flashcod...@gmail.com:
 Try this:

 function uniqueRandomInt(min:Number, max:Number, n:Number) {
  var a:Array = [];
  var i:Number = min;
  while (a.push(i++)max);
  a.sort(function (a:Number, b:Number) {
  return Math.floor(Math.random()*3)-1;
  });
  return a.slice(0,n);
 }

 Although a random sort is not the best means to randomize an array, it
 should work reasonably.

 The problem with your code was this line:

 Math.random()*2-1;

 Your sort function should return 3 diferent values (n  1, n = 0 and; n  0)
 as evenly distributed as possible. Math.random gives you a number that
 is great or equal to 0 and *less* than 1. It will not give you 1 back
 (0.9, but not 1).

 So if you do:

 Math.random() * 2

 You'll either get 0 or 1 (with decimals); it's not posibble to get 2. You
 should instead use 3 as the multiplier and floor it; the result should be 0,
 1 or 2 (this will have as much randomness as Math.random provides). Now
 substract 1 and you'll get -1, 0 or 1, which is what you want for your sort
 function.


 Cheers
 Juan Pablo Califano
 2011/1/13 natalia Vikhtinskaya natavi.m...@gmail.com

 Hi
 I use function that creates unique array

 function uniqueRandomInt(min:Number, max:Number, n:Number) {
                        var a:Array = [];
                        var i:Number = min;
                        while (a.push(i++)max) {
                                ;
                        }
                        a.sort(function (a:Number, b:Number) { return
 Math.random()*2-1;});
                        return a.slice(0, n);
                }

 It works fine for AS2. But for AS3 it gives always the same result
 if I ask
 uniqueRandomInt(1, 6, 6); I always get 4,2,3,1,5,6

 What is wrong in this code for AS3?

 Thank you in andvance.
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


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


Re: [Flashcoders] Unique array AS3

2011-01-13 Thread natalia Vikhtinskaya
THANK YOU AGAIN!!!

2011/1/13 Juan Pablo Califano califa010.flashcod...@gmail.com:
 PS:

 I mentioned that a random sort was not the best approach.

 Here's a better way to randomize an array:

 public static function shuffle(array:Array):void {
    var tmp:*;
    var cur:int;
    var top:int;

    cur = top = array.length;
    if(top) {
        while(--top) {
            cur = Math.floor(Math.random() * (top + 1));
            tmp = array[cur];
            array[cur] = array[top];
            array[top] = tmp;
        }
    }
 }


 2011/1/13 Juan Pablo Califano califa010.flashcod...@gmail.com

 Try this:

  function uniqueRandomInt(min:Number, max:Number, n:Number) {
  var a:Array = [];
  var i:Number = min;
  while (a.push(i++)max);
  a.sort(function (a:Number, b:Number) {
   return Math.floor(Math.random()*3)-1;

  });
  return a.slice(0,n);
 }

 Although a random sort is not the best means to randomize an array, it
 should work reasonably.

 The problem with your code was this line:

 Math.random()*2-1;

 Your sort function should return 3 diferent values (n  1, n = 0 and; n 
 0) as evenly distributed as possible. Math.random gives you a number that
 is great or equal to 0 and *less* than 1. It will not give you 1 back
 (0.9, but not 1).

 So if you do:

 Math.random() * 2

 You'll either get 0 or 1 (with decimals); it's not posibble to get 2. You
 should instead use 3 as the multiplier and floor it; the result should be 0,
 1 or 2 (this will have as much randomness as Math.random provides). Now
 substract 1 and you'll get -1, 0 or 1, which is what you want for your sort
 function.


 Cheers
 Juan Pablo Califano
 2011/1/13 natalia Vikhtinskaya natavi.m...@gmail.com

 Hi
 I use function that creates unique array

 function uniqueRandomInt(min:Number, max:Number, n:Number) {
                        var a:Array = [];
                        var i:Number = min;
                        while (a.push(i++)max) {
                                ;
                        }
                        a.sort(function (a:Number, b:Number) { return
 Math.random()*2-1;});
                        return a.slice(0, n);
                }

 It works fine for AS2. But for AS3 it gives always the same result
 if I ask
 uniqueRandomInt(1, 6, 6); I always get 4,2,3,1,5,6

 What is wrong in this code for AS3?

 Thank you in andvance.
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



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


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


Re: [Flashcoders] Fullscreen Hardware Acceleration and Video Player Skins

2011-01-13 Thread David Bellerive
That was my first test.

The old FLVPlayback component supports hardware accelerated fullscreen video 
(using the Stage.fullScreenSourceRect property) but does distort the skin. It 
also provides a skinScaleMax property but that's useless since it cuts back on 
the benefits of using the hardware (skinScaleMax uses the software AND the 
hardware, depending on the value).

So I trid shrinking the controls before going to fullscreen in the FLVPlayback 
code. It worked like I expected but the controls are EXTREMELY fuzzy (nothing 
like YouTube and most definitely nothing like the Strobe Media Playback SWF.

So I'm still clueless to this day. It's like one of those things in Flash that 
I just can't seem to figure out.

--- On Thu, 1/13/11, Ben Sand b...@bensand.com wrote:

 From: Ben Sand b...@bensand.com
 Subject: Re: [Flashcoders] Fullscreen Hardware Acceleration and Video Player 
 Skins
 To: Flash Coders List flashcoders@chattyfig.figleaf.com
 Received: Thursday, January 13, 2011, 1:34 AM
 Using youtube, i find the controls
 are distorted, but they don't seem to
 have been blown up as big as the video.
 
 It appears' they've shrunk the controls before they're
 attached and then
 zoomed the whole thing up.
 
 If you can detect the size of the screen and don't mind the
 controls being a
 bit pixelated you could try that.
 
 On 13 January 2011 16:34, David Bellerive david_beller...@yahoo.com
 wrote:
 
  Hi everyone,
 
  This question has been puzzling me forever. How is it
 possible, when you
  build a video player in Flash, to have a fullscreen
 button that sends the
  video in fullscreen mode USING HARDWARE ACCELERATION
 but without distorting
  (scaling) the video player skin with it?
 
  I know it's possible because YouTube does it, and also
 the new Strobe Media
  Playback (and associated Flash Media Playback) does
 it. I think even the
  popular JW player does it.
 
  As far as I know, there's only one method to go into
 fullscreen with
  hardware, which is the Stage.fullScreenSourceRect
 property. And that
  property doesn't seem to allow some display objects to
 use the hardaware
  rendering (like the video itself) and some display
 objects to use software
  rendering (like the skin).
 
  What am I missing? I've looked through the Strobe
 Media Playback code ad
  can't find anything.
 
  Anyone has a clue???
 
 
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 


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


[Flashcoders] from AS2 to AS3

2011-01-13 Thread natalia Vikhtinskaya
I need to convert game from AS2 to AS3. This game has movie clip
“_items” on the stage with frames. Each frame has different mc.
frame 1- has mc “item1”
frame 2- has mc |”item2” …

_items.gotoAndStop(2)
trace(_items.item2) // for AS2 it gives mc
In AS3 it gives none
(it works correctly only _items.gotoAndStop(1); trace(_items.item1))


I need to have variable with reference
var mc:MovieClip=_items.item2

How to solve this situation in AS3?

Thank you in advance.

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


Re: [Flashcoders] from AS2 to AS3

2011-01-13 Thread Deepanjan Das
You may try using getChildByName(instance name); also.

var mc:MovieClip=_items.getChildByName(item2);


-- 
Warm Regards
Deepanjan Das
W: http://deepanjandas.wordpress.com
|| Om Manasamarthadata Shri Aniruddhaya Namah ||

*Think of the environment before printing this email

*


On Thu, Jan 13, 2011 at 9:00 PM, natalia Vikhtinskaya natavi.m...@gmail.com
 wrote:

 I need to convert game from AS2 to AS3. This game has movie clip
 “_items” on the stage with frames. Each frame has different mc.
 frame 1- has mc “item1”
 frame 2- has mc |”item2” …

 _items.gotoAndStop(2)
 trace(_items.item2) // for AS2 it gives mc
 In AS3 it gives none
 (it works correctly only _items.gotoAndStop(1); trace(_items.item1))


 I need to have variable with reference
 var mc:MovieClip=_items.item2

 How to solve this situation in AS3?

 Thank you in advance.

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

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


Re: [Flashcoders] from AS2 to AS3

2011-01-13 Thread Deepanjan Das
Hi,
Is the item2 placed on first frame in item1?

Warm Regards
Deepanjan Das
W: http://deepanjandas.wordpress.com

On Thu, Jan 13, 2011 at 9:15 PM, natalia Vikhtinskaya natavi.m...@gmail.com
 wrote:

 It is still null

 2011/1/13 Deepanjan Das deepanjan@gmail.com:
  You may try using getChildByName(instance name); also.
 
  var mc:MovieClip=_items.getChildByName(item2);
 
 
  --
  Warm Regards
  Deepanjan Das
  W: http://deepanjandas.wordpress.com
  || Om Manasamarthadata Shri Aniruddhaya Namah ||
  Think of the environment before printing this email
 
 
 
  On Thu, Jan 13, 2011 at 9:00 PM, natalia Vikhtinskaya
  natavi.m...@gmail.com wrote:
 
  I need to convert game from AS2 to AS3. This game has movie clip
  “_items” on the stage with frames. Each frame has different mc.
  frame 1- has mc “item1”
  frame 2- has mc |”item2” …
 
  _items.gotoAndStop(2)
  trace(_items.item2) // for AS2 it gives mc
  In AS3 it gives none
  (it works correctly only _items.gotoAndStop(1); trace(_items.item1))
 
 
  I need to have variable with reference
  var mc:MovieClip=_items.item2
 
  How to solve this situation in AS3?
 
  Thank you in advance.
 
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 
 
 
 




-- 
Warm Regards
Deepanjan Das
W: http://deepanjandas.wordpress.com
|| Om Manasamarthadata Shri Aniruddhaya Namah ||

*Think of the environment before printing this email*
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] from AS2 to AS3

2011-01-13 Thread Deepanjan Das
I mean item2 placed in first frame of _item?
DD

On Thu, Jan 13, 2011 at 9:18 PM, Deepanjan Das deepanjan@gmail.comwrote:

 Hi,
 Is the item2 placed on first frame in item1?


 Warm Regards
 Deepanjan Das
 W: http://deepanjandas.wordpress.com

 On Thu, Jan 13, 2011 at 9:15 PM, natalia Vikhtinskaya 
 natavi.m...@gmail.com wrote:

 It is still null

 2011/1/13 Deepanjan Das deepanjan@gmail.com:
  You may try using getChildByName(instance name); also.
 
  var mc:MovieClip=_items.getChildByName(item2);
 
 
  --
  Warm Regards
  Deepanjan Das
  W: http://deepanjandas.wordpress.com
  || Om Manasamarthadata Shri Aniruddhaya Namah ||
  Think of the environment before printing this email
 
 
 
  On Thu, Jan 13, 2011 at 9:00 PM, natalia Vikhtinskaya
  natavi.m...@gmail.com wrote:
 
  I need to convert game from AS2 to AS3. This game has movie clip
  “_items” on the stage with frames. Each frame has different mc.
  frame 1- has mc “item1”
  frame 2- has mc |”item2” …
 
  _items.gotoAndStop(2)
  trace(_items.item2) // for AS2 it gives mc
  In AS3 it gives none
  (it works correctly only _items.gotoAndStop(1); trace(_items.item1))
 
 
  I need to have variable with reference
  var mc:MovieClip=_items.item2
 
  How to solve this situation in AS3?
 
  Thank you in advance.
 
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 
 
 
 




 --
 Warm Regards
 Deepanjan Das
 W: http://deepanjandas.wordpress.com
 || Om Manasamarthadata Shri Aniruddhaya Namah ||

 *Think of the environment before printing this email*




-- 
Warm Regards
Deepanjan Das
W: http://deepanjandas.wordpress.com
|| Om Manasamarthadata Shri Aniruddhaya Namah ||

*Think of the environment before printing this email*
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Unique array AS3

2011-01-13 Thread Juan Pablo Califano
No problem!


2011/1/13 natalia Vikhtinskaya natavi.m...@gmail.com

 THANK YOU AGAIN!!!

 2011/1/13 Juan Pablo Califano califa010.flashcod...@gmail.com:
   PS:
 
  I mentioned that a random sort was not the best approach.
 
  Here's a better way to randomize an array:
 
  public static function shuffle(array:Array):void {
 var tmp:*;
 var cur:int;
 var top:int;
 
 cur = top = array.length;
 if(top) {
 while(--top) {
 cur = Math.floor(Math.random() * (top + 1));
 tmp = array[cur];
 array[cur] = array[top];
 array[top] = tmp;
 }
 }
  }
 
 
  2011/1/13 Juan Pablo Califano califa010.flashcod...@gmail.com
 
  Try this:
 
   function uniqueRandomInt(min:Number, max:Number, n:Number) {
   var a:Array = [];
   var i:Number = min;
   while (a.push(i++)max);
   a.sort(function (a:Number, b:Number) {
return Math.floor(Math.random()*3)-1;
 
   });
   return a.slice(0,n);
  }
 
  Although a random sort is not the best means to randomize an array, it
  should work reasonably.
 
  The problem with your code was this line:
 
  Math.random()*2-1;
 
  Your sort function should return 3 diferent values (n  1, n = 0 and; n
 
  0) as evenly distributed as possible. Math.random gives you a number
 that
  is great or equal to 0 and *less* than 1. It will not give you 1 back
  (0.9, but not 1).
 
  So if you do:
 
  Math.random() * 2
 
  You'll either get 0 or 1 (with decimals); it's not posibble to get 2.
 You
  should instead use 3 as the multiplier and floor it; the result should
 be 0,
  1 or 2 (this will have as much randomness as Math.random provides). Now
  substract 1 and you'll get -1, 0 or 1, which is what you want for your
 sort
  function.
 
 
  Cheers
  Juan Pablo Califano
  2011/1/13 natalia Vikhtinskaya natavi.m...@gmail.com
 
  Hi
  I use function that creates unique array
 
  function uniqueRandomInt(min:Number, max:Number, n:Number) {
 var a:Array = [];
 var i:Number = min;
 while (a.push(i++)max) {
 ;
 }
 a.sort(function (a:Number, b:Number) { return
  Math.random()*2-1;});
 return a.slice(0, n);
 }
 
  It works fine for AS2. But for AS3 it gives always the same result
  if I ask
  uniqueRandomInt(1, 6, 6); I always get 4,2,3,1,5,6
 
  What is wrong in this code for AS3?
 
  Thank you in andvance.
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 
 
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 

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

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


Re: [Flashcoders] from AS2 to AS3

2011-01-13 Thread Deepanjan Das
Thats why you are getting a null value as the time when the script is
executing, the frame 2 of _item is not available.

For this you need to execute the script once you are sure the fame 2 of
_item has loaded.

Warm Regards
Deepanjan Das

On Thu, Jan 13, 2011 at 9:24 PM, natalia Vikhtinskaya natavi.m...@gmail.com
 wrote:

 it placed in frame # 2.

 2011/1/13 Deepanjan Das deepanjan@gmail.com:
  I mean item2 placed in first frame of _item?
  DD
 
  On Thu, Jan 13, 2011 at 9:18 PM, Deepanjan Das deepanjan@gmail.com
  wrote:
 
  Hi,
  Is the item2 placed on first frame in item1?
 
  Warm Regards
  Deepanjan Das
  W: http://deepanjandas.wordpress.com
 
  On Thu, Jan 13, 2011 at 9:15 PM, natalia Vikhtinskaya
  natavi.m...@gmail.com wrote:
 
  It is still null
 
  2011/1/13 Deepanjan Das deepanjan@gmail.com:
   You may try using getChildByName(instance name); also.
  
   var mc:MovieClip=_items.getChildByName(item2);
  
  
   --
   Warm Regards
   Deepanjan Das
   W: http://deepanjandas.wordpress.com
   || Om Manasamarthadata Shri Aniruddhaya Namah ||
   Think of the environment before printing this email
  
  
  
   On Thu, Jan 13, 2011 at 9:00 PM, natalia Vikhtinskaya
   natavi.m...@gmail.com wrote:
  
   I need to convert game from AS2 to AS3. This game has movie clip
   “_items” on the stage with frames. Each frame has different mc.
   frame 1- has mc “item1”
   frame 2- has mc |”item2” …
  
   _items.gotoAndStop(2)
   trace(_items.item2) // for AS2 it gives mc
   In AS3 it gives none
   (it works correctly only _items.gotoAndStop(1); trace(_items.item1))
  
  
   I need to have variable with reference
   var mc:MovieClip=_items.item2
  
   How to solve this situation in AS3?
  
   Thank you in advance.
  
   ___
   Flashcoders mailing list
   Flashcoders@chattyfig.figleaf.com
   http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  
  
  
  
  
 
 
 
  --
  Warm Regards
  Deepanjan Das
  W: http://deepanjandas.wordpress.com
  || Om Manasamarthadata Shri Aniruddhaya Namah ||
  Think of the environment before printing this email
 
 
 
  --
  Warm Regards
  Deepanjan Das
  W: http://deepanjandas.wordpress.com
  || Om Manasamarthadata Shri Aniruddhaya Namah ||
  Think of the environment before printing this email
 




-- 
Warm Regards
Deepanjan Das
W: http://deepanjandas.wordpress.com
|| Om Manasamarthadata Shri Aniruddhaya Namah ||

*Think of the environment before printing this email*
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] from AS2 to AS3

2011-01-13 Thread Deepanjan Das
So you check for null before executing the script:

addEventListener( Event.ENTER_FRAME, onEnterFrameHandler, false, 0, true );
var mc:MovieClip;
function onEnterFrameHandler( event:Event ):void{
 mc=_items.getChildByName(item2);
 if( mc ){
 removeEventListener( Event.ENTER_FRAME, onEnterFrameHandler );
 //do your code here
 }
}


-- 
Warm Regards
Deepanjan Das
W: http://deepanjandas.wordpress.com
|| Om Manasamarthadata Shri Aniruddhaya Namah ||

*Think of the environment before printing this email*




On Thu, Jan 13, 2011 at 10:05 PM, natalia Vikhtinskaya 
natavi.m...@gmail.com wrote:

 Yes I understand. What possible to do?

 2011/1/13 Deepanjan Das deepanjan@gmail.com:
  Thats why you are getting a null value as the time when the script is
  executing, the frame 2 of _item is not available.
 
  For this you need to execute the script once you are sure the fame 2 of
  _item has loaded.
 
  Warm Regards
  Deepanjan Das
 
  On Thu, Jan 13, 2011 at 9:24 PM, natalia Vikhtinskaya
  natavi.m...@gmail.com wrote:
 
  it placed in frame # 2.
 
  2011/1/13 Deepanjan Das deepanjan@gmail.com:
   I mean item2 placed in first frame of _item?
   DD
  
   On Thu, Jan 13, 2011 at 9:18 PM, Deepanjan Das 
 deepanjan@gmail.com
   wrote:
  
   Hi,
   Is the item2 placed on first frame in item1?
  
   Warm Regards
   Deepanjan Das
   W: http://deepanjandas.wordpress.com
  
   On Thu, Jan 13, 2011 at 9:15 PM, natalia Vikhtinskaya
   natavi.m...@gmail.com wrote:
  
   It is still null
  
   2011/1/13 Deepanjan Das deepanjan@gmail.com:
You may try using getChildByName(instance name); also.
   
var mc:MovieClip=_items.getChildByName(item2);
   
   
--
Warm Regards
Deepanjan Das
W: http://deepanjandas.wordpress.com
|| Om Manasamarthadata Shri Aniruddhaya Namah ||
Think of the environment before printing this email
   
   
   
On Thu, Jan 13, 2011 at 9:00 PM, natalia Vikhtinskaya
natavi.m...@gmail.com wrote:
   
I need to convert game from AS2 to AS3. This game has movie clip
“_items” on the stage with frames. Each frame has different mc.
frame 1- has mc “item1”
frame 2- has mc |”item2” …
   
_items.gotoAndStop(2)
trace(_items.item2) // for AS2 it gives mc
In AS3 it gives none
(it works correctly only _items.gotoAndStop(1);
trace(_items.item1))
   
   
I need to have variable with reference
var mc:MovieClip=_items.item2
   
How to solve this situation in AS3?
   
Thank you in advance.
   
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
   
   
   
   
   
  
  
  
   --
   Warm Regards
   Deepanjan Das
   W: http://deepanjandas.wordpress.com
   || Om Manasamarthadata Shri Aniruddhaya Namah ||
   Think of the environment before printing this email
  
  
  
   --
   Warm Regards
   Deepanjan Das
   W: http://deepanjandas.wordpress.com
   || Om Manasamarthadata Shri Aniruddhaya Namah ||
   Think of the environment before printing this email
  
 
 
 
  --
  Warm Regards
  Deepanjan Das
  W: http://deepanjandas.wordpress.com
  || Om Manasamarthadata Shri Aniruddhaya Namah ||
  Think of the environment before printing this email
 

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


[Flashcoders] Subtle XML/Font loading/CSS issue, limited test capabilities - looking for suggestions

2011-01-13 Thread Chris Foster
Folks,

I'm currently working on a large eLearning project... hundreds of static
(ugh!) screens. We're using the Gaia framework with great success.

I've built a CS4 text display component that our designers use (uses
component parameters pointing to external XML, CSS and font files,
displays styled HTML text in the Flash IDE and at runtime). It lets them
lay out screens without needing to create or style the text (we use
HTML-monkeys to build the external XML files holding the text).

Recently a small number of users began reporting an issue that we can't
replicate in-house... The runtime text isn't appearing. I can't
replicate the issue yet.

Our content is usually deployed via a 3rd party hosted LMS to users on
our corporate network, but the recent issue has surfaced with users who
aren't on our corporate network.

Things I've tried (without success) to replicate the issue:
- Matching users' OS and browser (Win7 and IE8)
- Trying other OS and browser combinations (XP, Vista, Firefox, IE7)
- Testing from inside our corporate network
- Using a 3G USB modem to get 'outside our network' and then access the
LMS
- Using 'Charles' to throttle the connection speed down to ridiculous
levels
- Viewing the log in 'Charles' for anything unusual

The SWFObject embed statement is specifying Flash Player 10.0.32.18

If you've got any suggestions about the possible source of the issue, or
other steps you've found useful in isolating and replicating a tricky
issue I'd love to hear them.

Thanks,
Chris
This e-mail, including any attached files, may contain confidential and 
privileged information for the sole use of the intended recipient.  Any review, 
use, distribution, or disclosure by others is strictly prohibited.  If you are 
not the intended recipient (or authorized to receive information for the 
intended recipient), please contact the sender by reply e-mail and delete all 
copies of this message.

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


Re: [Flashcoders] Subtle XML/Font loading/CSS issue, limited test capabilities - looking for suggestions

2011-01-13 Thread Karl DeSaulniers

have you tried embedding your fonts in your css?

this might help in that.
http://fontsquirrel.com/fontface/generator

I use the bulletproof(smiley)

Best,
Karl

Sent from my iPhone

On Jan 13, 2011, at 6:07 PM, Chris Foster cfos...@catalystinteractive.com.au 
 wrote:



Folks,

I'm currently working on a large eLearning project... hundreds of  
static

(ugh!) screens. We're using the Gaia framework with great success.

I've built a CS4 text display component that our designers use (uses
component parameters pointing to external XML, CSS and font files,
displays styled HTML text in the Flash IDE and at runtime). It lets  
them

lay out screens without needing to create or style the text (we use
HTML-monkeys to build the external XML files holding the text).

Recently a small number of users began reporting an issue that we  
can't

replicate in-house... The runtime text isn't appearing. I can't
replicate the issue yet.

Our content is usually deployed via a 3rd party hosted LMS to users on
our corporate network, but the recent issue has surfaced with users  
who

aren't on our corporate network.

Things I've tried (without success) to replicate the issue:
- Matching users' OS and browser (Win7 and IE8)
- Trying other OS and browser combinations (XP, Vista, Firefox, IE7)
- Testing from inside our corporate network
- Using a 3G USB modem to get 'outside our network' and then access  
the

LMS
- Using 'Charles' to throttle the connection speed down to ridiculous
levels
- Viewing the log in 'Charles' for anything unusual

The SWFObject embed statement is specifying Flash Player 10.0.32.18

If you've got any suggestions about the possible source of the  
issue, or

other steps you've found useful in isolating and replicating a tricky
issue I'd love to hear them.

Thanks,
Chris
This e-mail, including any attached files, may contain confidential  
and privileged information for the sole use of the intended  
recipient.  Any review, use, distribution, or disclosure by others  
is strictly prohibited.  If you are not the intended recipient (or  
authorized to receive information for the intended recipient),  
please contact the sender by reply e-mail and delete all copies of  
this message.


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

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


Re: [Flashcoders] Subtle XML/Font loading/CSS issue, limited test capabilities - looking for suggestions

2011-01-13 Thread Karl DeSaulniers

not sure why the double post..
my apologies.


On Jan 13, 2011, at 6:37 PM, Karl DeSaulniers wrote:


have you tried embedding your fonts in your css?

this might help in that.
http://fontsquirrel.com/fontface/generator

I use the bulletproof(smiley)

Best,
Karl

Sent from my iPhone

On Jan 13, 2011, at 6:07 PM, Chris Foster  
cfos...@catalystinteractive.com.au wrote:



Folks,

I'm currently working on a large eLearning project... hundreds of  
static

(ugh!) screens. We're using the Gaia framework with great success.

I've built a CS4 text display component that our designers use (uses
component parameters pointing to external XML, CSS and font files,
displays styled HTML text in the Flash IDE and at runtime). It  
lets them

lay out screens without needing to create or style the text (we use
HTML-monkeys to build the external XML files holding the text).

Recently a small number of users began reporting an issue that we  
can't

replicate in-house... The runtime text isn't appearing. I can't
replicate the issue yet.

Our content is usually deployed via a 3rd party hosted LMS to  
users on
our corporate network, but the recent issue has surfaced with  
users who

aren't on our corporate network.

Things I've tried (without success) to replicate the issue:
- Matching users' OS and browser (Win7 and IE8)
- Trying other OS and browser combinations (XP, Vista, Firefox, IE7)
- Testing from inside our corporate network
- Using a 3G USB modem to get 'outside our network' and then  
access the

LMS
- Using 'Charles' to throttle the connection speed down to ridiculous
levels
- Viewing the log in 'Charles' for anything unusual

The SWFObject embed statement is specifying Flash Player 10.0.32.18

If you've got any suggestions about the possible source of the  
issue, or

other steps you've found useful in isolating and replicating a tricky
issue I'd love to hear them.

Thanks,
Chris
This e-mail, including any attached files, may contain  
confidential and privileged information for the sole use of the  
intended recipient.  Any review, use, distribution, or disclosure  
by others is strictly prohibited.  If you are not the intended  
recipient (or authorized to receive information for the intended  
recipient), please contact the sender by reply e-mail and delete  
all copies of this message.


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

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


Karl DeSaulniers
Design Drumm
http://designdrumm.com

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


RE: [Flashcoders] Subtle XML/Font loading/CSS issue, limited test capabilities - looking for suggestions

2011-01-13 Thread Chris Foster
No, thanks Karl, I haven't tried that...

C:

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl
DeSaulniers
Sent: Friday, 14 January 2011 11:37 AM
To: Flash Coders List
Cc: Flash Coders List
Subject: Re: [Flashcoders] Subtle XML/Font loading/CSS issue,limited
test capabilities - looking for suggestions

have you tried embedding your fonts in your css?

this might help in that.
http://fontsquirrel.com/fontface/generator

I use the bulletproof(smiley)

Best,
Karl

Sent from my iPhone

On Jan 13, 2011, at 6:07 PM, Chris Foster
cfos...@catalystinteractive.com.au 
  wrote:

 Folks,

 I'm currently working on a large eLearning project... hundreds of  
 static
 (ugh!) screens. We're using the Gaia framework with great success.

 I've built a CS4 text display component that our designers use (uses
 component parameters pointing to external XML, CSS and font files,
 displays styled HTML text in the Flash IDE and at runtime). It lets  
 them
 lay out screens without needing to create or style the text (we use
 HTML-monkeys to build the external XML files holding the text).

 Recently a small number of users began reporting an issue that we  
 can't
 replicate in-house... The runtime text isn't appearing. I can't
 replicate the issue yet.

 Our content is usually deployed via a 3rd party hosted LMS to users on
 our corporate network, but the recent issue has surfaced with users  
 who
 aren't on our corporate network.

 Things I've tried (without success) to replicate the issue:
 - Matching users' OS and browser (Win7 and IE8)
 - Trying other OS and browser combinations (XP, Vista, Firefox, IE7)
 - Testing from inside our corporate network
 - Using a 3G USB modem to get 'outside our network' and then access  
 the
 LMS
 - Using 'Charles' to throttle the connection speed down to ridiculous
 levels
 - Viewing the log in 'Charles' for anything unusual

 The SWFObject embed statement is specifying Flash Player 10.0.32.18

 If you've got any suggestions about the possible source of the  
 issue, or
 other steps you've found useful in isolating and replicating a tricky
 issue I'd love to hear them.

 Thanks,
 Chris
 This e-mail, including any attached files, may contain confidential  
 and privileged information for the sole use of the intended  
 recipient.  Any review, use, distribution, or disclosure by others  
 is strictly prohibited.  If you are not the intended recipient (or  
 authorized to receive information for the intended recipient),  
 please contact the sender by reply e-mail and delete all copies of  
 this message.

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

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


[Flashcoders] AIR for Android - video on mobile problem.

2011-01-13 Thread confustic...@gmail.com
Hey folks,

Firstly, would anyone know if there is a list similar to flashcoders
specifically for AIR for Android questions? I wouldn't want to annoy any
flashcoders with my questions if this is the wrong place to ask them. I have
tried out the Adobe forums, but the community there seems quite a bit
smaller.

Secondly, the question which might annoy! I'm trying to build a custom video
player app. Initially I thought it would be a piece of cake (famous last
words) to have the video reach the end, then loop back to the beginning and
pause. In my previous non-mobile efforts, I would've done something like
this:

// on NetStream.Play.Stop

netstream.pause();
netstream.seek(0);

This doesn't work on the mobile, even though the video is fully loaded. I'm
not sure why but my guess is that the mobile's cache is a lot smaller. In
this particular example I'm testing, it seems like once netstream.time goes
past approx 30 seconds (of a 1:45 video, 11MB filesize), you can't seek back
to those first 30 seconds.

This is a real problem for me, as one of the main purposes of the app is
being able to seek all around the video once it's fully loaded. Would anyone
have any pointers on how to deal with this? Is this where something like
Flash Media Server would come in?

Thanks very much,

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


Re: [Flashcoders] AIR for Android - video on mobile problem.

2011-01-13 Thread Dave Watts
 Firstly, would anyone know if there is a list similar to flashcoders
 specifically for AIR for Android questions?

I don't know if there's one just for AIR on Android. But there is a
good AIR list, called AIR-Tight.

http://groups.google.com/group/air-tight?hl=en

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders