Jeff dePascale

Fosfr .8 nearing 300 downloads this month

by Jeff dePascale on Jun.25, 2009, under Flash

Thanks to the recent article at infoq.com, Fosfr is starting to move around the web.  In the past week and a half, downloads of the latest beta have shot through the roof ( for a project that was intnetionally below the radar for a while) and are now approaching 300. I’m glad to see that there are new hands on the codebase out there, and as always I want to make sure everyone is aware that this is a beta release and I am actively taking suggestions from users about what works, what doesnt, and what makes the most/least sense. I have a few code to-do’s left on this project but the bulk of the work to be done is getting the quickstart guides out of the way. The more I know about what is confusing the better, so please let me know!

Thanks for taking the time to check out the framework, get in touch and let me know how it is working out for you.

Leave a Comment more...

Interview on Fosfr at infoq.com

by Jeff dePascale on Jun.08, 2009, under Flash, Open Source

I was recently interviewed by Moxie Zhang of infoq.com about Fosfr, have a read over at:  infoq.com

For those of you reaching my blog from that article, Fosfr is available on google code by clicking the link in the sidebar or following this link: fosfr on googlecode

and documentation is available here: http://www.jeffdepascale.com/documentation/fosfr

All questions and comments are very welcome as this is still a work in progress, please feel free to contact me directly.

Leave a Comment :, more...

Tabulate - new open source project on google code

by Jeff dePascale on Jun.04, 2009, under Flash, Open Source

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.

http://tabulate.googlecode.com

Leave a Comment :, , more...

Using addThis in flash as3 builds

by Jeff dePascale on May.18, 2009, under Flash

This may exist elsewhere, it may not ( I couldn’t find it), but here’s a super simple static class for tying addThis functionality to your flash applications. This is a real basic release that is offered as-is. Currently it only has 5 static constants for the msot popular sites, obviously you can add to that list.

addthis_as3

2 Comments more...

Fosfr .8 BETA released

by Jeff dePascale on May.18, 2009, under Flash, Open Source

Well, it doesn’t have Prequel 1.1 since, well, I haven’t finished it yet :) Sorry! It is coming. In the meantime, I decided it was time to update the release to the substantially more stable .8 release I’ve been sitting on for two months. Documentation and example site will be updated to .8 within 24 hours.

EDIT - Documentation, sample files, and example site have all been released using .8 BETA.

Notable changes include (there were alot of additional small fixes in there too):

  1. loadSubSWF method now contains the parameter ‘deepLink’ as the second parameter. deeplink values throughout fosfr are now arrays, allowing for unlimited depth on deeplink foldering via swfaddress.
  2. new top level method ’setSubLink’, to match up to handleSubLink. Shortcuts to swfaddresshandler.setaddress() method. similarly to handleSubLink, the paramter is an array representing the deeplink folder structure.
  3. SWFfAddressHandler model rebuilt, new methods detailed in documentation.
  4. Custom error and notification handling, with the ability to trap errors to the debug panel. Debug panel highlights errors in red.
  5. new property ‘available’ in both loader classes, specifies that the loader is available for use.
  6. new method in navigation, ‘initialSubload()’. If autosubload is false, call this method instead of loadSubSWF to ensure any stray deeplinks from the intial load are processed through.
  7. JSONHandler bug fixed where the …rest statement was improperly passing values as a single array instead of individual unique parameters.
  8. Changes to tracking package: new property, ‘trackAllMethods’, specifies whether all methods instantiated for tracking receive the tag specified in the ‘track’ method. If true, every method will fire for each tag. If false, only the default (the first) method specified will fire. Using specific methods can now be acheived using the second parameter of the ‘track’ method, ‘forceMethod’. This is a string value from the new ‘TrackingMethods’ class in the tracking package, specifying the name of the method to fire. If trackAllMethods is true, specifying a name here will force only that method to be used.
  9. new flashvars parameter, ‘checkDeeplink’, gets around the ‘#’ issue with SWFAddress links. Addresses can be written instead as ‘http://www.domain.com/?deeplink=subpage/sublink’ and it will be converted on load to: ‘http://www.domain.com/#/subpage/sublink’for proper swfaddress formatting.
  10. Fixed numerous glitches in FosfrLiteSWF.
  11. SubSWF files are now not required and Main/Shell only implementations can now be created. Config files need not include the navigation node in this use case.
  12. Bug fix in SWFAddressHandler, addressed improper handling of ’showProjectInTitle’ property.
  13. Bug fix in SWFAddressHandler addressing false dispatches of an empty array for sublinks when a deeplink is cached on load, subLinks is now defaulted to null at all times.
  14. Bug fix in SWFAddressHandler addressing unrequested dispatch of a change event when sub link is set via setSubLink().
