haxe

FlashDevelop and Flash 11 Incubator

大兔子大兔子 提交于 2019-12-06 00:11:58
How can i start coding Flash 11 using ActionScript3 or Haxe with FlashDevelop? Sorry for stupid question, solution was pretty easy. Download Flash 11 Incubator Download FlexSDK 4.5 and extract it somewhere Download flashplayer_inc_playerglobal_022711 Make folder "10.1" inside {FlexSDK}/frameworks/libs/player copy flashplayer_inc_playerglobal_022711.swc into new "10.1" folder and rename file to playerglobal.swc Point FlashDevelop to FlexSDK 4.5 Set Project Target to 10.1 Add this "-swf-version=13" to Additional Compiler Option in project settings window There is no official standalone Flash

Where to put drawable resources for an OpenFL android extension?

☆樱花仙子☆ 提交于 2019-12-05 21:09:03
I am making an android extension for my OpenFL app, which is supposed to show a notification, when I call a function from Haxe. I need to put a drawable icon in my extension project, because a notification requires an icon. However, the Java file extends an "Extension" class, which provides the object - Extension.assetManager (android.content.res.AssetManager) How do I use this to access a drawable similar to R.drawable....? And also where to put drawable resources for the OpenFL android extension? It looks like AssetManager can access files in the "assets" folder, so I suspect what you need

Haxe Custom Metadata to Macro Call

烈酒焚心 提交于 2019-12-05 15:35:42
Let's say that I've created a build macro that can be used like so @:build(macros.SampleMacro.build("arg")) class Main {} Is it possible to convert it into a custom, shorthand metadata? @:samplemacro("arg") class Main {} Any documentation on this? I'm not sure that's possible, but you can make use of the fact that @:autoBuild() metadata works on interfaces. This is often used for "marker interfaces" like this: class Main implements ISampleMacro {} @:autoBuild(macros.SampleMacro.build("arg")) interface ISampleMacro {} However, presumably you want to have a different "arg" per usage, rather than

Extracting Actionscript from .fla file, without Adobe Flash

北城以北 提交于 2019-12-05 14:48:59
Unlike this guy , I'm using MTASC 's Haxe to compile SWF from AS. Considering I don't have Adobe CS, what are our options to extract the action scripts from any FLA file? I mean different versions, like CS4, CS5, etc. Converting older versions to CS5 would also help. CS4 FLA container is Microsoft Structured Storage (like MS Word documents). You can open it with for example FAR Manager or OpenMCDF . Embedded AS3 code can be seen inside the objects in Unicode plaintext. You can open it with a text editor that supports Unicode encoding (2-byte UCS-2 Little Endian, not UTF8), and trim off binary

FlashDevelop — Specify an HXML file?

梦想与她 提交于 2019-12-05 13:19:40
[a continuation of this question] In order to embed resources in a SWF file, I have to add lines to my HXML file. However, since I'm using FlashDevelop, I don't know where to find that. Where should I put stuff I would ordinarily specify in my HXML? kapex There's more detailed help about the projects settings you need in the Haxe wiki . You can use a custom .hxml file to build your project in FlashDevelop. Go to Project -> Properties... . Choose Custom Build as compilation target. Go to the Build tab and insert the following line in the Pre-Build Command Line field (assuming you named your

Pausing code execution in chrome from within JS. Possible?

柔情痞子 提交于 2019-12-05 04:16:15
Can I pause execution from within JS code? I am working on a simple haxe-based debug util, and I want to be able to simulate breakpoints, by calling a util method which will trigger the execution pause. Not sure if this is what you're looking for, but in Chrome (and Firefox if Firebug is installed) you can use the built-in JavaScript debugger statement. This causes the execution to pause, and is effectively like setting a breakpoint. For example, the following would break on every iteration of the loop allowing you to examine the value of i (stupidly simple example): for(var i = 0; i < 10; i++

Create an instance of a class from a string name in Haxe

丶灬走出姿态 提交于 2019-12-05 03:09:22
Let's say i acquire the name of a class that i made as a String . How can i Instantiate the class with the name contained in that string? I I know it will be derived from a certain parent class, but the actual class will vary. Franco Ponticelli var instance : MyClass = Type.createInstance(Type.resolveClass("path.to.MyClass"), []); Few notes: resolveClass() takes the full path (packages included) of the classe you need createInstance() takes as the second argument an array of values that are applied to the constructor. Those values must be in the exact number and must be passed even if they are

Ensure that a Haxe program will run on all platforms

天大地大妈咪最大 提交于 2019-12-04 16:43:41
I plan to write Haxe libraries in a subset of Haxe that will compile to every Haxe target language. Is there any way to verify that a Haxe program will compile to all target languages, and is it possible to do this without manually testing the compiled code on each target platform? For example, is there a way to ensure that the following code is valid on every target platform, without testing it manually on every single platform? class Test { static function main(){ trace("How can I check to see which platforms this program will run on?"); } } EDIT: I have written a compile.hxml file that

Duplicate image with Haxe

自作多情 提交于 2019-12-04 16:37:36
My goal is to make a wide map using only one square image. Using actionscript 3 the solution is to simply make new Bitmap from the Loader: var loader:Loader = new Loader(); loader.load(new URLRequest("xyz.png")); this.addChild(loader); var duplicationBitmap:Bitmap = new Bitmap(Bitmap(loader.content).bitmapData); Unluckily, Haxe API doesn't allow to do that. I can't get bitmapData from loader content… Anyone has a clue? Thanks. The API is the very same, so I guess the problem is how you are trying to cast; try using: var duplicationBitmap= new Bitmap(cast(loader.content, Bitmap).bitmapData);

Haxe: add @:build metadata to all classes in project

非 Y 不嫁゛ 提交于 2019-12-04 14:40:36
Is it possible to apply my type building macro to all classes in a project without modifying their code? I'm trying to implement a debugger based on Haxe macros: basically I inject calls to my function between every expression in every function of the class. Currently I have an interface IDebuggable and only code in classes that implement that interface can be stopped at breakpoints. You can use haxe.macro.Compiler.addGlobalMetadata() for this. This can either be done from an initialization macro or on the command line: --macro addGlobalMetadata('', '@:build(Build.build())') 来源: https:/