<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    <title>Anna Filina - Programming</title>
    <link>http://annafilina.com/blog/</link>
    <description></description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.1.2 - http://www.s9y.org/</generator>
    <pubDate>Mon, 19 May 2008 02:49:58 GMT</pubDate>

    <image>
        <url>http://annafilina.com/blog/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: Anna Filina - Programming - </title>
        <link>http://annafilina.com/blog/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>codeFest 2.1 Conclusion</title>
    <link>http://annafilina.com/blog/archives/34</link>
            <category>PHP</category>
    
    <comments>http://annafilina.com/blog/archives/34#comments</comments>
    <wfw:comment>http://annafilina.com/blog/wfwcomment.php?cid=34</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://annafilina.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=34</wfw:commentRss>
    

    <author>nospam@example.com (Anna)</author>
    <content:encoded>
    &lt;!-- s9ymdb:9 --&gt;&lt;a href=&quot;http://codefest.ws&quot; &gt;&lt;img width=&#039;200&#039; height=&#039;28&#039; style=&quot;float: left; border: 0px; padding-top: 5px; padding-bottom: 10px; padding-right: 15px;&quot; src=&quot;http://annafilina.com/blog/uploads/codefest_logo.gif&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;The codeFest is now over. It went really well. We had about 20 developers yesterday. It was really productive for most people. Some learned a lot. The event was beneficial to the community.&lt;br /&gt;
&lt;br /&gt;
With Yann Larrivée and Louis-Philippe Huberdeau, I was able to make much progress on the PHP Quebec website (jobs section). The new version should be available in a couple of weeks.&lt;br /&gt;
&lt;br /&gt;
The next codeFest should be somewhere in September. For those who don&#039;t know, the codeFest is a weekend for contributing to Open Source or community projects. People gather with their laptops and spend the weekend coding. It beats working alone at home!&lt;br /&gt;
&lt;br /&gt;
For more information, visit the &lt;a href=&quot;http://codefest.ws&quot; &gt;codeFest website&lt;/a&gt;. 
    </content:encoded>

    <pubDate>Sun, 18 May 2008 20:33:25 -0600</pubDate>
    <guid isPermaLink="false">http://annafilina.com/blog/archives/34</guid>
    
</item>
<item>
    <title>.htaccess on Leopard</title>
    <link>http://annafilina.com/blog/archives/33</link>
            <category>PHP</category>
    
    <comments>http://annafilina.com/blog/archives/33#comments</comments>
    <wfw:comment>http://annafilina.com/blog/wfwcomment.php?cid=33</wfw:comment>

    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://annafilina.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=33</wfw:commentRss>
    

    <author>nospam@example.com (Anna)</author>
    <content:encoded>
    &lt;!-- s9ymdb:10 --&gt;&lt;img width=&#039;149&#039; height=&#039;120&#039; style=&quot;float: left; border: 0px; padding-bottom: 5px; padding-right: 10px;&quot; src=&quot;http://annafilina.com/blog/uploads/leopard_logo.jpg&quot; alt=&quot;&quot; /&gt;After moving my databases and websites to a new Mac with Leopard, none of the websites were working. It was as if mod_rewrite was not working. First, I noticed that the .htaccess files were all ignored. I checked the Apache configuration file in MAMP, and everything seemed fine. After over an hour of going through blogs and forums, I finally get it: Leopard (it&#039;s my first day with it) has its own configuration file in a private folder. That file is not allowing htaccess files.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Solution&lt;/strong&gt;&lt;br /&gt;
1. Open /private/etc/apache2/httpd.conf&lt;br /&gt;
2. Line 175 and 210: change AllowOverride none to AllowOverride All&lt;br /&gt;
3. Restart your server&lt;br /&gt;
4. Yay! 
    </content:encoded>

    <pubDate>Sun, 27 Apr 2008 19:17:09 -0600</pubDate>
    <guid isPermaLink="false">http://annafilina.com/blog/archives/33</guid>
    
