Workers in Apache Flex 4.7 - actionscript-3

has anyone been able to use Workers in AIR Application built with Flex 4.9.1 and AIR 3.7?
I wanted to give it a try for a project, but as soon as I include/setup the worker like in the tutorial made by Lee Brimelow, my Application "freezes". Which means: It does not start. The compiler compiles, I get the info-text in the console, but neither my window opens nor my does any of my events get fired.
Ideas anyone :) ?

Quite simple solution. Simply add
-swf-version=XX //XX must be >=17
as a compiler argument and it works. I think this is a bit weird, since I am using AIR 3.7 but okay, whatever it takes :)

Related

Standalone actionscript interpreter?

I want to to play around with Actionscript, mostly to compare the language with Javascript (I'm interested in the type system). Is there a straightforward way to do that or do I need to also install Flash or something similar? I'd prefer something that works on Linux but Windows-only is fine too.
Basically, I want to know if there is something for Actionscript that is analogous to v8/NodeJS or Rhino for Javascript, where you can run JS scripts directly (using console.log for output) without having to use a browser, create an HTML page, etc.
There is an amazing online tool capable of compiling Actionscript 3.0, this will aid your investigation of the language!
http://wonderfl.net/
As3Eval also is a good tool. Play around with the demo to get a feel for it.
It's windows only, but download Java, then install FlashDevelop : http://www.flashdevelop.org/
It'll download the flex sdk and everything you'll need to get started.
You'll need flash player to see your tests, and normally the debug player (take the standalone), which you can download here: http://www.adobe.com/support/flash player/downloads.html
As #neil says, you can also use wonderfl to test directly online, though obviously the experience won't be the same as a full ide.
You should be able to develop on Linux directly if you want to install flash builder (eclipse) but it's not free

MouseEvent.RIGHT_CLICK is undefined at runtime?

ANSWER To use this and any new features in 11.2, the swf-version needs to be turned all the way up to 15.
My setup:
FlashBuilder 4.6 Build instructions include "-swf-version=13"
Flex SDK version 4.6.0 (build 23201) playerglobal.swc (current one from
Adobe's page,
http://www.adobe.com/support/flashplayer/downloads.html, said to be
11.2 as well)
Standalone debugger projector (11.2.202.228)
Browser flash player plugin (11.2.202.228)
So by my reckoning, I'm up to date in everywhere I should be, to be able to use MouseEvent.RIGHT_CLICK (Adobe Documentation:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/MouseEvent.html#RIGHT_CLICK) but, if I do
I understand that right-click was initially supposed to be AIR only, but that's supposedly changed, which is supported by the fact that it's in the website documentation and in the class definition for MouseEvent,
I want to play around with a few right-click stuff in Flash, but it seems like something's definitely not working correctly. Anyone got an insight as to what's wrong?
I'm a bit confused by some of the comments, so in case it's me poorly explaining what's going on, so here's an example of my code running and compiled, with source attached,
http://www.tymonrovers.com/seaders/asdf.html
SWF Version in build instructions need to be up at 15... as detailed http://helpx.adobe.com/flash-player/release-note/release-notes-developer-flash-player.html#main_authoring_flash_player
Damnit! I know it looks obvious now, but I do think they should probably detail that in the docs as well, they've got the specific versions of the SDKS for AIR and Flash, but not the swf version info, which while it might sound overkill, would certainly solve irritations like this when you forget that one little bit of a tweak you need to do for new features. Ah well, all working now. :/
-swf-version=15

Real time console output in application via trace

Is it somehow possible to output the traces in a deployed application to a display element?
I'm aware of the debug deploy in Flash Builder, but unfortunately I can't convince my iPad to work with that, so a real time trace output in my application would be really great.
Edit: On second thought, a full console output would probably be best. The flash console kostik suggested looks pretty good, so making it display the console output would be ideal.
Highly recomend monsterdebugger and flash-console however sometimes you just need to integration offered by an ide. Flash develop has some nice debugging features however I have come to love Intellij Idea's new features for flash debugging. Here is a peek of some recent gems http://blogs.jetbrains.com/idea/2011/12/features-of-flex-debugger/
http://code.google.com/p/flash-console/

Flash Builder bug?

Irritatingly, Flash Builder refuses to implement any changes I make to the program when I run it. I can't find any documentation of this anywhere online after a brief googling, just wondering if anyone has come across this problem before and/or found a solution? I don't want to have to export a release build every time I want to check if any changes have been implemented successfully (I'm just assuming that'd work)
It happened to me once before but I overcame this problem simply by starting a new project as there wasn't much of any significance, and couldn't easily fix it.
It's pretty much as simple as it sounds tbh, having returned to my computer a couple of hours after leaving it I find any changes to any part of the code have no impact on what is displayed when I go to run...
Any insight would be much appreciated
Thanks
Josh
It could be the cache of your browser. Clear your cache and see if that works..
It could also be because you have classes that are compiled in external swf's. If you compile in Flash Builder, you're not persee recompiling those classes. Instead, compile the external swf which has links to those classes.
You'd think if this were a bug in Flash Builder, people would be complaining about it a bit more often, check that your browser is updating properly, most likely you've got the SWF stuck in your browser cache.
Check the "clear application data on each launch" in Run/Debug Configuration window.
This will clear and uninstall existing app installed in your test device, so every new launch will have clean build.
Tips : Make sure to cmd/ctr + B first, In every run/build.

Flash Builder 4 changes not compiled

Im using Flash Builder 4 on the Mac and I have a worrisome problem: The compiler is sometimes not detecting my code changes.
For example I might write some code, compile and run, then add some logging statements, but they will not print. After a clean compile everything runs as expected.
I cannot see a pattern to the exclusion of changes. I'm wondering if anyone else is having the same problem?
Details:
Flash Bulider 4
Pure AS3 project targetting Flex3.5 SDK
Max OS X Snow Leopard
My code does not use semicolons to terminate statements
The problem is with the SDK settings selected for the Compiler.
Try going to 'Project' > 'Properties' > 'ActionScript Compiler'.
Now, in the 'Flex SDK section', try changing the SDK. Click on 'Apply'.
This will force FB to rebuild all settings for the project.
You can try again. FB should now have started compiling with latest code changes again.
Please Note: This is not a permanent fix though!
In case the problem re-occurs, you'll need to again perform the steps mentioned above to get FB back on track.
As bad as it sounds, I am now used to this behavior, I use FB4 on a Mac , but remember having the same issue with Flex.
Practically, I keep clearing the browser cache and cleaning the project. I have thought about adding some random number after the swf url so that it never gets cached but haven't implemented it yet. Force of habit I guess, clearing the cache & cleaning the project has become such a routine!