<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jeff dePascale &#187; Flash</title>
	<atom:link href="http://www.jeffdepascale.com/index.php/tags/flash/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jeffdepascale.com</link>
	<description>Blogging on and developing web and mobile technologies</description>
	<lastBuildDate>Mon, 12 Apr 2010 18:09:02 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Flash CS5 public beta cancelled by Adobe</title>
		<link>http://www.jeffdepascale.com/index.php/flash/flash-cs5-public-beta-cancelled-by-adobe/</link>
		<comments>http://www.jeffdepascale.com/index.php/flash/flash-cs5-public-beta-cancelled-by-adobe/#comments</comments>
		<pubDate>Thu, 17 Dec 2009 19:10:59 +0000</pubDate>
		<dc:creator>Jeff dePascale</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Mobile Apps]]></category>
		<category><![CDATA[iPhone OS]]></category>
		<category><![CDATA[apps]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[CS5]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://www.jeffdepascale.com/?p=400</guid>
		<description><![CDATA[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.




You subscribed to be notified about the Adobe® Flash® Professional CS5 beta. Therefore, we are contacting [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.jeffdepascale.com/news/wp-content/uploads/2009/12/CS5BetaCancelled.jpg"><img class="alignright size-medium wp-image-401 dtse-img dtse-post-400" title="CS5BetaCancelled" src="http://www.jeffdepascale.com/news/wp-content/uploads/2009/12/CS5BetaCancelled-300x176.jpg" alt="CS5BetaCancelled" width="300" height="176" /></a>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 <a href="http://code.google.com/p/ifosfr">iFosfr</a> rolling before final release. Official statement from Adobe after the break.</p>
<p><span id="more-400"></span></p>
<table border="0" cellspacing="0" cellpadding="0" width="593">
<tbody>
<tr>
<td width="593"><strong>You subscribed to be notified about the Adobe® Flash® Professional CS5 beta. Therefore, we are contacting you with an update.</strong></td>
</tr>
<tr>
<td width="593">Please take note of this important update: Adobe will not be releasing a public beta of Adobe Flash Professional CS5 software. This is a change from the plan we announced in October at Adobe MAX 2009. Since that time, Adobe has seen an unprecedented amount of interest in Flash Professional CS5 and the included Packager for iPhone.The decision not to release a public beta was made to ensure the earliest possible delivery of the final software to the large number of designers and developers interested in Flash Professional CS5 and the included Packager for iPhone.For additional information about this announcement, please visit the <a href="http://direct.adobe.com/r?xPHHvPJEvnTnPEnWWPvq">Flash Platform blog</a>.</p>
<p>The Flash Professional Team</td>
</tr>
</tbody>
</table>



		<!-- Added by WP-DragToShare-eXtended Plugin -->
		<script type="text/javascript">
			dtsv.dtse_post_400_permalink = 'http://www.jeffdepascale.com/index.php/flash/flash-cs5-public-beta-cancelled-by-adobe/';
			dtsv.dtse_post_400_title = 'Flash CS5 public beta cancelled by Adobe';
		</script>
		<!-- End of WP-DragToShare-eXtended Plugin -->]]></content:encoded>
			<wfw:commentRss>http://www.jeffdepascale.com/index.php/flash/flash-cs5-public-beta-cancelled-by-adobe/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New tutorial on CS5 AS3 iPhone dev reveals improvements</title>
		<link>http://www.jeffdepascale.com/index.php/flash/new-tutorial-on-cs5-as3-iphone-dev-reveals-improvements/</link>
		<comments>http://www.jeffdepascale.com/index.php/flash/new-tutorial-on-cs5-as3-iphone-dev-reveals-improvements/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 18:54:16 +0000</pubDate>
		<dc:creator>Jeff dePascale</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Mobile Apps]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[CS5]]></category>

		<guid isPermaLink="false">http://www.jeffdepascale.com/?p=203</guid>
		<description><![CDATA[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.

Perhaps most intriguing is the [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;"><img class="alignright size-full wp-image-224 dtse-img dtse-post-203" title="iPhone and Flash" src="http://www.jeffdepascale.com/news/wp-content/uploads/2009/12/flash-player-iphone.jpg" alt="iPhone and Flash" width="153" height="276" />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:</p>
<p style="text-align: left;"><a href="http://gotoandlearn.com/play?id=116">http://gotoandlearn.com/play?id=116</a></p>
<p style="text-align: left;">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.</p>
<p style="text-align: left;"><span id="more-203"></span></p>
<p style="text-align: left;">Perhaps most intriguing is the hardware accelerated demo at the end of the video, which definitely contradicts the relatively poor performance of some of the demo apps already in the app store, and is impressive versus those case studies that Adobe initially revealed.</p>
<p style="text-align: left;">Even more notably, Adobe has clearly made some substantial headway on the file size bloat issue. 8-9MB base weights were initially stated by Adobe at the MAX announcement, however the test app exported here weighs in at 3.2MB:</p>
<div class="mceTemp mceIEcenter" style="text-align: left;">
<dl id="attachment_204" class="wp-caption     aligncenter" style="width: 267px;">
<dt class="wp-caption-dt"><a href="http://www.jeffdepascale.com/news/wp-content/uploads/2009/12/kWeight.jpg"><img class="size-full wp-image-204" title="iPhone AS3 file size" src="http://www.jeffdepascale.com/news/wp-content/uploads/2009/12/kWeight.jpg" alt="File size as shown in iTunes" width="257" height="55" /></a></dt>
<dd class="wp-caption-dd">File size as shown in iTunes</dd>
</dl>
</div>
<p style="text-align: left;">It should be noted that this is not a final compile for distribution, which could potentially add more weight (only Adobe knows for sure at this point), but it does appear that Adobe has put some effort into fixing that glaring problem. Bearing in mind that apps over 10MB in size require WiFi to download apps over the air to the iPhone, a high base weight poses a significant barrier to entry for end users to install even the simplest of AS3 based apps.</p>
<p style="text-align: left;">Also seen in this tutorial is the new  'flash.sensors' package, part of the 10.1 (and likely future Flash Player 11 release) which gives access to device interactions. In this demo, we see an implementation of the accelerometer class on the iPhone, and Lee does note that this will, as expected, be accessible with other 10.1 enabled mobile devices.</p>
<p style="text-align: left;">Finally, Adobe made it a point at MAX to be very clear about the lengthy compile times for iPhone applications, potentially in the neighborhood of five minutes in length. While this tutorial is for as basic as an app can get, the app demonstrated her takes a mere 38 seconds to compile. Again, this is not a distribution compile, but compile time issues aren't a concern for one-off compiles for distribution. Rather, it's the time suck of test builds that are potential deal breakers. 38 seconds is a promising number, but it remains to be seen what real world app compile times will wind up at when the Flash CS5 beta drops on Adobe Labs, which this tutorial further confirms as on track for the end of this year.</p>
<p style="text-align: left;">Lee's original post on theflashblog.com can be found here:</p>
<p style="text-align: left;"><a href="http://theflashblog.com/?p=1510">http://theflashblog.com/?p=1510</a></p>



		<!-- Added by WP-DragToShare-eXtended Plugin -->
		<script type="text/javascript">
			dtsv.dtse_post_203_permalink = 'http://www.jeffdepascale.com/index.php/flash/new-tutorial-on-cs5-as3-iphone-dev-reveals-improvements/';
			dtsv.dtse_post_203_title = 'New tutorial on CS5 AS3 iPhone dev reveals improvements';
		</script>
		<!-- End of WP-DragToShare-eXtended Plugin -->]]></content:encoded>
			<wfw:commentRss>http://www.jeffdepascale.com/index.php/flash/new-tutorial-on-cs5-as3-iphone-dev-reveals-improvements/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MouseEvent &#8211; relatedObject explained</title>
		<link>http://www.jeffdepascale.com/index.php/flash/mouseevent-relatedobject-explained/</link>
		<comments>http://www.jeffdepascale.com/index.php/flash/mouseevent-relatedobject-explained/#comments</comments>
		<pubDate>Tue, 13 Oct 2009 21:41:46 +0000</pubDate>
		<dc:creator>Jeff dePascale</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[MouseEvent]]></category>

		<guid isPermaLink="false">http://www.jeffdepascale.com/?p=190</guid>
		<description><![CDATA[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 [...]]]></description>
			<content:encoded><![CDATA[<p>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:</p>
<p><span id="more-190"></span></p>
<p>Assuming this event is attached to the object that triggered the rollover popUp, there is an existing method to hide the popup called hidePopUp(),  and a popup named popUp_mc: </p>
<pre>private function eMouseOutHandler(e:MouseEvent):void{
      if(e.relatedObject != popUp_mc) hidePopUp();
}</pre>
<p>In this case, if the cursor is over the popup, it will remain visible. If not, we know that the cursor is not over the popup and it should be hidden. Note that you will now need to case for a mouseOut on the popup itself now, since if the user rolls through the pop up and out it will need to know to hide itself. However, the reverse of the code above will need to be implemented for this mouseOut - if the relatedObject property is the object that received the initial rollover, again we should ignore hiding it since cursor would now be over the object that would have shown the popup in the first place.</p>



		<!-- Added by WP-DragToShare-eXtended Plugin -->
		<script type="text/javascript">
			dtsv.dtse_post_190_permalink = 'http://www.jeffdepascale.com/index.php/flash/mouseevent-relatedobject-explained/';
			dtsv.dtse_post_190_title = 'MouseEvent – relatedObject explained';
		</script>
		<!-- End of WP-DragToShare-eXtended Plugin -->]]></content:encoded>
			<wfw:commentRss>http://www.jeffdepascale.com/index.php/flash/mouseevent-relatedobject-explained/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adobe Flash Professional CS5: Applications for iPhone</title>
		<link>http://www.jeffdepascale.com/index.php/flash/adobe-flash-professional-cs5-applications-for-iphone/</link>
		<comments>http://www.jeffdepascale.com/index.php/flash/adobe-flash-professional-cs5-applications-for-iphone/#comments</comments>
		<pubDate>Mon, 05 Oct 2009 21:05:59 +0000</pubDate>
		<dc:creator>Jeff dePascale</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Mobile Apps]]></category>
		<category><![CDATA[AS3]]></category>

		<guid isPermaLink="false">http://www.jeffdepascale.com/?p=188</guid>
		<description><![CDATA[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.



		
		
			dtsv.dtse_post_188_permalink = 'http://www.jeffdepascale.com/index.php/flash/adobe-flash-professional-cs5-applications-for-iphone/';
			dtsv.dtse_post_188_title = 'Adobe Flash [...]]]></description>
			<content:encoded><![CDATA[<p>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?</p>
<p><a href="http://labs.adobe.com/technologies/flashcs5/appsfor_iphone/">Adobe Labs - Adobe Flash Professional CS5: Applications for iPhone</a>.</p>



		<!-- Added by WP-DragToShare-eXtended Plugin -->
		<script type="text/javascript">
			dtsv.dtse_post_188_permalink = 'http://www.jeffdepascale.com/index.php/flash/adobe-flash-professional-cs5-applications-for-iphone/';
			dtsv.dtse_post_188_title = 'Adobe Flash Professional CS5: Applications for iPhone';
		</script>
		<!-- End of WP-DragToShare-eXtended Plugin -->]]></content:encoded>
			<wfw:commentRss>http://www.jeffdepascale.com/index.php/flash/adobe-flash-professional-cs5-applications-for-iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Managing mutually exclusive overlays and popups efficiently in AS3</title>
		<link>http://www.jeffdepascale.com/index.php/flash/managing-mutually-exclusive-overlays-and-popups-efficiently-in-as3/</link>
		<comments>http://www.jeffdepascale.com/index.php/flash/managing-mutually-exclusive-overlays-and-popups-efficiently-in-as3/#comments</comments>
		<pubDate>Mon, 05 Oct 2009 17:22:46 +0000</pubDate>
		<dc:creator>Jeff dePascale</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[AS3]]></category>

		<guid isPermaLink="false">http://www.jeffdepascale.com/?p=184</guid>
		<description><![CDATA[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:

package  {

 import flash.display.Sprite;

 public class OverlayManager {
  
  private var objArray:Array;
  
  public function OverlayManager() {
   objArray = [];
  }
  
  public function registerOverlay(obj:Sprite):void {
   objArray.push(obj);
   obj.addEventListener(OverlayEvent.CHANGE, eChangeHandler);
  }
  
  private function [...]]]></description>
			<content:encoded><![CDATA[<p>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.</p>
<p>A couple of classes, first one is the manager itself:</p>
<p><span id="more-184"></span></p>
<pre>package  {

 import flash.display.Sprite;

 public class OverlayManager {
  
  private var objArray:Array;
  
  public function OverlayManager() {
   objArray = [];
  }
  
  public function registerOverlay(obj:Sprite):void {
   objArray.push(obj);
   obj.addEventListener(OverlayEvent.CHANGE, eChangeHandler);
  }
  
  private function eChangeHandler(e:OverlayEvent):void {
   for (var i:uint = 0; i &lt; objArray.length; i++) {
    if (objArray[i] != e.object) objArray[i].close();
   }
  }
  
 }
 
}</pre>
<p>Next, our OverlayEvent:</p>
<pre>package  {
 
 import flash.display.Sprite;
 import flash.events.Event;

 public class OverlayEvent extends Event {
  
  public static const CHANGE:String = "change";
  
  private var _object:Sprite;
  
  public function OverlayEvent(type:String, $object:Sprite, bubbles:Boolean=false, cancelable:Boolean=false) {
   super(type, bubbles, cancelable);
   _object = $object;
   
  }
  
  public override function clone():Event {
   return new OverlayEvent(type, object, bubbles, cancelable);
  }
  
  public override function toString():String {
   return formatToString("OverlayEvent", "object", "type", "bubbles", "cancelable", "eventPhase");
  }
  
  public function get object():Sprite { return _object; }
  
 }
 
}</pre>
<p>And finally, an interface:</p>
<pre>package  {

 public interface IOverlayObject {
   
  function close():void;
 }
 
}</pre>
<p>Implementing involves a few quick steps for each object (obviously you'll need at least two for this to do anything). First, the object needs to implement the interface (basically requires a public close method on the object). Next, we need to register the object with the manager itself, and finally, whenever the object is shown, we need to dispatch an OverlayEvent.CHANGE event, passing along a reference to the open object. Example:</p>
<pre>package {

 import flash.display.Sprite;
 import flash.events.MouseEvent;
 

 public class OverlayObject extends Sprite implements IOverlayObject{
  
  public function OverlayObject() {
  }

  
  public function close():void {
   showObject(false);
  }
  
  public function showObject(show:Boolean):void {
   if (show) dispatchEvent(new OverlayEvent(OverlayEvent.CHANGE, this));
   visible = show ? true:false;
  }
  
 }
 
}</pre>



		<!-- Added by WP-DragToShare-eXtended Plugin -->
		<script type="text/javascript">
			dtsv.dtse_post_184_permalink = 'http://www.jeffdepascale.com/index.php/flash/managing-mutually-exclusive-overlays-and-popups-efficiently-in-as3/';
			dtsv.dtse_post_184_title = 'Managing mutually exclusive overlays and popups efficiently in AS3';
		</script>
		<!-- End of WP-DragToShare-eXtended Plugin -->]]></content:encoded>
			<wfw:commentRss>http://www.jeffdepascale.com/index.php/flash/managing-mutually-exclusive-overlays-and-popups-efficiently-in-as3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Is it time to rethink the stage timeline in Flash?</title>
		<link>http://www.jeffdepascale.com/index.php/flash/is-it-time-to-rethink-the-flash-timeline/</link>
		<comments>http://www.jeffdepascale.com/index.php/flash/is-it-time-to-rethink-the-flash-timeline/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 21:57:15 +0000</pubDate>
		<dc:creator>Jeff dePascale</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[timeline]]></category>

		<guid isPermaLink="false">http://www.jeffdepascale.com/?p=166</guid>
		<description><![CDATA[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 [...]]]></description>
			<content:encoded><![CDATA[<p>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.</p>
<p>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.</p>
<p><span id="more-166"></span></p>
<p>Since AS3 first appeared on the scene, the timeline and its ease of use for code have dramatically changed. Granted, most developers (including myself) will say that you should never, ever put code on the timeline, or even worse, after frame one, ever. However, in AS2, you could do it and all would work just fine. Nowadays, timeline code is messy at best, and the undocumented method addFrameScript() is a poor workaround at best. This is largely due to AS3 coming to Flash from Flex first, which is evident looking around the IDE and the language itself, seeing how timeline is really an afterthought in the language.</p>
<p>I'd like to take a second here and point out at this point that I am completely, all for using document classes and not coding in the timeline (or the IDE for that matter) at all, period. It hasn't been a best practice for a long time now and creates headaches that don't need to exist with just a little bit of knowledge about how to properly write a class. I understand the fear of stepping into classes, I've talked to designers who cringe at the thought. But the reality is that a little bit of knowledge will go a long way here.</p>
<p>So my question is this: why, if timeline is an afterthought in the language, is it treated as a top tier item in the IDE? Consider this - you can't create an exclusive Sprite in the IDE (a 1 frame movieclip is technically a sprite, but you can't lock the timeline to only be a sprite by definition). Maybe therein lies the solution I am (and undoubtedly others are) seeking. Really, the timeline could, and should, be a layers panel, just like in photoshop. We don't need additional frames. Why? Because frames are a property of MovieClips. The stage should be a Sprite by default. If you create a MovieClip, the timeline should be an accessible property of the clip within the IDE, with its own interface, building in the power that was added in CS4. But you should not be able to add code to those frames at all. So timelines would strictly be property of the MovieClips themselves within the IDE, just like in the language.</p>
<p>I think the reason we havent seen this yet is twofold: Legacy AS2 users who still use the timeline directly, and the fact that the timeline has become one of the starting points for most users, as well as an identifiable part of the IDE. I see the reasoning, but it weakens the perception of Flash by allowing loopholes for poor practices. This is furthered by the countless tutorials that start with the timeline as step one of using Flash. Take a glance at the newgrounds forums for Flash and you'll see the problem post by post. The language and the IDE need to coexist better as complements to each other, without stepping on each other's toes as much as they do right now.</p>
<p>I think for AS3 projects it's time to lose the timeline rather than force fit it into a language that doesn't really properly support it. There's no reason to. Timeline animations are great, but that's just what they should be - animations. An asset to be referenced and used by code, within AS3 at least. Legacy users are always a consideration, but that doesnt mean you can't force the users of newer technologies to use newer, improved standards. AS3 shouldn't have to support improper code techniques - that's what the support for AS2 in the IDE is for. The addFrameScript() method shouldn't even need to exist in the first place. If Adobe forces everyones hands to fully seperate AS3 code in .as files and animations in the timeline, where they belong, we'll all be better off, and that would be one less knock against Flash as a hack language.</p>
<p>So what do you think? Weigh in in the comments.</p>



		<!-- Added by WP-DragToShare-eXtended Plugin -->
		<script type="text/javascript">
			dtsv.dtse_post_166_permalink = 'http://www.jeffdepascale.com/index.php/flash/is-it-time-to-rethink-the-flash-timeline/';
			dtsv.dtse_post_166_title = 'Is it time to rethink the stage timeline in Flash?';
		</script>
		<!-- End of WP-DragToShare-eXtended Plugin -->]]></content:encoded>
			<wfw:commentRss>http://www.jeffdepascale.com/index.php/flash/is-it-time-to-rethink-the-flash-timeline/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Creating partial package SWC files</title>
		<link>http://www.jeffdepascale.com/index.php/flash/creating-partial-package-swc-files/</link>
		<comments>http://www.jeffdepascale.com/index.php/flash/creating-partial-package-swc-files/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 18:04:20 +0000</pubDate>
		<dc:creator>Jeff dePascale</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[FlashDevelop]]></category>
		<category><![CDATA[Flex SDK]]></category>
		<category><![CDATA[Fosfr]]></category>
		<category><![CDATA[SWC]]></category>

		<guid isPermaLink="false">http://www.jeffdepascale.com/?p=158</guid>
		<description><![CDATA[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. [...]]]></description>
			<content:encoded><![CDATA[<p>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. </p>
<p><span id="more-158"></span></p>
<p>Luckily, it isn't as hard as it seems. For developers, one of the best uses for SWC (Flash builds require a matching SWF file as well) files in flash AS3 dev is packing up pre compiled libraries for use at runtime ( you can also package assets, but that isn't what we are here to talk about). It's pretty straightforward using the export SWC option under publish settings. But what if you need to export only a portion of the package as a SWC/SWF library? </p>
<p>I did some searching, and the few topics I found that mentioned this had replies that questioned the merits of the idea instead of proposing how to go about it. In my case, for Fosfr, I was looking to produce an external library file, but needed to include about 13kb of the entire 50kb package in the core SWF file to properly launch the loading process of the framework, which would then go and get the rest of the library before running any code that needed the full framework library. So there are legitimate cases where you may want to do this. And actually, it can be done.</p>
<p>So, how to go about it? The problem lies in that generating SWC files pulls all classes referenced from your chosen classes along with them into the SWC. so, say you are using TweenLite in your package that you wish to turn into a SWC. Check the SWC afterwards and you'll see that the TweenLite package got sucked in there too. So how can this be avoided? To do it you'll need to use one of the powers of SWC's themselves -compile time class referencing - and one of their usage nuisances - priority of classpaths over SWCs in Flash. </p>
<p>Here's the steps to generate a partial package SWC:</p>
<p>1 - Create an FLA to make a SWC and generate a full SWC of the entire package you wish to generate as a SWC. Dont worry about file size or excess files, this file is for reference. </p>
<p>2 - Take the SWC and place it next to that same FLA (CS3) or in publish setting specify the SWC as an external library (CS4). Now, go back to your class package. Save a backup copy first, then in the package folder, erase all of the classes you'd like to EXCLUDE from the SWC library. </p>
<p>3 - Generate another SWC  (give it a different name). If you did this right, this new SWC will only contain the classes you have left in the package folder. Since the Flash compiler prioritizes classpaths over SWC files, the compiler found the source for those files in the right place, so it placed them in the new SWC. When it got to one it couldnt find, it then searched your external library SWC's, in this case the one holding the whole package and said 'yes, here it is, it compiles and I'm cool with it'. Since it is an external library though, it doesn't pull the class into the new SWC. The result? a partial package SWC and SWF library, containing only the .as files you explicitly wanted contained inside. </p>
<p>This leaves two open ends. </p>
<p>First, you must be positive that you aren't referencing any of the classes you left out before you load in the full library for use (remember proper loader context, ApplicationDomain.currentDomain, to access those classes at runtime). </p>
<p>Second, what about that full library? now you have a full library that has files you've since duplicated in the new smaller SWC. Well, you can, if you wish, reverse the process and go back and use this new smaller SWC as an external lib and remove the classes contained inside from your package, and recompile. What you'll wind up  with is a full package split cleanly between two SWC files. Pretty nifty. It's a fair amount of work, and it should be easier, and maybe it is - if someone has a better solution, please share!</p>



		<!-- Added by WP-DragToShare-eXtended Plugin -->
		<script type="text/javascript">
			dtsv.dtse_post_158_permalink = 'http://www.jeffdepascale.com/index.php/flash/creating-partial-package-swc-files/';
			dtsv.dtse_post_158_title = 'Creating partial package SWC files';
		</script>
		<!-- End of WP-DragToShare-eXtended Plugin -->]]></content:encoded>
			<wfw:commentRss>http://www.jeffdepascale.com/index.php/flash/creating-partial-package-swc-files/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Dispatching custom events between child SWFs in AS3</title>
		<link>http://www.jeffdepascale.com/index.php/flash/dispatching-custom-events-between-child-swfs-in-as3/</link>
		<comments>http://www.jeffdepascale.com/index.php/flash/dispatching-custom-events-between-child-swfs-in-as3/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 19:05:58 +0000</pubDate>
		<dc:creator>Jeff dePascale</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[events]]></category>
		<category><![CDATA[LoaderContext]]></category>

		<guid isPermaLink="false">http://www.jeffdepascale.com/?p=147</guid>
		<description><![CDATA[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 [...]]]></description>
			<content:encoded><![CDATA[<p>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:</p>
<p>a parent SWF</p>
<p>a child SWF, dispatches a custom event</p>
<p>another child swf, nested in either the parent or the other child, listens for that custom event. </p>
<p>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 - <em>and </em>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.</p>
<p>FYI - the fix mentioned in <a href="http://www.jeffdepascale.com/?p=17">my previous post on the subject</a> 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.</p>



		<!-- Added by WP-DragToShare-eXtended Plugin -->
		<script type="text/javascript">
			dtsv.dtse_post_147_permalink = 'http://www.jeffdepascale.com/index.php/flash/dispatching-custom-events-between-child-swfs-in-as3/';
			dtsv.dtse_post_147_title = 'Dispatching custom events between child SWFs in AS3';
		</script>
		<!-- End of WP-DragToShare-eXtended Plugin -->]]></content:encoded>
			<wfw:commentRss>http://www.jeffdepascale.com/index.php/flash/dispatching-custom-events-between-child-swfs-in-as3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tabulate &#8211; new open source project on google code</title>
		<link>http://www.jeffdepascale.com/index.php/opensource/tabulate-new-open-source-project-on-google-code/</link>
		<comments>http://www.jeffdepascale.com/index.php/opensource/tabulate-new-open-source-project-on-google-code/#comments</comments>
		<pubDate>Thu, 04 Jun 2009 15:41:37 +0000</pubDate>
		<dc:creator>Jeff dePascale</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[tabulate]]></category>

		<guid isPermaLink="false">http://www.jeffdepascale.com/?p=109</guid>
		<description><![CDATA[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 [...]]]></description>
			<content:encoded><![CDATA[<p>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.</p>
<p>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.</p>
<p><a href="http://tabulate.googlecode.com">http://tabulate.googlecode.com</a></p>



		<!-- Added by WP-DragToShare-eXtended Plugin -->
		<script type="text/javascript">
			dtsv.dtse_post_109_permalink = 'http://www.jeffdepascale.com/index.php/opensource/tabulate-new-open-source-project-on-google-code/';
			dtsv.dtse_post_109_title = 'Tabulate – new open source project on google code';
		</script>
		<!-- End of WP-DragToShare-eXtended Plugin -->]]></content:encoded>
			<wfw:commentRss>http://www.jeffdepascale.com/index.php/opensource/tabulate-new-open-source-project-on-google-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VideoEvent.BUFFERING_STATE_ENTERED &#8211; workaround</title>
		<link>http://www.jeffdepascale.com/index.php/flash/videoeventbuffering_state_entered-workaround/</link>
		<comments>http://www.jeffdepascale.com/index.php/flash/videoeventbuffering_state_entered-workaround/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 20:10:55 +0000</pubDate>
		<dc:creator>Jeff dePascale</dc:creator>
				<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://jeffdepascale.com/news/?p=3</guid>
		<description><![CDATA[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 [...]]]></description>
			<content:encoded><![CDATA[<p>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.</p>
<p>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.</p>
<p>If someone is aware of a simpler and/or more conclusively effective workaround, please drop a comment!</p>



		<!-- Added by WP-DragToShare-eXtended Plugin -->
		<script type="text/javascript">
			dtsv.dtse_post_3_permalink = 'http://www.jeffdepascale.com/index.php/flash/videoeventbuffering_state_entered-workaround/';
			dtsv.dtse_post_3_title = 'VideoEvent.BUFFERING_STATE_ENTERED – workaround';
		</script>
		<!-- End of WP-DragToShare-eXtended Plugin -->]]></content:encoded>
			<wfw:commentRss>http://www.jeffdepascale.com/index.php/flash/videoeventbuffering_state_entered-workaround/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
