Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Flash Tip: Bracket [] Syntax

It's been a while since I've posted any Flash tips. I recon it's
time that changed and I get back to spreading some of that knowledge that's
lofting up there in that big empty space I call a brain. This particular tip
comes from a recent post on the ActionScript.org forums
.
Brackets evaluates the string it contains and resolves a
variable reference for the object preceding the first [. So, for example,
_level0["Rect"]; is the same as _level0.Rect; _level0["Rect"+1]; is the same as
_level0.Rect1;
Arrays rely on this method of variable resolution since
array values are stored in variables whose names are numbers. Normally numbers
are not allowed as variable names because dot syntax cannot properly resolve
variables names starting with numbers as it assumes it to be a number value,
i.e. _level0.3something; screws up because Flash gets to the 3 and thinks the
number 3, not a variable name starting with 3. However, this naming restriction
can be averted using bracket syntax, _level0["3something"]; and in arrays'
cases, is required, someArray[3]. Note that bracket contents do not have to be
strings, though a string representation of the contents is used to resolve the
variable--this through the toString() method.
All variable types in Flash
have a toString method which determines what its value looks like as a string.
For numbers, its just a value conversion of number to string, visually not
really changing at all. Arrays show a string listing of their values separated
by commas and for basic objects, you've probably seen its default as "[object
Object]" in a trace in Flash. Bracket syntax uses this string representation for
evaluation so someArray[3];
is seen as someArray[(3).toString()];
or someArray["3"];
You can use this to your advantage with
other variable types like generic objects. See the following:
myNameObject = new Object();
myNameObject.toString =
func


Ïà¹ØÎĵµ£º

ÿÌìѧһµãflash£¨64£© ²Êɫλͼת»»ºÚ°×ÕÕ

     ½ñÌì¿´ÁËÍâ¹úһƪÎÄÕ£¬¾õµÃºÜÓÐÒâ˼£¬ÓÚÊÇÔÚÕâÀï¼Ç¼һÏ¡£²Êɫͼת»»³ÉºÚ°×ÕÕ¡£ÔÚps ÒªÊǽ«²ÊÉ«µÄͼת»»ºÚ°×Õյķ½Ê½Ö»ÊÇÐèÒª¼òµ¥µÄ¶¯×÷¡£¶øÔÚflash ´¦ÀíÆðÀ´Ò²·Ç³£¼òµ¥¡£
    ÏÈÑ¡ÔñÒ»ÕÅϲ»¶µÄͼƬ£¬È»ºó½øÐд¦Àí¡£ÀýÈçÕâÕÅÕÕƬ£¬Í¼Æ¬ÖеÄÊÇÒ»¸öºÜ²»´íµÄö¦Å®¡£ºÇºÇ
ÏÖÔÚͨ¹ýÒ ......

LINUXÏÂΪffÌí¼Óflash ²å¼þ

Ê×ÏÈ£¬ ÎÒµÄFF°æ±¾ÊÇ3.0.16µÄ£¬´Ó¹ÙÍø£¨http://get.adobe.com/flashplayer/£©ÉÏÏÂÔØ.tar.gz°üºó¡£¡£½âѹ³öÀïÃæµÄÒ»¸ö£ª.soÎļþ
¼þÖ®ºó£¬°Ñ¸ÃÎļþ¸´ÖƵ½/usr/lib/mozillia/pluginsÏ£¬ÖØÆôff¾ÍOKÁË¡£
£¨ÒÔÉÏ·½·¨½ö¹©²Î¿¼£¬ÖÁÉÙÎÒÊÇÕâÑù×öµÄ£¬²¢Çҳɹ¦ÁË£¬£© ......

Ò»¶ÎÍøÒ³ÖвåÈëflashµÄ´úÂë

¾ÙÀý×ÓÈçÏ£º
<<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="400" height="60">
<param name="movie" value="ÄãµÄflash·¾¶" />
<param name="quality" value="high" / ......

FlashÓÎÏ·¿ª·¢ RPGµØͼʵÏÖ

ÓÃFLASH×öRPG£¬ÎÒÔΣ¬ºÇºÇ£¬Ìýµ½Õâ¸ö£¬ºÜ¶àÈË¿ÖÅÂÒªÕâôÈÏΪ¡£²»¹ýFLASHÇ¿´óµÄ½Å±¾¹¦ÄܺͳöÉ«µÄ¶¯»­º¯Êý£¬¸øÎÒFLASH×öRPGÓÎÏ·ÌṩÁË
ºÜºÃµÄÖ§³Ö¡£´Ó½ñÌ쿪ʼ´óÓÞ·Ö2½Ú¿Î³Ì¸ø´ó¼Ò½²Êö×öRPGÓÎÏ·µÄ»ù´¡Ä£ÐÍ¡£ÓÉÓÚ´óÓÞÒ²ÊÇÒ»¸ö²ËÄñ£¬ËùÒÔ´íÎóÖ®´¦£¬»¹Çë¼ûÁ¡£
    ÓÉÓÚFLASH»¹²»ÄÜÖ§³Ö3D£¬ËùÒÔÔÚFLASHµÄÓÎÏ·ÖÐ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