haxe

haXe and arrays Dynamic type

Hi, I know it's unlikely but maybe there is someone who knows haXe language. I have a variable of Dynamic type and I know for sure one of it's fields, lets call it an 'a' actually is an array. But when I'm writing var d : Dynamic = getDynamic(); for (t in d.a) { } I get a compilation error on line two, saying 'You can't iterate on a ...

Best way to represent a parameterized enum in C#?

Are there any good solutions to represent a parameterized enum in C# 3.0? I am looking for something like OCaml or haXe has. I can only think of class hierarchy with a simple enum field for easy switching for now, maybe there are better ideas? See Ocaml example below in one of the replies, a haXe code follows: enum Tree { Node(left:...

How to extend default timeout period in flash application?

I have an application written in flash (actually it is written in haXe and run under SHWX but it doesn't matter here). I have a pretty complex task that consumes a lot of CPU power and sometimes executes for more that 15 seconds. If that happens, I've got an error saying 'A script has executed for longer than the default timeout period o...

Web "frameworks" for haXe to deploy in a PHP environment?

Lately I've been taking a look at haXe, to build an application to be deployed to Apache running PHP. Well, while it looks like it might suit my needs (deploying to PHP, but not using an awful language), I haven't found anything to make the actual application development easier than building a traditional non-MVC PHP app. Are there any t...

Neko and haxe.Timer.delayed()

As every haXe developer knows, you could use haxe.Timer.delayed() to delay function call for some time. But this function doesn't exist for neko at all. Is there a way to achieve the same results? ...

Haxe in the field

I had a fresh look at haxe again recently and realized that I had overlooked some of its elegance before. But I guess it lacks some visibility among the developers still. So my question is, does anybody here use it for production? If so, how do you use it? What are the gotchas or difficulties you encounter? Do you recommend it for futur...

scale9Grid in haXe on image imported with swfmill

I'm trying to use scale9Grid in haXe on an image that I imported with swfmill. border = flash.Lib.attach("BorderPic"); border.scale9Grid = new Rectangle(15, 15, 1, 1); The second line generates the following runtime error: ArgumentError: Error #2004: One of the parameters is invalid. at flash.display::DisplayObject/set scale9...

Where's the HXML docs?

I've looked all over the HAXE Flash Command-line compiler website but was unable to find any detailed documentation of the HXML files (scroll down to the "Changing SWF properties" section) which describe the compile. Anybody know of a reference source? Found HXML: -swf MyApp.swf .... Compile to SWF -main MyAppClass .... Entry-point...

Which Flash SWF compiler uses compiler directives?

Any existing Flash SWF compilers that can understand directives like #IF #ENDIF, etc? Some SWF Compilers: (Hopefuls) AS3 Compiler - haXe AS2 Compiler - MTASC Adobe Flex Compiler - Mxmlc C# to SWF Compiler - Debreuil ...

Beginner: Dynamically inserting a frame to a MovieClip in haXe/ActionScript3

Let's say I have a resource file which exports mc1 with 4 frames in it. I would like to create a new MovieClip and insert frames like this: mc2:flash.display.MovieClip = new flash.display.MovieClip() mc1.gotoAndStop(2); mc2.gotoAndStop(1); mc2.currentFrame = mc1.currenctFrame mc1.gotoAndStop(1); mc2.gotoAndStop(2); mc2.currentFrame = m...

haXe: Keyframe animation without frames

I would like to do simple (looping) animation (moving, changing alpha etc) in haXe (flash9). I don't have anything that resembles frames in my library, just single frame assets. Since I am a beginner. I am not necessarily looking for a sophisticated framework. I would be happy with something quick & dirty. Maybe ifs checking the frame (...

Which group messaging technology to use?

I feel a little bit kind of confused — for about 24 hours I have been thinking which group broadcasting technology to use in my project. Basically, what I need is: create groups (by some backend process) broadcast messages by any client (1:N, N:N) (potentially) direct messages (1:1) (important) authenticate/authorize clients with my o...

Can any Flash compiler put scripts on multiple frames?

Can any Flash compiler put specific scripts on specific frames of the Flash movie SWF? Like you can do from within the Flash IDE, just place a script on the required frame using the Timeline panel, and the script gets compiled to that frame of the Flash movie SWF. Eg. script on frame 1 : trace("Reached frame 1"); Eg. script on frame...

param arguments to flash applet, and applet document context

in haxe, how do i pick up param arguments, and how do i find the document context of a flash applet? i'm using actionscript 2 ...

Actionscript 3 vs haXe: Which to chose for new Flash project?

I am in the planning stages of a new Flash game project and was wondering which language would be better to use? I already have a strong understanding of Actionscript 3, and have not worked with haXe yet, but i have read the language reference docs and it seems that haXe has some of the features from my other favorite languages, C# and R...

How to embed and display a png with FlashDevelop, Haxe and Swfmill

I am having trouble getting a png file to display in a simple Flash application I am building using Haxe and FlashDevelop. Step taken Added the png file to my project. Added the png to the library Set the option to embed as a bitmap Set an Id for the object "PlayerBitmap" Verified that the xml generated looks correct I then try to d...

How to make Flash 8 print WYSIWYG

I have an application that requires dynamic, rich-formatted printing of a .swf using Flash print. The contents of the .swf get created dynamically using XML and styled using CSS. Each bit of content (usually html styled text) is added to its own movie clip. The movie clip is then measured and placed on the master page wherever it will f...

How to display autocomplete choices in emacs?

I'm working on autocompletion implementation in emacs for haxe programming language. I already figured out how to obtain list of autocompletions which I wants to present. The list is in format: '((name1 type1 desc1) (name2 type2 desc2) ... I want to display to user list containing text in format "name1 type1" after cursor position ...

Event Handling For Toolbar Using Haxe Targeting Flash

I am creating a simple UI toolbar component in Haxe for use in a Flash game. The toolbar is your general UI style toolbar, it has a background and several buttons. When the buttons are clicked some game action happens. I have a question about the best way to implement events for the toolbars buttons. A parent class will create a toolbar...

Haxe app and Gtk-WARNING on linux servers

Hi! I'm trying a Haxe-compiled solution called FAR (Flash Archiver) created by Edwin Van Rijkom (http://code.google.com/p/vanrijkom-flashlibs/) wich uses a command-line tool for creating compressed archives. When running the FAR tool locally on my ubuntu laptop, everything works fine. When running remotely (terminal as Root) on my Ubunt...