The perfect instrament for Adobe

February 27th, 2008 . by polyGeek

Pamelia Kurstin plays a musical instrument called the theremin. ( Pronounced: th-AIR-e’men ) Adobe needs to hook up with her for their next AIR tour. If I have to explain why then please exit the blog through the back door. :-)

And if you were at Grant Skinner’s 2006 presentation at FlashForward in Seattle then you’re probably thinking the same thing I am: these two need to put on a show together.


I actually found a use for Internet Explorer

February 27th, 2008 . by polyGeek

Testing my Flex apps, especially using the debug mode, in Firefox is a big problem. The app opens in a new tab in Firefox but sometimes bad things happen and it crashes the browser.

Firefox isn’t the quickest starting browser out there especially if you’re like me and have lots of persistent tabs automatically open.

But just because Firefox is default browser on my computer doesn’t mean it has to be me default browser for Eclipse/FlexBuilder. I can easily change it to IE so that I can run my apps. And there’s a little added bonus: when you kill a debug session from the debug panel IE automatically closes. With Firefox I always had to kill the debug session and then close the tab. And with the browser one monitor and the debug panel on the far monitor - of a three monitor system - that’s a lot of mouse tracking. ( Yeah, yeah, poor me. I hear you. )

To make IE your default browser for running your Flex apps go: Window > Preferences… Now open the General menu and select Web Browser. Now you can just check off which browser you want to use.

Another added bonus is that I can use the regular old public Flash player in Firefox and only install the debug Flash player for IE. That way I don’t get all the Flex error messages popping up on . . . well, I won’t tell you who’s site they pop up on all the time. But you know who you are. ;-)


How Not To Code

February 26th, 2008 . by polyGeek

My wife is a huge fan of the show What not to wear on TLC. ( It’s essentially about showing women how to dress better. )

I think we - the Flash/Flex community - could use a show How not to code. I know that I’d watch it. And SeanTheFlexGuy is game. So lets do this thing.

I’ll help out with doing the encoding, video player stuff. But I don’t know squat about shooting or editing video.

The perfect hosts would be McCune and Deepa. But they are probably busy with their book. Maybe Ryan Stewart and Ted Patrick could do it in their copious spare time. They already travel all over the world for Adobe so they could just do one show per trip and we’d be set.

Unfortunately HowNotToCode.com is being squatted on. But HowNotToCode.org and .net are available.

By the way, I volunteer to be the first dweeb who gets lambasted for his coding practices, or lack thereof. I can see it now: the host would be banging his/her head against the wall saying, “I can’t believe you use the Flash Authoring tool to write code.”


Video - What is Flex?

February 26th, 2008 . by polyGeek

If you’re a Flash developer/designer and you’ve ever tried to explain to someone what Flash is you probably got about as far as mentioning keyframes before you started seeing glazed eyes.

The same is true of Flex. If you’ve never seen it there can be a lot of confusion as to exactly what it is and how you use it. I put this short ( less than 10 min ) video together to cover the three essentials:

  1. Flex Builder
  2. MXML
  3. the Flex Framework

This isn’t a video that goes into any depth on writing code. It’s just a quick glance behind the curtain, so to speak.

[ Download Flex Builder 3 ]

And no, I couldn’t resist The Matrix reference. I didn’t even really try. ;-)

At Ted Patrick’s request I posted this video to youTube with the 30OnAir tag. I hope he didn’t request that just to make me look like a fool. :-)


I got my Flex 3. How about you?

February 25th, 2008 . by polyGeek

I busted out the Visa and got my Flex3 last night - $299 for the Professional upgrade.

And of course there was rejoicing throughout the land because AIR 1.0 was released!

My Pownce client still works. The Google Analytics Reporting Suite seems okay. MoTwitAir is a go! ( Kudos Sim! ) But Snitter was a no go. :-(

( Update: Snitter has a fix for AIR 1.0 posted already. Snitter on! )

The Adobe Media Player still works. I really need to use that more to watch videos at TED.com.

I hope the Flex team is kicking it at a huge release party before heading off for a well deserved break. Then back to work on Flex 4! ( Actually, Ely is probably half finished refactoring the Flex framework already. )

Adobe also tossed up a new ad-banner on their homepage. I like the “Carpe Desktop” bit.


Flex 3 : coming soon to a galaxy near you

February 23rd, 2008 . by polyGeek

Mr Flex is having fun teasing us with the Flex 3/AIR final release. So when is Adobe finally going to put out?

Well, 360Flex starts Monday in Atlanta. Hummmm, you do the math. That gives Adobe a platform to announce from where they are sure to get lots of blog coverage - not that they need it.

Ted was at the Flex Users Group meeting here in Los Angeles and said point blank that Flex3/AIR would launch at the end of February, give or take a week. Well, lets take a week. :-)

