Posts in 'Flash'

Flash bugs, continued

ECHT WAA!

The length property does not apply to associative arrays, also known as “Named arrays.” An associative array is really just a generic object with properties. To get the number of items in an associative array, you can use a for…in loop and a counter:


Dus met andere woorden, de .length property bestaat ni bij named artrays (of associative arrays zoals ze zeggen).

Dus:
var test:Array = new Array();
test[0] = "foo";
test[1] = "bar";
trace(test.length);

zal als output 2 geven. MAAR!

var test:Array = new Array();
test['a'] = "foo";
test['b'] = "bar";
trace(test.length);

geeft als output 0. Wtf? Nen uitleg da ik hier vond:

Francis Cheng said on May 2, 2005 at 3:10 PM :

The length property does not apply to associative arrays, also known as “Named arrays.” An associative array is really just a generic object with properties. To get the number of items in an associative array, you can use a for…in loop and a counter:

Hoe komen ze erop. Weer een uur kwijt…

4 commentaren October 21st, 2005

Tijd verliezen

Ik heb zojuist 1 uur en 15 minuten verloren door ne stop();

Als ge in flash in ne movieclip deze_mc een frame hebt met het label foo waarin staat
stop();
trace("yoehoe!");

en ge doet ergens in uw code

deze_mc.gotoAndPlay("foo");
deze_mc.gotoAndPlay("foo");

Dan gaat hij maar ene keer “yoehoe” roepen. Waarom? Dat ik het bijgod ni zou weten. Als het is door die stop() dan zou hij het in the first place al niet mogen doen. Ik ga sebiet nekeer aan wa Flash guru’s vragen hoe da komt, en of da misschie n toevallig genen bug zou kunnen zijn. Het is in elk geval alles behalve logisch.

En ik had al zo weinig tijd tedju!

2 commentaren October 21st, 2005


Kalender

May 2013
M T W T F S S
« Aug    
 12345
6789101112
13141516171819
20212223242526
2728293031  

Posts per Maand

Posts per Categorie