</item>
<item>
    <title>2008 PHP Quebec Conference</title>
    <link>http://annafilina.com/blog/archives/30</link>
            <category>PHP</category>
    
    <comments>http://annafilina.com/blog/archives/30#comments</comments>
    <wfw:comment>http://annafilina.com/blog/wfwcomment.php?cid=30</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://annafilina.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=30</wfw:commentRss>
    

    <author>nospam@example.com (Anna)</author>
    <content:encoded>
    The 2008 edition of the conference is almost over (we have yet to go to the sugar shack). The event was a total success. For the first time, all tickets we sold out. We had wonderful sponsors that allowed us to do more than before (elePHPants, job fair, cocktail...) We had very &lt;a href=&quot;http://conf.phpquebec.com/en/conferencier&quot;&gt;good speakers&lt;/a&gt; and &lt;a href=&quot;http://conf.phpquebec.com/en/session&quot; &gt;quality presentations&lt;/a&gt;. I talked to many visitors and they were all very happy with the event. It is always a pleasure for me to organize this event and I will surely start planning next year&#039;s edition soon. Thanks to all the volunteers who helped us to keep the conference smooth. 
    </content:encoded>

    <pubDate>Sat, 15 Mar 2008 09:48:08 -0600</pubDate>
    <guid isPermaLink="false">http://annafilina.com/blog/archives/30</guid>
    
</item>
<item>
    <title>Data Binding expressions</title>
    <link>http://annafilina.com/blog/archives/29</link>
            <category>ActionScript</category>
    
    <comments>http://annafilina.com/blog/archives/29#comments</comments>
    <wfw:comment>http://annafilina.com/blog/wfwcomment.php?cid=29</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://annafilina.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=29</wfw:commentRss>
    

    <author>nospam@example.com (Anna)</author>
    <content:encoded>
    In MXML, you may use expressions as a source of data binding.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;pre&gt;&amp;lt;mx:Label text=&quot;Beer&quot; visible=&quot;{age &gt;= 18}&quot; /&amp;gt;&lt;/pre&gt;The Label will only be displayed if the person is 18 or older.&lt;br /&gt;
