
Featured Post:
Why the iPad’s user agent string presents a problem
Apple marketed the iPad at launch as an internet device designed for the full web. So why then are they explicitly classifying it as a mobile device?Read the story »
Flash CS5 public beta cancelled by Adobe
Well, that was quick. Adobe has pulled the plug on the previously planned for Flash CS5 public beta, initially announced at MAX in October. So much for getting iFosfr rolling before final release. Official statement from Adobe after the break.
New tutorial on CS5 AS3 iPhone dev reveals improvements
Lee Brimelow, noted Flash Evangelist for Adobe, has posted a new tutorial at gotoandlearn.com on developing iPhone apps in the forthcoming Flash CS5 beta:
http://gotoandlearn.com/play?id=116
While the tutorial itself gives a clearer illustration of the development process, what's more interesting are some of the notable details that clarify or improve upon the MAX announcement back in October.
MouseEvent – relatedObject explained
One of those things that isn't immediately clear based on its name, the relatedObject property is a reference to the object that the mouse is now over, and is receiving a MouseEvent.MOUSE_OVER event. This property is valid for both over and out events. This is a really useful property, a typical example is working with mutually exclusive rollovers. if you have a rollover popup that should remain visible if the users cursor rolls into the popup itself, you need to case your mouseOut to only hide the popup if the cursor is not over the popup itself. Here is an example:
Adobe Flash Professional CS5: Applications for iPhone
iPhone + AS3 - didn't see that one coming! So my question to Adobe is - can an AS3 iPhone app be a component of a larger obj-C based app? Or is AS3 content restricted to being solely a standalone app?
Adobe Labs - Adobe Flash Professional CS5: Applications for iPhone.
Managing mutually exclusive overlays and popups efficiently in AS3
Here's a quickie for handling mutiple in-Flash popups or overlays that should all open exclusively (that is, if one is opened, all other should close) within an application in AS3.
A couple of classes, first one is the manager itself:
Is it time to rethink the stage timeline in Flash?
EDIT - I revised the title of this post to clarify my position in response to zool's comment below. The following is NOT an argument against timeline animations, rather, one about where they belong in the modern Flash development flow.
I generally avoid writing editorial articles on my blog, sticking strictly to informational code bits and the like. But as a developer who works closely with designers/devigners, the validity of the Flash timeline in todays development world is a topic I think worth discussing.
Creating partial package SWC files
If you're a Flex developer, SWC's are nothing new to you. But for Flash dev's, SWC files are one of those 'yea I've seen those, but I don't totally understand how, what, or why I'm supposed to use them' things in Flash development. They're incredibly useful - if you know exactly how to use them. Especially in CS3 (CS4 made it a little less painless with the explicit abiliy to specify SWC files as internal or external libraries). Unfortunately, generating them can be even more confusing. there just isn't much documentation, and if you use the flex sdk and/or FlashDevelop, the compc.exe command line options are daunting.
Dispatching custom events between child SWFs in AS3
I've written about this before, but this time around I have an answer to this one. The issue goes a little something like this:
a parent SWF
a child SWF, dispatches a custom event
another child swf, nested in either the parent or the other child, listens for that custom event.
The error you'll receive is a type coercion error that looks like a mistake - can't convert [custom event name] to [custom event name]. So what gives? They're the same class, both SWF files have imported the event class correctly, yet they are colliding through the event dispatch. Well, it turns out it is a security violation due to the way in which the SWF was loaded. Change your loader context to new LoaderContext(false, ApplicationDomain.currentDomain) when loading in those child SWFs and suddenly they can talk to each other more openly than before and type checking correctly returns that all important 'true' - in other words, no coercion error. All of those imported classes match up - and you can even instantiate objects of a type defined in the other child SWF without importing it into your class. To get Flash to export it without referencing it though requires a SWC file for the SWF to reference the classes from (CS4 modified this process a bit with the ability to specify external libs, and Flex has had the same functionality for a while i believe). Colin Moock's Essential Actionscript has a chapter on doing just that, right at the end of the book. If you're interested in that process, he says it better than i ever could.
FYI - the fix mentioned in my previous post on the subject is still valid if you can't/don't want to change the application domain for the loader. Adding the reference to the document class of the top level parent SWF still rectifies the issue.
Tabulate – new open source project on google code
Tabulate is an AS3 tab management package that handles all the oddities of working with tabs - including moving between display objects and text fields as well as components, which typically results in unexpected tab movement. Makes closed looping of tab groups much simpler. Additionally, Tabulate allows you to override the standard focusRect - that yellow, ugly box that pops up when you tab in flash. Make it look like you want it to.
Lots of additional features planned here, including incorporation into Fosfr after the 1.0 release of that. Currently Tabulate is a 1.0 alpha with no docs since it is all likely to change.
VideoEvent.BUFFERING_STATE_ENTERED – workaround
The BUFFERING_STATE_ENTERED event of the FLVPlayback component is designed to notify when the instance reaches its buffer threshold and begins the buffering process. Unfortunately, there is one critical state that fails to be reported by this event. If, during normal playback, the buffering threshold is reached, the video should pause and enter the buffering state until the bufferTime value is met. However, while a pause state is entered, buffering is not. Moreover, the buffering property is still false, and stateResponsive is still true. I would definitely assume that in a buffering state these values should be true and false, respectively. Subsuquently, the only way to discern a buffer initiated pause from a user initiated pause is to track all other pause occurences, and flag them as user initiated by tracking a boolean value. If, when the PAUSED_STATE_ENTERED event is fired, that boolean value is false, then you know that a buffering state has been entered.
This is still problematic, no doubt. going about this method of ensuring you are in a buffering state means you absolutely have to catch all occurences of pauses, whether triggered by the FLVPlayback package or by the user,and flag them, to make sure you have isolated buffering related pauses only. Whats more, this renders the bufferingBar property useless, which is designed to connect a Sprite to buffering events, displaying a custom graphic when buffering. I don't recommend using this anyway as doing so removes the ability to control how and when that visual is displayed, but if you DID decide to use it, the use case discussed above is definitely not caught by the class itself - it simply pauses.
If someone is aware of a simpler and/or more conclusively effective workaround, please drop a comment!



