actionscript

How do I launch an EXE from Flash SWF using ActionScript?

我们两清 提交于 2019-12-10 20:12:13
问题 I want my Flash SWF to open an external EXE from the native operating system and I have tried: protected function LaunchExe():void { flash.system.fscommand("exec","Test.exe"); } But nothing happens. Am I doing something wrong with this command or do I need to something entirely differently? 回答1: It works only from within a projector file (executable Flash), and if you are running it like that, the application you are trying to launch should be in a subdirectory called fscommand . From Adobe:

NoClassdefFoundError on thirdparty class files when building Adobe Native Extension

时光总嘲笑我的痴心妄想 提交于 2019-12-10 19:43:02
问题 I am building an Adobe Native extension (ANE) which has third party JAR dependencies. I am making sure that the third party class files are extracted and packaged inside the ANE JAR (as explained in this answer) But when I build the final android APK for my application, these classes are missing in the classes.dex. It seems that ADT is stripping them out somehow. It is worth mentioning that the third party JAR that I am using is built with Java 1.7 and I am using Java 1.6. 回答1: Not sure if

AS3 AIR URLLoader POST

拥有回忆 提交于 2019-12-10 17:49:32
问题 I am developing my first AIR app (moving over from PHP/Javascript) and am at a stage where I want to send some data from the app back to a PHP script on my server. I have the following: var url:String = "PHP URL HERE"; var request:URLRequest = new URLRequest(url); var requestVars:URLVariables = new URLVariables(); requestVars.test = "1234"; request.data = requestVars; request.method = URLRequestMethod.POST; request.contentType = "application/xml;charset=utf-8"; var urlLoader:URLLoader = new

Flash Builder conditional compilation variables

给你一囗甜甜゛ 提交于 2019-12-10 17:44:49
问题 I'm using Flash Builder 4.5 and I'd like to use conditional compilation between my debug and release builds. I understand how to use conditional compilation and how to define compiler constants. What I need is either: A predefined constant set by the IDE between debug and release builds A way to specify different arguments for the compiler between debug and release builds Using ANT is not an option as of now (no time!) and changing the variables by hand every time is just too risky. 回答1: ant

How to make a universal pause button in Flash CS5?

好久不见. 提交于 2019-12-10 17:42:04
问题 I am trying to make a button in Flash that pauses all of the movie clips that are running in my file. None of these movie clips are tweens in my main timeline, they all have their own individual timeline. Each move clip is triggered by a button that tells the clips to start playing. So, if anyone could help me create this pause button, I would greatly appreciate it. Thank you for your time. 回答1: The following should do the trick: // create an array to store all playing movieclips var playing

Flex, how to get week of year for a date?

允我心安 提交于 2019-12-10 17:18:44
问题 I could not find a method in Flex Date object to get the week of year (1 to 52) What is the best way to find this? Is there any useful library for flex for such date operations like JodaTime in Java. 回答1: I'm not aware of a library, but this function will get you the week index (zero based). function getWeek(date:Date):Number { var days:Array = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; var year:Number = date.fullYearUTC; var isLeap:Boolean = (year % 4 == 0) && (year % 100 != 0) ||

.currentFrame in ActionScript 3

北城以北 提交于 2019-12-10 16:39:28
问题 I asked before with a similar problem and received a great answer, so I apologise if this is a little frustrating. Hopefully it will be a quick one. I'm designing an interactive Flash tutorial in an effort to explain a complex biological problem, and I have structured the Timeline so that there are no more than two frames and four layers. I designed this before on the Stage timeline but it became so messy, and with a few problems, that I decided I had to redo it this way. It consist of three

How to list available callbacks exposed by a flash element

微笑、不失礼 提交于 2019-12-10 16:19:48
问题 Is there a way to query an embedded flash element to determine the available methods that can be executed on it via JavaScript? Edit: It appears that in IE it's as simple as for ( i in flashNode ) { alert(i); } After much clicking, they will be some of the very last members enumerated. Still not able to determine this in Firefox though. 回答1: While it is possible to get the callbacks by enumerating the <object> DOM node in IE, they are mixed in with all the other properties of the DOM node and

How to crack EncryptedLocalStore in Adobe Air?

假装没事ソ 提交于 2019-12-10 15:56:54
问题 Assume user Tom installed an Adobe Air app named X, and X stores some secret in EncryptedLocalStore; then Tom wants to crack EncryptedLocalStore (inspect and alter its content), how could he do that? Thanks! 回答1: According to AS3 language reference: The data in the encrypted local store is protected by the user’s operating system account credentials. Other entities cannot access the data in the store unless they can login as that user . However, the data is not secure against access by other

How do you get Polygons from MovieClips in Flash?

 ̄綄美尐妖づ 提交于 2019-12-10 15:24:05
问题 I have an actionscript that reads an swf and goes through movieclips in it. The movie clips should be simple shapes. I want to convert the data in these movieclips to a polygon. In other words, I want a series of coordinates that represent the shapes on the movieclip. 回答1: There's no easy way to do this. Once a shape is drawn to the stage, the only graphical information you can access is the rendered pixel bitmap; all vector information is lost. To transform shapes into polygons, you'll have