Internet Explorer 6 is not supported.
Upgrade to view this site.

Blog Archive

Results for the blog category Flash.

Cyntaxic Framework 0.1.2

The public release of my ActionScript framework is now available. Check out the shiny new site where you can find documentation and a user guide to help you get started. To make it even more simple, the site comes with Boilerplate, a utility that creates either a Flex or pure ActionScript project at a single click of a button.

I really think that the learning curve for this framework is minimal compared to some of the big names out there. I think that this is important for some less experienced programmers and some jobs that just don’t need a giant framework to get it done.

I don’t know how much I’ll be updating this framework, it really depends on the community. If it finds a place out there, then I will add to it and make it better. It also depends on jobs I get where I need to make something in ActionScript. If this framework is suitable for the project, I will probably improve upon it as I see where it needs improvement as I work.

A special thanks to Markus Winkler for taking a look and giving his input. You can check out his site here. You can follow the Cyntaxic framework on Twitter.

Cyntaxic Framework 0.1.1

I just finished up the first public beta release on my ActionScript MVC framework, Cyntaxic. There is going to be a site launch for it coming soon. Right now, the beta can be checked out from my SVN repository. Comments are very welcome. The best place to put those comments is here until the site launch. The documentation can for the framework can be found here. I may make this prettier, or just less Adobe docs looking, but we will see about that for the official site launch.

Also, check out the demos built with Cyntaxic. The Stickies demo is a pure ActionScript application showing off view management and the Cyntils demo is a Flex application displaying the Cyntaxic’s utility classes. The Stickies demo can be checked out from here and the Cyntils demo can be checked out from here.

M is for Bone

It looks like Creative Suite CS5 has amended their zoom keystroke bungle they released with CS4. I wrote a post about it here. They changed the default keystroke of zoom to m (and renamed it Magnify) to make room for a third string tool like the Bone tool. Firstly, bone doesn’t even begin with z, so why would it make sense to transpose those? The keystroke for the Zoom tool is z in every Adobe program, so why was an exception made for Flash? I guess there was a public outcry or Adobe checked their user data and found that everyone changing it back to the way it should be.

AddThis Class For Custom Flash Visualizations

One thing I don’t like about the AddThis API is that it doesn’t give you the ability to get all services to make your own custom visualizations. You can only make a bookmark URL one link at a time. If there was some way to get all the services listed you could loop through them in any programming language and make your own organized listing of all the services and attach the link accordingly. Whether that was a just a scroll box or some kind of crazy over-the-top 3D Flash thing it would be possible with such an API. I suggested this idea of a Supported Services Data API on the AddThis forum. Read more …

OSX Only Allows 8 LocalConnection Instances

While bug hunting I came across this very unusual bug. In a project that I am working on, I am using multiple unique instances of the LocalConnection object to communicate between an AS3 master and an AS2 slave. These LocalConnection instances use a random number to keep them unique, so each time the program is reloaded it makes a new LocalConnection instance. After refreshing the browser exactly 8 times the LocalConnection object stops sending out messages. I remember reading about an 8 connection limit somewhere, but I didn’t connect the dots until right now. These dots suck to connect. Read more …

AddThis Popup Menu in Flash

Continuing on my AddThis journey from last post, I’ve moved away from doing something really custom for the social bookmarking part of this project. My fear as the designer is that a slick functionality is going to take away from the project itself. My fear as the developer is that making something that doesn’t hook up to AddThis’ data will become obsolete and will require updates. So, I decided to do some research on getting the native AddThis popup menus to work with a Flash site. I was kind of leary about it, but I read this post and decided that it might be worth attempting. Read more …

Vimeo Player and the Secret API

I am working on a project that is going to have an API that allows the user to insert video. The API is basically an ActionScript class that attaches a property when the user publishes their SWF. When the SWF is loaded into the main SWF program, it has access to the special functions in the SWF file. First, I just used the FLVPlayback and a registry function so the app would have access to it’s functions. That’s fine, but the user has to host an FLV for this to be effective. Not everyone has a server at their disposal, so this is the reason to build on existing video sites. Also, your not shit as a dev guy unless your mashable Web 2.0 savvy.

Fortunately, the popular sites have APIs out there ready and available to get content and media. A developer is expected to know what they have available to them and what will make the job easier for them. Being in the know about Facebook shit is actually a job requirement.

So, first one I thought of was the giant, YouTube. YouTube’s player is AS2 and to use it in an AS3 project you need to wrap it in an AS3 SWF and use LocalConnection to interface with it. There are a few solutions out there but in the end it is a band aid, until YouTube puts together an alternative player API. After fumbling with this, and saving the failing code to my repository for later, I went to Vimeo.