I don’t know about you but I’ll be visiting the purchase page for Flex around midnight EST and hit refresh a few times.

By the way, can anyone think of a product that got more use and attention than AIR has before it was even out of beta?


Video Tutorial - Intro to PXP2, xml loading and parsing class

February 19th, 2008 . by polyGeek

Flash and XML go together like peanut butter and jelly. If your working on a project where there is data inside of Flash that is likely to change then XML is the way to go. That way you, or anyone with a text editor, can update an XML file - essentially a text file - and change things inside your Flash app.

The downside to using XML is that the data you get back can be confusing as hell to navigate through. I had to deal with it enough that I finally created a class - PXP2 - that takes care of all the mundane aspects of using XML so that you can get right to work and skip a lot of code and confusion.

In this tutorial I’ll do a simple example of how I would create a site navigation using XML.

[ Download FLV ] [ Download sample files ]

A few notes: there is no AS3 version PXP2 of this because AS3 has the E4x class which is like PXP2 on steroids. I’ll do a tutorial on how to use E4x in a few weeks.

PXP2 stands for: Polygeek Xml Parsing Project = PXPP = PXP2


alpha = 0 is not the same as visible = false

February 13th, 2008 . by polyGeek

I’m working on an image browser to go along with a video player. I noticed that after browsing to the 12th image the loading slowed down considerably.

When an image is replaced it fades to 0 and the image that gets loaded fades to 100. Nothing I haven’t done countless times before.

To fix the slow loading after the 12th image I tested a few things. First I made sure that my reference to the imageLoader was cleaned up. It was. Yeah me. :-)

Then I tried removeMovieClip on the image that faded to 0. That fixed it. Problem is that now I have to load each image every time instead of just fading it back to 100 if it’s already been loaded.

Then I tried setting the visible = false  after the image had faded out. That worked. Everything runs smooth.

I would have thought that an alpha = 0 would take that object out of the rendering list but I suppose it doesn’t. If you don’t want the Flash player to be rendering an object set it’s visibility to  false.


Passing varibles to Flash via FlashVars

February 13th, 2008 . by polyGeek

I have to look this up all the time because I can never remember the syntax for using FlashVars in the various ways one embeds a SWF in an HTML file.

FlashVars is a way to pass data from the HTML containing page. You can read more about it here.

[ download example using AC_RunActiveContent and object/embed tags ]

For the <object><embed> tags

The <object> tag will run in IE. Add this param along with the others:

<param name=”FlashVars” value=”var1=One&var2=Two” />

The <embed> tag will run in Netscape/FireFox browsers. Simply place the following attribute anywhere inside the <embed> tag:

FlashVars="var1=One&var2=Two"

Using the Flash IDE’s Javascript ( AC_RunActiveContent.js )

I add the FlashVars parameter to the end of the AC_FL_RunContent function like so:
’salign’, ”, ‘flashvars’,'var1=One&var2=Two’); //end AC code

Don’t forget to add a comma after the - ’salign’, ”, - line. If you don’t you’ll get a Javascript error and nothing works. I’ve only made that mistake a few dozen times.

And don’t forget, you have to edit the <object><embed> tags contained in the <noscript> block manually.

Using swfobject

Check out the examples page at blog.deconcept.com here.

It’s pretty simple:

<script type=”text/javascript”>
var so = new SWFObject(”movie.swf”, “mymovie”, “400″, “200″, “8″, “#336699″);
so.addVariable(”var1″, “One”);
so.addVariable(”var2″, “Two”);
so.write(”flashcontent”);
</script>

Using Kimili Flash Embed Wordpress plugin

Use the fvars attribute:

[kml_flashembed movie="/flash/471_FlashVars.swf"height="100" width="200"

fvars="var1=One&var2=Two" /]

Video Tutorial - Organizing your class files with namespaces

February 13th, 2008 . by polyGeek

This video tutorial begins where the first one left off. Here you’ll learn to place your class files inside a unique name space within your global class path.

If you’ve ever downloaded someone else’s class files and couldn’t get them to work this might help.

[ download FLV ]



Adobe affiliate links help support video tutorials here at polyGeek.com

Start building web applications with Adobe Flex Builder 2

Notes:

  • An import statement adds that class to your SWF when it’s compiled and adds on to the file size of your SWF. If you’re importing a class but not using it then you’ll bloat your SWF filesize unnecessarily. This happens from time to time when you edit your code and remove a call to a class and forget to remove the import statement.

Lee Brimelow at gotoAndLearn.com did a video tutorial covering the use of custom classes. I’d suggest watching that if you still have any questions.


« Previous Entries