actionscript

Get IP address using Action Script?

可紊 提交于 2019-12-22 06:31:02
问题 Is it possible to get client IP address through Flash (swf) Action Script 3 and then pass it to php file to store it in database? 回答1: No need to do it in flash, just do it on your server in php "$ip=@$REMOTE_ADDR;" 回答2: No, the client IP address is not available in ActionScript 3. The recommended approach is to have it reflected by server-side code. See http://www.actionscript.org/forums/showthread.php3?s=&threadid=20123 回答3: function GetUserIP() { var js="function get_userIP(){return java

Does dispatching an event interrupt a function?

白昼怎懂夜的黑 提交于 2019-12-22 05:57:14
问题 Let's say function foo() is executing. Suppose that an external event occurs, for which you have a handler. Will function foo() be interrupted so that the event handler can be executed? What is the order of execution in this situation? 回答1: No, foo() will not be interrupted. Flex is single-threaded, so foo() will continue running. Once foo() finishes and control is returned to the event loop, then the first event in the event queue will be processed. 回答2: This actually can be sorta tricky. I

Why compiling into intermediate code?

旧城冷巷雨未停 提交于 2019-12-22 05:41:22
问题 Why do Actionscript, Java, C#, etc. compile into intermediate code? I'm aware of cross-platform benefits of using intermediate code. The question is: What is the benefit of compiling to intermediate code, compared to scripts (JS, Python, PHP, Perl, etc.) that are interpreted? Is it just for code obfuscation? Or what? In addition what is the benefit compared to compiling to native code? 回答1: First of all historically java was targeted to mobiles and embedded devices with very limited CPU

Why compiling into intermediate code?

时光怂恿深爱的人放手 提交于 2019-12-22 05:41:04
问题 Why do Actionscript, Java, C#, etc. compile into intermediate code? I'm aware of cross-platform benefits of using intermediate code. The question is: What is the benefit of compiling to intermediate code, compared to scripts (JS, Python, PHP, Perl, etc.) that are interpreted? Is it just for code obfuscation? Or what? In addition what is the benefit compared to compiling to native code? 回答1: First of all historically java was targeted to mobiles and embedded devices with very limited CPU

Does ExternalInterface work on the file: protocol?

放肆的年华 提交于 2019-12-22 04:38:10
问题 Can anyone confirm that ExternalInterface works on the file: protocol, or point to some docs that say that it will not? 回答1: It's starting to look like this will not work.. this page says: Scripting in either direction between local HTML files and local SWF files--for example, using the ExternalInterface class--requires that both the HTML file and SWF file involved be in the local-trusted sandbox. This is because the local security models for browsers differ from the Flash Player local

Flash/ActionScript: Draw a display object “onto” another

依然范特西╮ 提交于 2019-12-22 01:43:36
问题 How do I properly draw one vector object onto a specific position of another in ActionScript, accounting for positioning, transparency, etc? My idea (as suggested e.g. here) was to use beginBitmapFill () and drawRect () to draw a bitmap copy (made using BitmapData.draw ()) of one MovieClip onto the . graphics property of the other MovieClip, but this proved more difficult than I thought, mainly for these reasons: Transparency is not preserved : where the source MovieClip is transparent, the

Dynamically Creating Flex Components In ActionScript

你说的曾经没有我的故事 提交于 2019-12-22 00:15:24
问题 Isn't there some way to re-write the following code, such that I don't need a gigantic switch statement with every conceivable type? Also, if I can replace the switch statement with some way to dynamically create new controls, then I can make the code smaller, more direct, and don't have to anticipate the possibility of custom control types. Before: <?xml version="1.0" encoding="utf-8"?> <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"> <mx:Script> <![CDATA[

Algorithm to determine Daylight Saving Time of a date?

随声附和 提交于 2019-12-21 23:28:22
问题 Originally I am looking for a solution in Actionscript. The point of this question is the algorithm, which detects the exact Minute, when a clock has to switch the Daylight Saving Time. So for example between the 25th and the 31th of October we have to check, if the actual date is a sunday, it is before or after 2 o'clock... 回答1: There is no real algorithm for dealing with Daylight Saving Time. Basically every country can decide for themselves when -and if- DST starts and ends. The only thing

C# and Flash communication

别来无恙 提交于 2019-12-21 20:44:04
问题 Is there any way for C# to get a list of the methods the swf exposes through ExternaInterface? 回答1: Update: Just realized that I've misread your question as you are looking for methods defined via the Flex ExternalInterface class rather than those of the Shockwave ActiveX control itself; I'm gonna keep my original answer below as it might still be helpful regarding SWF usage via C# in general. Concerning ExternalInterface I don't have an answer right now, but you might look into Fun with C#

Convert powerpoint to flash

血红的双手。 提交于 2019-12-21 20:03:39
问题 How hard is it to import a powerpoint presentation into flash. It would be perfect for me if the output would look like this: every powerpoint slide becomes a movieclip or a .swf file. I don't have any animations and sounds, its just text and images. I know i could save the slides to png but its very bad idea using bitmaps for text in flash. I also cant use programs like slideshare, because they add their own navigation bars and i cant use them offline. 回答1: OpenOffice's Impress has a