Posts Tagged 'flash'



About instance metadata in FP 11.6+

To this day, as it seems, the fastest way to load a bunch of zipped assets in FP or AIR app is to load SWF file. This way does not come without problems, however. One of them is that you can’t really unload classes and associated data. E.g. unloadAndStop docs state:

Any visual assets that were loaded with the SWF are unloaded and removed from memory. ActionScript class definitions in the loaded SWF remain in memory, and code in the same application domain as the loaded SWF can access instances of those classes and create new instances.

In other words, you can’t even give your symbol a class name if you are planning to unload it from memory at some point – you have to place symbol instances on the timeline and then use getChildAt to access them as raw DisplayObject-s. To make this situation somewhat better, 11.6 runtime introduced metaData property, so we could add custom data to our symbol instance without creating a class for it.

The catch is that until Flash CC we had zero tooling support for it, and in Flash CC setting instance methadata is pain in the arse. They do not give you any kind of UI to edit the data; instead, they expose these new JSFL APIs. On top of that, setPublishPersistentData call silently fails if you used array data types with setPersistentData (as if set of data types supported by setPersistentData was not limited enough already).

To sum up: if you are going to use this feature, you will have to create your own tools. One way to do that not involving struggling with Flash CC would be to use the library like AS3SWF. I have added PlaceObject4 tag support, and – yes – it does support arbitrary data. Remember that you need SWF version 19 to target FP 11.6 APIs.

Less than two weeks left to enter COLT contest

Last chance :)Just to remind you all, free COLT license + a chance to win some Apple hardware are only available until June 25. So download COLT, make your video, upload to youtube, send us the link. Do it now! While you still can :)

No, seriously. We’re very curious to see what kind of crazy ideas people can come up with. Check out this latest submission going wild with Kinect API and Away3D.

By the way, huge thanks goes to wonderfl.net for spreading the word free of charge:

we love Flash and Web developers community… so we’re gonna show your ads for Free (Masakazu Ohtsuka, KAYAC Inc)

Flash and Web developers, we at Code Orchestra love you too! And we hate when you waste your time compiling stuff. In fact, we hate it so much that next COLT release will build your projects up to 3 times faster (and we are talking both livecoding and production builds here). While these news are relevant to Windows users only, I’m sure there are lots of FlashDevelop users out there who will enjoy faster builds OOTB (if they install my COLT plugin).

How to make ASC2 alchemy SWC compatible with old compiler

Some time ago I tried to use latest Genome2D SWC with Code Orchestra livecoding tool and, like others, failed (at first). The reason was that COLT, being derived from old compiler, fails to parse SWC made with new compiler, if it uses memory opcodes. In theory, there should be no problem, since memory opcodes are already compiled into SWC’s library.swf and old compiler does not have to care about it. In practice, there is a problem in SWC’s catalog.xml:

<script name="" mod="9223372036854775806">
	<def id="avm2.intrinsics.iteration:hasnext"/>
	<def id="avm2.intrinsics.iteration:nextname"/>
	<def id="avm2.intrinsics.iteration:nextvalue"/>
	<def id="avm2.intrinsics.memory:lf32"/>
	<def id="avm2.intrinsics.memory:lf64"/>
	<def id="avm2.intrinsics.memory:li16"/>
	<def id="avm2.intrinsics.memory:li32"/>
	<def id="avm2.intrinsics.memory:li8"/>
	<def id="avm2.intrinsics.memory:sf32"/>
	<def id="avm2.intrinsics.memory:sf64"/>
	<def id="avm2.intrinsics.memory:si16"/>
	<def id="avm2.intrinsics.memory:si32"/>
	<def id="avm2.intrinsics.memory:si8"/>
	<def id="avm2.intrinsics.memory:sxi1"/>
	<def id="avm2.intrinsics.memory:sxi16"/>
	<def id="avm2.intrinsics.memory:sxi8"/>
	<dep id="Number" type="s"/>
	<dep id="int" type="s"/>
</script>

