AS3 classes with flex instead of flash
Up to Flash
anel x="83" y="112" width="250" height="200" layout="absolute"
mx:CheckBox x="70" y="60" label="Checkbox" id="checkbox"/
/mx
anel
/mx:Application
you can download the latest version of flex builder 3 (beta) for free at adobe labs
i hope you have enough information to help me out.
also i was looking around the website for the xml diagram that is being used to let actionscript talk to the mchelper xml server. but i couldnt find it
is there any chance it could be posted? so i can try and fiddle around to try and get a simple xml connection up.
thanks in advance
you you can help me out
You don't need to use MXML to run a flash application through flex.
1. Simply go File->New->Actionscript Project.
2. Then, press next.
3. Then, in the Source Path tab, press Add Folder... and browse to your library.
4. To create new classes within the Actionscript Project, go File->New->Actionscript Class
I just got my controller a few hours ago. I still haven't tested with flex yet.
*UPDATE*
Works perfect with flex. Just tested it.
However, you do get Warning messages indicating the lack of type declaration in the Make Kit Controller classes. This can be ignored.
I guess this is something that should be updated, as it would be more proficient.
public function init():void{
mcflash.connect()
mcflash.setDefaultBoard(myBoard);
mcflash.send("/system/autosend-usb", [1]);
mcflash.send("/system/autosend-interval", [10]);
mcflash.send("/dipswitch/autosend", [1]);
mcflash.addAddressListener("/dipswitch/value",PopMessage);
}
public function PopMessage(event:McEvent):void{
Alert.show("here");
}
Thanks,
Aaron
Steve,
Is there any reason you are using MXML instead of AS3? And are you using Flexbuilder or something else like Flashdevelop. I've cast all the undeclared variable types in the AS3 Libraries because I compile in strict mode, I would be happy to pass those along to you if they are causing your compile errors. If you are willing to use AS3 I'll gladly set up a sample project in Flashdevelop or a simple class that you can compile in Flexbuilder.
Also... Flashdevelop is awesome, way too awesome. You should give it a try, the code completion is fantastic, cuts my AS3 development time by a quarter.
Philip
Hey Steve,
I have flexbuilder alpha for linux, I don't know if the project will be compatible with the standard flexbuilder app for mac or pc. Is it built on eclipse? I have to say... the code completion is absolute garbage compared to Flashdevelop. Flashdevelop automatically parses your classes and creates code completion for them in real time, and code completion doesn't disappear the minute you hit backspace which really drives me CRAZY in flexbuilder. On top of the fact that it just works better, it's lighter, easy to set up, and COMPLETELY free and open source. It might be a bit daunting to set up at first, but It's really not that bad, and I'll be more than happy to help you get it set up. Here's the link to the latest beta release,
http://www.flashdevelop.org/community/viewtopic.php?t=2893
and I'll try to get you something in flexbuilder in the meantime, but I won't be near my linux box until late this evening.
Steve,
I was able to get the on board LED to work with Flexbuilder (V2). I was not able to figure out how to read stuff in, but haven't spent any time on it since my previous post. I'd be happy to send you my code of a simple mxml page that has a working button click, but you must realize I'm a novice agmunst novices.
Aaron

