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 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
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
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 =
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
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;
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
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
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,
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
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
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
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
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,
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
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
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,
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:
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
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
20 matches
Mail list logo