&lt;br /&gt;
Did you try a more complex expression?&lt;br /&gt;
&lt;pre&gt;&amp;lt;mx:Label text=&quot;Beer&quot; visible=&quot;{age &gt;= 18 &amp;&amp;amp; gender == &#039;male&#039;}&quot; /&amp;gt;&lt;/pre&gt;Ah ha! You get a compiler error. Why? Because you&#039;re inside MXML and the &amp;amp; character is special.&lt;br /&gt;
&lt;br /&gt;
Solution: replace the &amp;amp; with &amp;#38;amp;&lt;br /&gt;
&lt;pre&gt;&amp;lt;mx:Label text=&quot;Beer&quot; visible=&quot;{age &gt;= 18 &amp;#38;amp&amp;#38;amp; gender == &#039;male&#039;}&quot; /&amp;gt;&lt;/pre&gt; 
    </content:encoded>

    <pubDate>Fri, 07 Mar 2008 19:37:32 -0700</pubDate>
    <guid isPermaLink="false">http://annafilina.com/blog/archives/29</guid>
    
</item>
<item>
    <title>[Bindable] public override</title>
    <link>http://annafilina.com/blog/archives/28</link>
            <category>ActionScript</category>
    
    <comments>http://annafilina.com/blog/archives/28#comments</comments>
    <wfw:comment>http://annafilina.com/blog/wfwcomment.php?cid=28</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://annafilina.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=28</wfw:commentRss>
    

    <author>nospam@example.com (Anna)</author>
    <content:encoded>
    I stumbled upon a compiler error when overriding a setter function with the Bindable metadata tag: &quot;overriding a function that is not marked for override&quot;&lt;br /&gt;
&lt;br /&gt;
The answer is short and simple: use --[Bindable] public override-- instead of --[Bindable] override public--&lt;br /&gt;
It may sound silly but the override actually has to come second in order for the compiler to interpret it properly in this particular situation. 
    </content:encoded>

    <pubDate>Fri, 07 Mar 2008 14:51:34 -0700</pubDate>
    <guid isPermaLink="false">http://annafilina.com/blog/archives/28</guid>
    
</item>
<item>
    <title>Instantiating and displaying MovieClips from loaded SWF</title>
    <link>http://annafilina.com/blog/archives/27</link>
            <category>ActionScript</category>
    
    <comments>http://annafilina.com/blog/archives/27#comments</comments>
    <wfw:comment>http://annafilina.com/blog/wfwcomment.php?cid=27</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://annafilina.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=27</wfw:commentRss>
    

    <author>nospam@example.com (Anna)</author>
    <content:encoded>
    So you want to dynamically load a .swf, instantiate it and add to to a SWFLoader control.&lt;br /&gt;
&lt;br /&gt;
First, loading the .swf:&lt;br /&gt;
&lt;pre&gt;var loader:Loader = new Loader();&lt;br /&gt;
loader.load(url);&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Now, to get its classes, we need to listen for the loading completion:&lt;br /&gt;
&lt;pre&gt;loader.addEventListener(Event.INIT, callbackFunction);&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Once done, the callbackFunction will get and instantiate a class:&lt;br /&gt;
&lt;pre&gt;var mcClass:Class = &lt;br /&gt;
  loader.content.loaderInfo.applicationDomain.getDefinition(&quot;instanceName&quot;) as Class;&lt;br /&gt;
var mc:MovieClip = MovieClip(new mcClass());&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Hurray! Now we can add it to some appropriate container:&lt;br /&gt;
&lt;pre&gt;someSwfLoader.addChild(mc);&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Now we want to scale it to fit the available space:&lt;br /&gt;
&lt;pre&gt;mc.scaleX = mc.scaleY = someSwfLoader.width / mc.width;&lt;/pre&gt;(a more complex algorithm may be used)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A problem may arise if your clip content is not at 0,0 coordinates:&lt;br /&gt;
&lt;pre&gt;var bounds:Rectangle = mc.getBounds(Application.application.stage);&lt;br /&gt;
mc.x -= bounds.left &amp;#42; mc.scaleX;&lt;br /&gt;
mc.y -= bounds.top &amp;#42; mc.scaleX;&lt;/pre&gt;(if you have an ActionScript project instead of Flex, you&#039;ll need to access the stage by other means) 
    </content:encoded>

    <pubDate>Thu, 06 Mar 2008 18:03:47 -0700</pubDate>
    <guid isPermaLink="false">http://annafilina.com/blog/archives/27</guid>
    
</item>
<item>
    <title>AS3 data binding and component states</title>
    <link>http://annafilina.com/blog/archives/26</link>
            <category>ActionScript</category>
    
    <comments>http://annafilina.com/blog/archives/26#comments</comments>
    <wfw:comment>http://annafilina.com/blog/wfwcomment.php?cid=26</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://annafilina.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=26</wfw:commentRss>
    

    <author>nospam@example.com (Anna)</author>
    <content:encoded>
    If you ever developed a complex data-driven application, you probably stumbled upon the data binding nightmare. Altough a great feature in Flex (a central one in my opinion), it lacks a bit of control.&lt;br /&gt;
&lt;br /&gt;
I needed a form with multiple states depending on the flavor of the edited object. This way, I could have common fields to all object types and add a couple of fields based on the object type. However, these fields&#039; values were bound to properties of the edited object. When selecting an object from the list, the fields should update themselves. Bindings are executed to set field values. Now, since I use form states, all fields are technically on the stage and all bindings will execute, regardless of the type of the selected object.&lt;br /&gt;
&lt;br /&gt;
Basic example&lt;br /&gt;
I have a form to edit animal properties (number of legs, head size, etc.)&lt;br /&gt;
I have some extra fields depending on the animal type (mammals have fur length and density, birds have wing span, etc.)&lt;br /&gt;
Every animal type has an associated state:&lt;br /&gt;
&lt;pre&gt;&amp;lt;mx:Form&amp;gt;&lt;br /&gt;	&amp;lt;mx:FormItem label=&amp;quot;Legs&amp;quot;&amp;gt;&lt;br /&gt;		&amp;lt;mx:TextInput text=&amp;quot;{animal.legs}&amp;quot;/&amp;gt;&lt;br /&gt;	&amp;lt;/mx:FormItem&amp;gt;&lt;br /&gt;	&amp;lt;mx:states&amp;gt;&lt;br /&gt;		&amp;lt;mx:State name=&amp;quot;mammal&amp;quot;&amp;gt;&lt;br /&gt;			&amp;lt;mx:AddChild position=&amp;quot;lastChild&amp;quot;&amp;gt;&lt;br /&gt;				&amp;lt;mx:FormItem label=&amp;quot;Fur length&amp;quot;&amp;gt;&lt;br /&gt;					&amp;lt;mx:TextInput text=&amp;quot;{Mammal(animal).furLength}&amp;quot;/&amp;gt;&lt;br /&gt;				&amp;lt;/mx:FormItem&amp;gt;&lt;br /&gt;			&amp;lt;/mx:AddChild&amp;gt;&lt;br /&gt;		&amp;lt;/mx:State&amp;gt;&lt;br /&gt;	&amp;lt;/mx:states&amp;gt;&lt;br /&gt;&amp;lt;/mx:Form&amp;gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
The animal variable is set when an element is selected from a list. It can be an instance of a custom class Mammal or Bird which extends the Animal class. The state also changes according to the type selected. The problem occurs when I select a non-Mammal. The binding will execute, expecting a Mammal for the TextInput&#039;s text property. An error will be thrown saying that Bird (or other) could not convert to Mammal. This is to be expected, as the TextInput in question remains on the stage even if the state is invisible.&lt;br /&gt;
&lt;br /&gt;
What&#039;s the solution? Perhaps not the most neat, but it works: create extra variables for every type. Now you will have animal:Animal, mammal:Mammal and bird:Bird variables with their respective types. When an animal is selected, every type except the needed one is set to null. The animal variable still points to the selected animal. The MXML changes:&lt;br /&gt;
&lt;pre&gt;&amp;lt;mx:TextInput text=&amp;quot;{mammal.furLength}&amp;quot;/&amp;gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
What happens? When the bindings execute, if a Mammal is selected, the mammal variable is equal to a Mammal instance and everything is smooth. If a Bird is selected, the mammal variable is null and everything is smooth again. Hurray! It took me about 2 hours to figure out. If you have a better solution, please share. 
    </content:encoded>

    <pubDate>Thu, 28 Feb 2008 15:54:47 -0700</pubDate>
    <guid isPermaLink="false">http://annafilina.com/blog/archives/26</guid>
    
</item>
<item>
    <title>AIR Prerelease Tour</title>
    <link>http://annafilina.com/blog/archives/23</link>
            <category>ActionScript</category>
    
    <comments>http://annafilina.com/blog/archives/23#comments</comments>
    <wfw:comment>http://annafilina.com/blog/wfwcomment.php?cid=23</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://annafilina.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=23</wfw:commentRss>
    

    <author>nospam@example.com (Anna)</author>
    <content:encoded>
    &lt;img src=&quot;http://www.adobe.com/devnet/air/images/air_logo2.jpg&quot; align=&quot;left&quot; style=&quot;margin: 5px 10px 10px 0&quot; /&gt;I attended a presentation on Flex and AIR yesterday. Mike Potter was unable to come and was replaced by LordAlex Leon. The presentation began with a long description of Adobe applications and their integration, but an hour later finally reached AIR. The part about AIR was quite short and did not teach me anything new.&lt;br /&gt;
&lt;br /&gt;
For those of you who don&#039;t know, AIR is coming out soon. It stands for Adobe Integrated Runtime (or RIA backwards). It allows you to run Flash/Flex apps on the desktop, read and write local files, query SQLite databases... all this cross-platform.&lt;br /&gt;
&lt;br /&gt;
I did learn something interesting from one of the slides though. BlazeDS has just been released under an LGPL licence. This technology allows real-time data pushing. For me, it means developing multiplayer games! 
    </content:encoded>

    <pubDate>Fri, 08 Feb 2008 14:40:46 -0700</pubDate>
    <guid isPermaLink="false">http://annafilina.com/blog/archives/23</guid>
    
</item>
<item>
    <title>Sending headers</title>
    <link>http://annafilina.com/blog/archives/22</link>
            <category>PHP</category>
    
    <comments>http://annafilina.com/blog/archives/22#comments</comments>
    <wfw:comment>http://annafilina.com/blog/wfwcomment.php?cid=22</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://annafilina.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=22</wfw:commentRss>
    

    <author>nospam@example.com (Anna)</author>
    <content:encoded>
    There are many reasons to send headers in the middle of you PHP script. Sometimes you want to redirect the user based on some computed information or display different content types (mime-type). Have you ever had a problem with PHP complaining about &quot;output already sent&quot;?&lt;br /&gt;
&lt;br /&gt;
To solve this problem, there is a workaround with ob_start/ob_flush. As pointed out in a past comment, you can put ob_start in the beginning of the script and ob_flush at the end, thus preventing any output before the script finishes executing.&lt;br /&gt;
&lt;br /&gt;
A more neat solution (in my opinion) is to review your output approach. You should not send any output before you are absolutely sure about it (why would you sent kilobytes of HTML if you&#039;re going to redirect anyway?). My approach is to store output in a variable or a class and then send it when ready. I also try to limit html generation until after I processed my GET/POST requests. 
    </content:encoded>

    <pubDate>Thu, 07 Feb 2008 10:30:48 -0700</pubDate>
    <guid isPermaLink="false">http://annafilina.com/blog/archives/22</guid>
    
</item>
<item>
    <title>FlexNativeMenu Tutorial &amp; Issues</title>
    <link>http://annafilina.com/blog/archives/21</link>
            <category>ActionScript</category>
    
    <comments>http://annafilina.com/blog/archives/21#comments</comments>
    <wfw:comment>http://annafilina.com/blog/wfwcomment.php?cid=21</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://annafilina.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=21</wfw:commentRss>
    

    <author>nospam@example.com (Anna)</author>
    <content:encoded>
    So you want to have cool menus when you right-click an object in your flex app.&lt;br /&gt;
&lt;br /&gt;
First, create the FlexNativeMenu:&lt;br /&gt;
&lt;pre&gt;&lt;mx:FlexNativeMenu id=&quot;popupMenu&quot; labelField=&quot;text&quot; dataProvider=&quot;{popupMenuDataProvider}&quot; itemClick=&quot;popupMenuItemClick(event)&quot;&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
The popupMenuDataProvider refers to an Arraycollection:&lt;br /&gt;
&lt;pre&gt;[Bindable] private var popupMenuDataProvider:ArrayCollection = &lt;br /&gt;
  new ArrayCollection([&lt;br /&gt;
    {text:&quot;Add something&quot;, action: &quot;add&quot;},&lt;br /&gt;
    {text:&quot;Remove something&quot;, action: &quot;remove&quot;}]);&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
The menu will be displayed within a listener such as rightClick on a component of your choice:&lt;br /&gt;
&lt;pre&gt;private function onRightClick(e:MouseEvent) {&lt;br /&gt;
  popupMenu.display(this.stage, e.stageX, e.stageY);&lt;br /&gt;
}&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Now we need to handle the click in the menu:&lt;br /&gt;
&lt;pre&gt;private function popupMenuClick(e:FlexNativeMenuEvent):void {&lt;br /&gt;
  txtLog.text = e.item.action;&lt;br /&gt;
}&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
I ran into a bit of trouble when I tried to modify the dataProvider for the FlexNativeMenu component. It seems that the NativeMenu that it wraps does not receive the dataProvider updates. A solution was to reassign the dataProvider after a change:&lt;br /&gt;
&lt;pre&gt;popupMenuDataProvider.addItem({text:&quot;Edit something&quot;, action: &quot;edit&quot;});&lt;br /&gt;
popupMenu.dataProvider = popupMenuDataProvider&lt;/pre&gt; 
    </content:encoded>

    <pubDate>Tue, 05 Feb 2008 12:31:31 -0700</pubDate>
    <guid isPermaLink="false">http://annafilina.com/blog/archives/21</guid>
    
</item>
<item>
    <title>AS3 and RSL</title>
    <link>http://annafilina.com/blog/archives/20</link>
            <category>ActionScript</category>
    
    <comments>http://annafilina.com/blog/archives/20#comments</comments>
    <wfw:comment>http://annafilina.com/blog/wfwcomment.php?cid=20</wfw:comment>

    <slash:comments>4</slash:comments>
    <wfw:commentRss>http://annafilina.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=20</wfw:commentRss>
    

    <author>nospam@example.com (Anna)</author>
    <content:encoded>
    Runtime Shared Libraries have been quite a puzzle for me for some time now. Here are a few problems that I solved:&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Exporting an imported asset&lt;/strong&gt;&lt;br /&gt;
When in AS3 you want to import an asset from a swf, you get it by its linkage name. What if this asset needs to be imported from another swf? Flash only allows you to import OR export an asset for Runtime Sharing. Simple: in Flash, encapsulate the imported asset in a MovieClip, and export the parent clip with a different linkage name.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Load swf with RSL dependencies&lt;/strong&gt;&lt;br /&gt;
If you use the Loader class to load assets into your AS3 app and the source swf has RSL dependencies, the Loader might not fire a COMPLETE event. Although you expect your app to go look for dependencies in the path relative to your source swf, it actually looks for it relative to the app. Since it doesn&#039;t find it, your app has unpredictable behavior. Solution: move shared.swf to root, make an alias in root or change the linkage path in myassets.swf (might be tiresome).&lt;br /&gt;
&lt;br /&gt;
Here is an example:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;main.swf&lt;/li&gt;&lt;br /&gt;
&lt;li&gt;assets&lt;/li&gt;&lt;br /&gt;
  &lt;ul&gt;&lt;li&gt;myassets.swf&lt;/li&gt;&lt;br /&gt;
   &lt;li&gt;shared.swf&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;/ul&gt;&lt;br /&gt;
myapp.swf is an AS3 app that loads myassets.swf&lt;br /&gt;
myassets.swf imports assets from shared.swf using the path &quot;./shared.swf&quot;&lt;br /&gt;
myapp.swf will look for dependencies in &quot;root/assets.swf&quot;, because that is the folder that contains the app.&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;main.swf&lt;/li&gt;&lt;br /&gt;
&lt;li&gt;shared.swf&lt;/li&gt;&lt;br /&gt;
&lt;li&gt;assets&lt;/li&gt;&lt;br /&gt;
  &lt;ul&gt;&lt;li&gt;myassets.swf&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;br /&gt;
It took me a long time and a bit of luck to figure it out. Hopefully you will benefit from it. 
    </content:encoded>

    <pubDate>Fri, 25 Jan 2008 12:19:20 -0700</pubDate>
    <guid isPermaLink="false">http://annafilina.com/blog/archives/20</guid>
    
</item>
<item>
    <title>Working with types in AS3</title>
    <link>http://annafilina.com/blog/archives/19</link>
            <category>ActionScript</category>
    
    <comments>http://annafilina.com/blog/archives/19#comments</comments>
    <wfw:comment>http://annafilina.com/blog/wfwcomment.php?cid=19</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://annafilina.com/blog/rss.php?version=2.0&amp;type=comments&amp;cid=19</wfw:commentRss>
    

    <author>nospam@example.com (Anna)</author>
    <content:encoded>
    ActionScript 3 is strong-typed, which is great to detect possible errors at compile-time. Here are a few tips for working with types.&lt;br /&gt;
&lt;br /&gt;
Type wildcard&lt;br /&gt;
&lt;pre&gt;var someVar:*;&lt;/pre&gt;&lt;br /&gt;
This is not recommended (can cause runtime errors) but is possible. I suggest using a common parent (DisplayObject, for example) whenever possible.&lt;br /&gt;
&lt;br /&gt;
Type checking&lt;br /&gt;
&lt;pre&gt;if (someVar is MovieClip) {}&lt;/pre&gt;&lt;br /&gt;
This is most useful. Example: getting the list of MovieClip children from a parent MovieClip (you don&#039;t want shapes and all). This line might prevent the whole app from blowing up in your face.&lt;br /&gt;
&lt;br /&gt;
Type casting&lt;br /&gt;
&lt;pre&gt;var item:Object = ComboBox(event.currentTarget).selectedItem;&lt;/pre&gt;&lt;br /&gt;
This will prevent type-mismatch complile errors. The same applies to simple types, such as int and uint. 
    </content:encoded>

    <pubDate>Thu, 24 Jan 2008 10:31:16 -0700</pubDate>
    <guid isPermaLink="false">http://annafilina.com/blog/archives/19</guid>
    
</item>

</channel>
</rss>