But Haxe doesn't allow default value it seems. How can I do this? My real enum has hundreds of entries and for those with default values I must preserve the values.
Since the dawn of time, man has wished for and invented ways to do enumerations in Flash AS3. There's been various problems with many attempts, such as the ability to use a constructor to create new types of the enum (insecure). I believe the following is type-safe at compile time, and safe from being able to create new instances of the enum class at runtime. The main issue surrounds the inability in AS3 to have a private constructor. In this example, the constructor can only succeed if passed the private static const variable ENFORCER, which is only visible inside of the class.
In a project that I'm working on, I have to be able to read input data from a serial port. The input data will be very simplistic in nature. I'm guessing more like a on/off, yes/no, true/false style of operation.I have found some examples in other languages, but nothing in AS3 or AS2. Could anyone send any sample code or a link to a tutorial that gives me some lead way on this? Which approach is better, going with a Flash projector piece, or building it in AIR? The final piece will be on a PC based system.
I am mostly intersted in modyfing the components appearance in Flash (CS4) than pulling an swf file which I could include in swf-lib. Right now I am kind of forced to make it via movie clip export it, and build functionality in Haxe.Which as you imagine is not handy and timeconsuming (especially that fl.controls used to work for me very well, I barely had to modify any mechanics, sometimes was just adding functionality).
It is very difficult to find good resources for Haxe informationI have an FLV movie in the same directory as the SWF I am generating. I cannot get the FLV to play. I can get this working in AS but I need to know what I am doing wrong in my Haxe code.
var mc:MovieClip = Lib._root; var connection:NetConnection = new NetConnection(); connection.connect(null);
I am having some trouble figuring out how to overload a function in Flash using haXe. I know that Flash does not allow overloads but can accept function parameters without a type declared, but I am unsure as how to replicate this trick in haXe. EDIT: Since this does not appear to be possible, are there any known tricks that can be used to get around this limitation?
I might be missing something obvious, but how do I reference a property indirectly? E.g in javascript it would be: if(propName in obj) return obj[propName];
How to say the same in haxe? The object in question is Dynamic<String>, flash.display.LoaderInfo.parameters to be specific.
I'm trying to build a simple flash swf with haxe that shows the output of my webcam. I want to swf to be embeddable and the size to be determined in the html. So my html looks like:
This creates the swf file that shows the webcam output but with some big white bands on the right and bottom. I want to make the webcam image to fill all the flash object size.
I went through many links like this,this and this, but not getting good direction to move with. I need to implement some flash content in my iPhone app. good tutorials to move on with the conversion process.
Suppose I am having a flash air iOS app and I need to convert the whole app in objective c for say adding some features like APNS then I have to do some needful. I want to convert the air iOS based app in objective c for same thing and hence need a tool like Haxe.
In haxe I have a DropDownMenu class that extends MovieClip:
class DropDownMenu extends MovieClip { ...
TextFields are added to DropDownMenus (about 50 TextFields total):
// in a loop in DropDownMenu new method addChild(myTextField);
When a DropDownMenu is displayed the items further down are hidden as the menu goes off the bottom of the flash player. How can I make these DropDownMenus scroll?
I've considered doing something on the rollout mouse event. However I imagine MovieClip provides some mechanism for scrolling its contents.
I have a game loop written in Haxe/Flash. For some reason it slows down over time. At first it runs reasonably, but my laptop fan starts spinning up and it gets slower and slower. Why would this happen?
I am having trouble incorporating graphical assets created in Flash with my haXe code.
In the Flash IDE, I've created a symbol with the linkage name "MySprite". I compile this into assets.swf. I know that to use symbols in this .swf from my haXe code, I need to add the following option when using the haxe compiler:
-swf-lib assets.swf
I'd now like to write a class called "MySprite" which is associated with this symbol, like so:
class MySprite extends Sprite { public function new() { // ... } }
Basically, I'd like to achieve something similar to the technique presented in this tutorial:
I'm having some trouble getting Haxe to play audio files in Flash 8.At the top of my hx file, I have:import flash.MovieClip;import flash.Sound;and, within the class itself, I preload a lot of image files along with the names of the audio files.The idea is to do a slideshow with audio content. Basically, display the first slide and play the audio associated with it.Then, once that audio is finished, move on to the next slide and next audio file. I have the slides fading in and out okay but when I tried to add sound, nothing comes out the speakers.The following code is what I'm doing - the sound file associated with audios[0] never starts playing and I'm at a loss as to why.
class Whatever { static var master : MovieClip; static var slides : Array<MovieClip>;
In summary, I think my question is this: How can I force hxcpp to compile haxe code for Flash 8 ? Here's where I'm at. I'm new to haxe, and am trying to get a sample from here: [URL] to compile using hxcpp, in my tests to see how haxe compiled apps work on the iphone. I've gotten other samples to compile fine and put them on the iphone, but when I compile this sample, it complains with things like:
I want to write an application that monitor the USB port, and when something is connected should show the contents of the drive (image viewer) automatically.there is any way to do that with Flex/Flash directly?or i might program another application in C in order to monitor the USB port and then comunicate with the front-end application with sockets?
I installed fms 3.5 and actually am running apache for php in 8080 and want to make this fms service in different port and made it as 8083 while installing,
After installed when am starting fms using
./fmsmgr server fms start
it shows error message and i checked in messages file it gives already that port is used by someone
"Mar 26 03:59:51 u15393552 Adaptor[12576]: Failed to initialize listeners for adaptor admin, FMS is already running or other adaptor admin"
I would like to know if i could download the .swf file the site uses and still be able to access the site from the file? I know this is a little complicated but i'm new here. simply, download site access site servers from computer file.
I'm trying to decipher a pre-existing project and make some modifications as I go.
I have a section of code that starts with creating a new NetConnection and then streaming a media file from an external source. I see in the documentation that you can provide a destination port (via the URL), but is it possible to force Flash to use a specific source port? I couldn't find a clear way to do this in the documentation, but I was curious if anyone else has an alternate method or idea.
FMS and IIS are set up with separate IPs on the same server. Both are configured for port 80 because others, including 1935, are often inaccessible from certain environments. Problem is, the server's behind a router. Port 80 can only be forwarded to either the IP of FMS or that of IIS. Even if the two were on separate machines, I'd still have to deal with this.
I have a very complex social networking system built using the Adobe Flex SDK. Since we are experiencing certain performance issues, I want to move it to a "light-weight" platform, the backend is PHP so its just the UI.
What are my other options if I don't want to use Silverlight ?
I was told I could use AJAX/jQuery, which I am not familiar with - are there any GUI designers available ?What kind of GUI designer can I use to design my UI ?
Basically, Im learning how the socket class works in AS3, seems pretty simple, but I dont know what port to assign in the second connect() parameter, let say I wanna load a image from the web, what should I have to do to figure what port is the right one?
I have a Flash application written in ActionScript 2 that I would like to port to the BlackBerry Playbook. The application is composed of an .swf file and a directory containing a large number of vector images. The path to these images (e.g. imagefolder/icons/icon1.swf) is hard-coded into an application and requires the image directory and the .swf file to be in the same directory.
I've installed the PlayBook SDK and have tried packaging the application with FlashBuilder 4, but I have no experience with this programme and have so far been unsuccessful. I tried placing the application in an SWFLoader component, but I then realised after reading this pdf document that MXML components are not supported. Since the app is written in AS2, I believe it cannot be compiled by Flash Builder. I don't need any any of the AIR features so I was wondering how could I embed the .swf and image directory in a Flash Builder ActionScript project so that it would run on the BlackBerry PlayBook.
Does flash actionscript allow you to contact an arbitrary server on a specific port?I would like to stream some images live from a server using a proprietary protocol.Or does the browser disallow this for security reasons?