2 Comments :, more...

I’m engaged!

by Jeff dePascale on May.18, 2009, under Flash

It may not be flash news, but you’d better believe I’m telling the world :) Vicky's ring

And now back to our regularly scheduled program…

1 Comment more...

Flashisms: Breaking switch statements within an if block

by Jeff dePascale on Apr.20, 2009, under Flash

This is a first that I’ve seen - a discrepancy between the standard flash player and the debug version of the same release number. Whats more, I’ve tested this on multiple release versions, this appears to be a consistent glitch from at least 9.0.115 through the latest player 10 releases. The error occurs when you place a break within an if block for a switch statement. With a debug player, this executes as expected - if the if statement reads true, the case for the switch statement breaks. If not, the code continues on until it finds the next break, whether it is in the same case statement or further down the switch chain. The problem occurs in the non-debug, standard player releases. These if-block breaks fail. But not only do they fail, the do so silently. And whats worse, this isn’t a passive flash failure, its a critical one - i.e., the failure will cause the flash player to begin performing erratically: subsuquent code blocks may, and do, fail completely. I can say with certainty that gotoAndStop() calls fail for sure as well as loaders. So watch those nested breaks. If you need one, rethink the code block. It simply won’t work consistently in current releases.

Leave a Comment more...

Dynamically referencing classes - getDefinitionByName()

by Jeff dePascale on Apr.07, 2009, under Flash

Referencing classes at runtime may not be an everyday occurence in AS3 development, but I’m running into it more and more these days. There are two things you need to know about. The first is getDefinitionByName(). Located in the flash.utils folder, getDefinitionByName() allows you to refer to classes by their package location and name. Some example code:

var NewClass:Class = getDefinitionByName(”com.classpath.ClassName”) as Class;
var classObject:Object = new NewClass();

From this point you have access to an instance of the class specified in the parameter from the ‘classObject’ variable.

but there’s a problem here - because SWF files are precompiled, you must have the class you are looking to use compiled somewhere within your SWF structure for it to be found at runtime. Otherwise, it will attempt to access something that, as far as that SWF knows, just doesnt exist. The workaround is to include references to ALL of the classes that could possibly dynamically referenced within the SWF to ensure they are compiled and available at runtime. Obviously the negative here is that you will have the added weight of all the classes in your file. An example of how to include those references looks something like this:

First, the class to contain your references:

package {
 

 public class IncludeClasses {
  
  Class1;
 Class2;

}
}

Then, you need to simply refer to that class within your SWF:

 package{

 public class Main{

  IncludeClasses;

  public function Main(){
  }
 } 
}

Simply importing the class won’t work since imports are only compiled if used. Adding a reference to the class like this effectively creates a placeholder without actually compiling the code.

Regarding the file size, I suppose you could create a SWF for each Class, load the SWF, then load the class from that SWF as well, I’ve never come across the need. But it should theoretically work.

Leave a Comment more...

Pardon the dust…

by Jeff dePascale on Mar.25, 2009, under General

After battling Nucleus CMS for a few months, i decided it was time to switch to wordpress.  Please pardon the inconsistencies during the transition.

Leave a Comment more...

VideoEvent.BUFFERING_STATE_ENTERED - workaround

by Jeff dePascale on Mar.24, 2009, under Flash

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!

Leave a Comment : more...