The solution is to remove any mentions of avm2.intrinsics.* from catalog.xml :) SWC continues to work without them for both ASC1 and ASC2. I asked Adobe people why does this garbage has to be there and break compatibility for no reason but got no reply, so I am posting this find as PSA – when some ASC2 SWC suddenly gives you headaches, you will know what to do.

Code Orchestra Livecoding Tool update

Last time I have promised you standalone actionscript livecoding tool “in about a month”, and it was delivered in 1 month and 1 day. If some of you missed the news because I did not write a post about it here – don’t feel bad – because tonight brand new 1.0.1 build is waiting for you to download it :)

Ok, now when we’re past this marketing part, let me continue to the reflection part. What kind of feedback we have received so far, and what can we learn from it?

Bugs

As any complex technology, COLT has to have bugs, and we’re happy to receive your bug reports. If you find bugs we missed, it means you are actually interested in and trying our product :) On our side of it, these bugs get fixed and new builds are uploaded.

But then, some “bugs” we hear about are not actually bugs, but inadequate expectations and failure to understand how COLT works. We are trying to extensively document this stuff, but there is always that user who says “k, I changed the code in enterFrame handler and it works, but then I changed the code in addedToStage handler and nothing happens“. So let me cover here again how does COLT work, real quick:

When you save your code, COLT compiles small swf file with parts that changed since last time; methods in [Live] class are changed to call the code in those small swf files every time.And this is all that COLT does for you. It does not magically know that you want some code to be executed unless your program actually says so. Sigh. This is not rocket science, is it.

Features

Another kind of feedback is that one can’t do that or that in COLT. That’s right. Features take time, and we wanted to release COLT ASAP so you guys could try it not next month but today, and maybe support the development with some warm words and cold cash :) Yet, we listen to you and add the features you want – for example with COLT 1.0.1 you can add new fields and methods to [Live] class! Now isn’t that great. But you know what is even greater?

You can get COLT license for free!

All you have to do is upload COLT demo or tutorial video to youtube before 25th of June. And if your video is really good, you get iPad4. And if your video is REALLY good, you get 15″ MacBook with retina display. Damn, I would record these videos like crazy if I were you :) Get the camera, get crazy idea and get it done, seriously. More here.

Good news for FlashDevelop fans

I have been working on this plugin to make FD work with COLT closer. It exports your FD project to COLT and, when you run that COLT project, sends any compilation errors back to FD. The plugin is WIP, but already does its job and I am working closely with Philippe to improve it. So, try it out, leave feedback on github.

That’s about it for tonight, I think, and hopefully more good stuff will follow next week.

On unity flash add-on

Have you read what Unity guys just said about their flash add-on? Check it out:

We’re thrilled to offer the 260,000 active developers making great games and applications with Unity the opportunity to take advantage of the unprecedented reach of Adobe Flash Player across all major desktop browsers on more than a billion PCs… Unity developers will be able to take advantage of the stunning performance offered by the addition of hardware accelerated graphics rendering through Stage3D in Flash Player.

Oh wait, that was a year ago. Here’s what they actually said:

It’s been quite a while since we took a step back from our work here to give you all an update on how the Adobe Flash Player deployment add-on has been progressing. The good news is that things have been going great! We’ve had the chance to add in a lot of stuff that we initially didn’t think would be possible… We’re extremely proud of the work we’ve done making our engine the most powerful development pathway to Adobe Flash Player.

What, wrong quote again? Well, I guess I suck at quoting. So, let me just put the news in my own words: Unity executives compared costs to develop “the most powerful development pathway to Adobe Flash Player” with add-on sales and decided that it’s time to end it.

Oh yes, at the same time their “own Unity Web Player has seen unprecedented growth in recent months”, so they also decided it is good timing to blame Adobe and suggest everyone to move away from flash. Sounds like good decision to me, I mean it is working for them, right? Just look at all those tweets and posts they got in single day :)

Don't be a parrot


Old stuff

April 2024
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
2930