Flex2ãAS3ã§FileReferenceã®æ»ãå¤ãåãæ¹æ³
Flex2ãæè¿è§¦ã£ã¦ããã®ã§ãããActionScript3ã®FileReferenceã¯ã©ã¹ã®upload()ã¡ã½ããã§ããã¡ã¤ã«ãã¢ãããã¼ãããå¾ã®æ»ãå¤ãåããªãç¾è±¡ã«æ©ãã§ããã¾ããã
ãããªä¸ã解決æ¹æ³ã示ãã¦ãããµã¤ããè¦ã¤ããã®ã§ã¡ã¢ï¼è£è¶³ãã¦ããã¾ãã
New event for AS3: FileReference uploadCompleteData
myFileReference.addEventListener("uploadCompleteData",callbackFunction); myFileReference.upload(new URLRequest(PATH_TO_YOUR_SCRIPT)) function callbackFunction(e:DataEvent):void{ trace(e.data); };
addEventListenerã§"uploadCompleteData"ã¤ãã³ããåå¾ããããã«ãã¦ããã¾ãã
ã¤ãã³ãåå¾æã«å®è¡ããããã¡ã³ã¯ã·ã§ã³ã«ã¯ãDataEventãåã渡ããã¾ããe.dataã§æ»ãå¤ãåãåãã¾ãããXMLãªã©ã®æ»ãå¤ããã¼ã¹ãã¦ä½¿ãã°ãã¹ã ã¼ãºã«ã¤ã³ã¿ã©ã¯ãã£ããªãµã¼ãã¹ãéçºã§ãã¾ãã
ææ°ã®flashplayerã§ãªãã¨ã ãã¿ãããªã®ã§ãã¢ãããã¼ãï¼è¦æ±ããããã«ã½ã¼ã¹ãæ¸ãç´ãã¦ããã¾ãããã