flash²åÈëÒ³ÃæºóÔÚIEÏÂstageWidthΪ0µÄbug
ÓÃSWFObject£¬½«swfÎļþǶÈëÍøÒ³ºó£¬ÔÚIEä¯ÀÀÆ÷ÖÐÊ×´Îä¯ÀÀÕý³££¬Ë¢Ðºó£¬stageWidth¾ÍΪ0ÁË£¬swfÖлùÓÚstageWidth¶¨Î»µÄÔªËØ£¬¾Í»á´íÂÒ¡£
ת×Ô£¨ljhzzyx 2009-09-24 14:44:20£©
Ê×ÏÈÇø·ÖÒ»ÏÂstageµÄstageWidthºÍwidthÊôÐÔ¡£stage.stageWidthÊÇflash playerµÄ¿í¶È£¬stage.widthÊÇÖ¸stageÀïcontentµÄ¿í¶È£¬Èç¹ûÕâ¸öÎę̀(stage)ÀïʲôÄÚÈݶ¼Ã»ÓУ¬stage.width¾ÍÊÇ0¡£
ÏÖÔÚµÄÐèÇóÊÇÔÚÔËÐÐÆÚ»ñµÃÎę̀µÄ¸ß¿í£¬ÒÔÆÚ±àÂëʵÏÖ½«×é¼þÌí¼Óµ½Îę̀ÖÐÑëµÈÕâÑùµÄЧ¹û¡£µ«ÊÇÎҵõ½µÄstageWidth ºÍ stageHeight ¶¼Îª0¡£
¶ÔÓÚij¸öÎÊÌ⣬ÀÏÍâµÄ½âÊÍ×ÜÊǺÜÏ꾡£ºhttp://hubflanger.com/stage-resize-and-the-stagewidth-and-stageheight-properties/
Turns out that when the stage is initialized, it's stageWidth and stageHeight properties are 0 until a Stage RESIZE event is triggered. This event is dispatched when the scaleMode property of the Stage object is set to StageScaleMode.NO_SCALE and the SWF file is resized ie. when the stage is rendered by the Flash Player. So if you need to add a display object onto the stage and its positioning is dependent on the stageWidth or stageHeight properties at runtime, it’s best handled by a listener that is subscribed to the Stage RESIZE event.
ÔÚIEÖÐSWFÎļþµÄstageWidth ºÍ stageHeight ±»³õʼ»¯Îª0£¬ÔÙÑÓ³ÙÒ»¶Îʱ¼äºó»á¸üгÉÕýÈ·µÄÊýÖµ¡£ÔÚSWFÎļþ¸üÐÂstageWidth ºÍ stageHeightÊôÐÔʱ£¬»á´¥·¢stage¶ÔÏóµÄresizeʼþ¡£Òò´Ë£¬ ¿ÉÒÔ¸østageÌí¼Óresizeʼþ´¦ÀíÆ÷£¬½«È¡µÃstageWidth ºÍ stageHeightÖµ¼°ºóÐø¹¤×÷·ÅÔÚresize´¦Àíº¯ÊýÀï×ö£¬Ò»µ©stageWidth ºÍ stageHeightÖµ´óÓÚ0£¬Ôò½«´Ëresize¼àÌýÆ÷È¡Ïûµô¡£
Interestingly, despite universal claim that the Flash Player behaves exactly the same on all browsers, this problem only appears in a couple of browser/plugin configurations, namely FireFox/OSX and IE/Win. And strangely, on Safari and Firefox/Win, the RESIZE event is not even dispatched on page load, and neither does the Flash Player register the stageWidth and stageHeight properties as bein
Ïà¹ØÎĵµ£º
ÔÚÖ´ÐÐflashµÄas½Å±¾Ê±£¬³öÏÖÁË15Ã볬ʱ´íÎ󡣲鿴adobe¹ÙÍøÎĵµÓÐÏà¹ØÃèÊö
http://help.adobe.com/zh_CN/AS3LCR/Flash_10.0/runtimeErrors.html
³öÏÖ15Ã볬ʱ´íÎóºó£¬½Å±¾¿ÉÒÔ¼ÌÐøÖ´ÐÐ 15 Ã룬Ȼºó½«ÖÕÖ¹½Å±¾²¢Òý·¢±àºÅΪ 1503 µÄÔËÐÐʱ´íÎ󣨽ű¾ÔÚ 30 ÃëÄÚδÄÜÍ˳ö£¬ÖÕÖ¹ÆäÖ´ÐУ©¡£
Ó¦Óñ³¾°£º ÔÚflashÖÐÓÐÒ»°´Å¥£¬Ôö ......
ÀûÓÃas3£¬ÎÒÃÇ¿ÉÒÔ³¢ÊÔÖÆ×÷һЩÓÐȤµÄ×é¼þ£¬ËäÈ»ÏÖÔÚÒѾÓкܶàʵÓõÄ×é¼þ£¬µ«ÊÇ×Ô¼º³¢ÊÔдһÏÂÒ²ÊDz»´íµÄ¡£ÀûÓÃas3Óï·¨£¬½èÓÃÁË»æͼApiÎÒÃdz¢ÊÔÖÆ×÷Ò»ÏÂÕâ¸ö×é¼þ¡£ÒòΪÎÒÃDz»ÐèÒªºÜÇ¿´óµÄ¹¦ÄÜ£¬¶Ô´ËÎÒÃÇÖ»ÊÇÐèҪѡȡÆäÒ»²¿·Ö¾Í¿ÉÒÔ¡£
Ê×ÏÈ,ÎÒÃÇËùÐèµÄÖÆ×÷Á½¸öͼÐΣ¬Ò»¸öÊÇÍ϶¯µÄ·½¿é£¬Ò»¸öÊǵ×ͼƬ¡£¶ÔÓÚÕâÁ ......
VBÏÔʾ͸Ã÷FLASHЧ¹û
ÑÝʾЧ¹û£º
´úÂëÈçÏ£º
¹«¹²ÉùÃ÷ÇøÓò
Option Explicit
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetW ......
̸̸Flash MMORPGµÄµØͼ¼¼Êõ
ÔÚ¿ª·¢»ùÓÚÍøÒ³µÄFlash MMORPGÓÎϷʱ£¬µØͼ¼¼ÊõÍùÍùÊÇ×îÏȱ»Ìá¼°µÄ¡£Íæ¼ÒµÄ´ó²¿·ÖÓÎϷʱ¼ä¶¼ÊÇÔÚµØͼÉ϶ȹýµÄ£¬ÈçºÎʵÏÖÃÀ¹Û¸ßЧµÄµØͼЧ¹û£¬ÊÇÿ¸ö¼¼ÊõÈËÔ±¶¼Í·ÌÛ¹ýµÄ¡£¶ÔÓÚÏÖÔÚµÄ2DÓÎÏ·À´Ëµ£¬Èç½ñµÄCPU/ÏÔ¿¨ºÍÄÚ´æÒѾ×㹻ǿ¾¢ÁË£¬Òò´ËºÜÉÙÐè ......
flashbuilderÖпÉÒÔ½¨Á¢flex¹¤³ÌÓëactionscript¹¤³Ì.
flex¹¤³ÌÄÚ¿ÉÒÔʹÓÃmxmlÊÇÍê³ÉÉè¼Æ¹¤×÷.
actionscript¹¤³Ì½¨Á¢Ê±Ä¬ÈÏÖ»ÓÐ:
playerglobal.swc
flex.swc
utilities.sec
playerglobal.swc
Õ⼸¸öÀà¿â.ûÓÐframework.swc,¾ÍÎÞ·¨Ê¹ÓÃButtonµÈ¿Ø¼þÁË.
½â¾ö·½°¸ÊÇ actionscript¹¤³ÌÖмÓÈëframework.swc.
·¾¶ÊÇ x:/A ......