Vimeo has a pretty cool player and the thing that puts it over the top for my app is that it is written in ActionScript 3. But, as with everything, it isn’t perfect. YouTube has a good API page, and some decent forums, and support of the widespread dev community. Vimeo does not. Their API page is nothing short of pathetic, to say the least. They have one example and it doesn’t work. I found a working example on their fourm. At the top of the API page (as of this posting) they have a blurb that says this: You may have noticed that there are some inaccuracies in this documentation. We working on improving it. How about now? In the time it took to put up that asinine message you could of updated the code. That is annoying. Also, there is no public functions to be seen what so ever. Searching on the forums, someone found play, load and unload, which kind of works like stop. I also needed an event at the end of the video. Pretty standard stuff as far as a video API goes. Looks like I am going to have to Sherlock Holmes this shit. Read more …

Using H.264 Encoding For FLV Files

Today I was asked to fix a problem with an existing website where a FLV was stopping quarter way in its playback. This problem only occurred in IE 7 with Windows Vista. Every other browser seemed to work fine.

First step I took was to isolate the problem. I remade the FLV from source just to see that nothing like a cue point was in there that shouldn’t be. No dice. So I tried another FLV that I knew worked and sure enough it played all the way through. From there I opened Adobe Media Encoder and started getting creative with the encoding settings.

I tried it without audio and it played all the way through. That made sense, because the one that I tested with didn’t have audio either. So the problem was now isolated to an audio problem. Some forums had vaguely familiar sounding fixes, but nothing solid that worked for me. Once again I changed bitrate and channel settings for the FLV sound. No dice. The audio options for FLV are pretty limited and I was running out of things to test for. So I thought about who does this kind of thing successfully all day; they must have a process. I figured that if anyone was encoding things right it was probably YouTube.

I checked YouTube and using this Safari trick grabbed the FLV file that YouTube generates. In my test, the YouTube video worked in IE 7 with Vista. I opened the FLV in QuickTime player. You can only do this if you have a plugin like Perian installed. I checked the movie properties. It was H.264/AAC audio. Even the CS4 Media Encoder can’t make an FLV like that. The options are only Sorenson Spark or On2 VP6. It can make a F4V this way, whatever the hell that is. In any event, that F4V had the settings that I needed, so I encoded one of those. No dice. FLV player wouldn’t play a F4V. The hillbilly in me figured I’ll just change the extension. Why the fuck not? Holy shit, it worked.

So, if you want to make an FLV file that is H.264, just make a F4V file with Adobe Media Encoder and then change the file extension.

M is for Zoom

Despite all the attention that was paid to the CS4 version of Flash, I keep coming across gaps in logic that baffle me. I think this is probably perpetrated by Macromedia legacy staff that are effectively suicide bombing themselves against the usability of the product. Actually, no, it’s probably not even that interesting. It’s just dumb.

So, my gripe is the Flash Zoom tool is now keystroke m by default. The z keystroke is of course now used for the Bind tool. Z is for Bind? M is for Zoom? What kind of alphabet soup are they cooking here? Bind is not even the primary tool in the IK tools. That means you need to click and hold in the toolbar even to see the Bind tool. It’s not worthy of z.

I know they renamed the Zoom tool to the Magnify tool, but that is a weak justification to a senseless change. Yes, you can change this easily in Flash > Keyboard Shortcuts… but that’s not the point. The less I have to change the shortcuts to what makes sense, the faster I can get to work.

Maybe soon I’ll have something nice to say about Flash CS4, because there are some really cool things and some really subtle improvements that are worth mentioning, but I got to get over some of this kind of dip-shittery that has wedged itself in to this version.

TransitionManager Events

I recently used the TransitionManager class to get some ready-made animation in a project I am working on. The problem was I needed to know when the tween ended so I could dispatch an event to tell my application to allow user interfacing again. I checked the Adobe API on TransitionManager and there were no events to respond to be found there. Not even a useful inherited event. So I decided to poke around in the class file itself just to see what was going on in there. In case you don’t know, never edit these classes. They are essentially part of the Flash application. If you need extra functions it’s always better to make a subclass extending the class and write your own methods and properties. That what OOP is all about.

There are 2 events that can be responded to in their without editing the code to do so. The two strings that you can add a listener for are these.

const ALL_TRANSITIONS_IN_DONE:String = "allTransitionsInDone";
const ALL_TRANSITIONS_OUT_DONE:String = "allTransitionsOutDone";

Of course, these events don’t carry any TransitionManager specific properties, it just dispatches the generic Event telling the application that it happened. I don’t know why this wasn’t included in the API, as it is something that is useful for this the implementation of this class. Maybe I’ll get around to writing a TransitionManagerEvent class one day. Until then, this works.

import fl.transitions.*;
import fl.transitions.easing.*;
const ALL_TRANSITIONS_IN_DONE:String = "allTransitionsInDone";
const ALL_TRANSITIONS_OUT_DONE:String = "allTransitionsOutDone";
var currentSlide:Slide = new Slide();
var tm:TransitionManager = new TransitionManager(currentSlide);
tm.startTransition({type:Blinds, direction:Transition.OUT, duration:2, easing:None.easeNone, numStrips:10, dimension:0});
tm.addEventListener(ALL_TRANSITIONS_OUT_DONE, outTransitionsDone);
function outTransitionsDone(event:Event):void

You can get the FLA example file here.