Flex Community Blog

relative paths, HTML and embedded swfs

I recently had a need to load external jpgs into multiple swfs, which were embedded into an HTML page. The swfs were in sub-directories. The problem soon arose was this:

Referencing relative paths from an swf that is not in the root folder (the same folder containing the HTML page) doesn’t work. For example, if you have

root -> html page -> swf folder -> image.jpg

And in the swf file you try to load “image.jpg” as a relative path, it does not work. According to the swf (embedded in the HTML page), the jpg it is looking for should be located in root -> image.jpg

It is not there. it is actually in root -> swf folder -> image.jpg

I found others on blogs and forums with the same problem
Read More…

Documenting your classes with ASDoc

I started working on this today for the first time for a new project I want to document. After some reading online, I found many people having problems with this, and complaining about problems using ASDocs through the command line, lack of documentation (which is kind of ironic), and many people saying they’ve spend hours and days trying to get it to work. I decided to skip the command line and try to run ASDOcs from Flex Builder. I’m happy to report I’ve gotten it to work after about 20 min, with the help of this great article:
Read More…

Using Flex swf to load html into frames

I recently had a reason to do this, and saw that many people online are having problems. Here’s a solution, and a few notes to help. First the Flex code:
Read More…

GuerrillaMail disposable email

This isn’t about Flex or Flash, but it’s a useful item for any developer, and I’d thought I’d share to anyone who doesn’t already know about it. Using Guerrilla Mail, you can generate a free, anonymous, disposable email address that expires in 1 hr. You can use this address to sign up to things that require an email (and send a confirmation code/link) that you plan to only use or sign up to once.

It works like a charm.

Cheers

http://www.guerrillamail.com/

Tracking ‘Pages’ in a Flex app with Google Analytics

Tracking ‘Pages’ in a Flex app with Google Analytics

Google Code Page:

http://code.google.com/apis/analytics/docs/tracking/flashTrackingIntro.html

download the tracking library here:

http://code.google.com/p/gaforflash/downloads/list

1)After downloading the zip file, unzip it, and goto lib/analytics.swc (not analytics_flash.swc)
2)in your flex app, goto project -> properties -> Library Path -> add swc, then add the analytics .swc to your build path

make sure to add the namespace to the application (add the following within the mx:Application tag:

xmlns:goog=”com.google.analytics.components.*”

Then you can implement tracking in the following way:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:goog="com.google.analytics.components.*" layout="vertical" creationComplete="trackInitialView()">
<mx:Script>
<![CDATA[
public function trackInitialView():void{
tracker.debug.minimizedOnStart = true;
tracker.trackPageview("HOME");
}
]]>
</mx:Script>

<goog:FlexTracker id="tracker" account="your_account_number" visualDebug="false" mode="AS3"/><mx:LinkBar id="myLinkBar" right="15" dataProvider="myViewStack" itemClick="tracker.trackPageview(myViewStack.selectedChild.label.toString());" />

<mx:ViewStack id="myViewStack" width="500" height="500">
<mx:Canvas label="HOME" backgroundColor="#ff0000"/>
<mx:Canvas label="ABOUT US" backgroundColor="#00ff00"/>
<mx:Canvas label="CONTACT" backgroundColor="#0000ff"/>
</mx:ViewStack>

</mx:Application>

As you can see from the example, you can track things besides pageviews, and in fact any event you can think of (like the end of a video) can be tracked. See the above links for more information.

Connect with other Flex developers here: http://connect.flexcommunity.net/

Text Effects in Flex with TweenMax

I’ve just been playing around with TweenMax for a short time, playing with animated filters on a Label control in Flex. There may be better ways to do this, but I thought I’d share:

example

code below:
Read More…

I’m Loving TweenLite!

If you haven’t yet used tweenLite, check it out, I think you’ll like it…

http://blog.greensock.com/tweenliteas3/

Form their site:

“DESCRIPTION:
Read More…

New Social Networking Space For RIA Developers

www.flexcommunity.net

We are happy to announce that we are beginning our first baby steps with a new site aimed at creating a networking space specifically for RIA developers. The goal is to build community, help developers find each other (and maybe find work), and promote the free exchange of information.

This tool will allow developers to chat, blog, make friends, create and join groups, showcase their work, ask and answer questions, and more.

Come on over to http://www.flexcommunity.net and check it out.

It is a brand new site, so be among the first to join, and help us build the community, help each other, and make this a success.

Thanks!

Flex Community Blog – WidgetBox Widget

Add the Flex Community Blog Widget to your site:

embed the following code:

<script type="text/javascript" src="http://cdn.widgetserver.com/syndication/subscriber/InsertWidget.js"></script><script>if (WIDGETBOX) WIDGETBOX.renderWidget('c881dce4-5c1f-4a64-96e7-91309fa59624');</script><noscript>Get the Flex Community Blog - Adobe Flex, Flash and Actio widget and many other great free widgets at Widgetbox!</noscript>

You can also go to WidgetBox to customize the theme and size of the widget

Flash & Flex Developer’s Magazine Jan 09 issue (review)


I just read the Jan 2009 issue of Flash & Flex developer’s magazine. And I am sitting down to write a review, but first I’d like to make some observations about the magazine project in general.

This magazine is great not only for what it is, but what it likely will become. It seems they have a great sense of the importance of the community in how they approach their magazine. They allow open submissions of content, and I’ve seen on some blogs in the community of regular bloggers getting their content published, and as their site says:
Read More…