Skip to Content »

FlashApe » archive for 'flash'

 RegExp note to self

  • May 12th, 2008
  • 2:24 pm

I’m always forgetting this simple piece of code, so I’m putting it up here:

Match any character, any number of times: (.*)

 Guttershark Actionscript Library

  • May 12th, 2008
  • 10:30 am

Came across another Actionscript library today, called Guttershark. This one is not Flex-specific, and is targeted towards Flash web site development, much like Gaia. Note the use of ‘library’ instead of ‘framework’…I think that is a specific designation by the author to separate it out from the existing sets of frameworks out there. It is still in essence a framework, but there’s lots of individual goodies in there that aren’t dependent on using the entire library.

Taking a look at the DocumentController entry in the API docs should give you a good idea of what Guttershark is about. If you do a lot of flash web site development, it’s worth a look to check it out.

 mxna good to go?

  • May 5th, 2008
  • 5:18 pm

mxna is now redirecting to http://feeds.adobe.com. It’s running pretty nice now, hopefully it stays this way.

 Embedding Bitmap Text in Flash CS3

  • April 19th, 2008
  • 12:22 pm

Lost a few hours to this one today. I was trying to embed a font in a textfield with the antialising set to ‘Bitmap Text (no anti-alias)’. No matter what though, the font would not display in the text field when embedded. Turns out that internally flash actually renames the font, to ‘FontName_8pt_st’ (substite the 8 for whatever font size you embedded into the textfield). Not sure what the ‘_st’ part is but so far it seems constant, doesn’t ever change. I’m curious to know the reasoning behind this. Anyway, just remember to use the ‘updated’ font name instead of the normal font name, and you should be good.

 Flex Builder vs. TextMate

  • April 16th, 2008
  • 3:19 pm

I was doing a bunch of Flex work for the past few months, and get really comfortable with Flex Builder. There are so many awesome features to aid development it simply kicks ass.

However, my current project is Flash CS3-based, so I went back to TextMate, which I also love. There are many great features in TextMate which eclipse does not do that really make me miss working in it.

My main points of comparison:
TextMate:

  • Perceptual Bulk - TextMate feels so lean, where FlexBuilder just feels so heavy. Probably due to eclipse not being a native mac app, but still, I just feel ‘cleaner’ working in TextMate.
  • Tab Triggers - I can’t count how much typing I’ve saved using tab triggers in TextMate. Type in a few key strokes and hit tab, and some templated code gets placed…with tabstops mixed in so you can simply tab to the next appropriate place to type. I only pray that someone tells me you can do that in eclipse.
  • Column Selection - Another tool of TextMate that i find incredibly timesaving. being able to select a rectangular area of text, and have whatever you type repeated on each of the selected lines, is a blessing. Another thing I wish eclipse would support.

Flex Builder (eclipse):

  • Integrated debugger - That pretty much puts the smack down right there.
  • Code Sense/Code Completion - Another swift backhand. For being such an awesome text editor, why can’t TextMate handle this better? (yes I know about using the escape key for auto-complete, but that’s pretty weak compared to what you get in eclipse).
  • Find in Language Reference - I use this constantly, and as far I know it doesn’t exist in TextMate (for actionscript anyway)

There’s probably a few more but those are what jump out at me. If anyone knows how to get some of the features listed above into the other app, please do tell :)

 Flex binding to numbers and increment issue

  • March 5th, 2008
  • 3:40 pm

Anyone know what's going on here? I have a property on a model that is bindable:

Actionscript:
  1. [Bindable]
  2. public var currentAmount:Number = 0;

I have a command that increments that value, by some fractional amount:

Actionscript:
  1. [Bindable]
  2. model.currentAmount += 1.25;

What's happening is I am winding up with values like 1.25000000000000000001. Even wierder is that the last digit increments with how many times the variable is incremented, so so if I add another .50 to the previous value, I wind up with 1.75000000000000000002.

Currently I'm using a setter and fixing the problem by using toFixed(2), but that seems very retarded:

Actionscript:
  1. _currentAmount = newValue;
  2. var s:String = _currentAmount.toFixed(2);
  3. _currentAmount = Number(s);

I'm sure if this was a bug it would be pretty well known by now, but I can't seem to find anything on google, so I'm guessing I'm doing something wrong. Anyone have an idea?

 FMS 3 SWF Verification

  • January 25th, 2008
  • 12:13 pm

As mentioned in my previous post, one of my favorite new features of FMS is a security feature called SWF Verification, which is crazy easy to implement and very effective.

You need to do two things: First, change the <SWFVerification enabled="false"> to "true" in your Application.xml file to turn on the feature. Then simply store a copy of the swf that will be connecting to the server within a special directory, and FMS will check to make sure that the swf that is trying to connect is the same exact swf that it has on it's server. If it's not, FMS does not allow the connection. Of course, this will only work with Flash Player 9.0.115 or later...so what to do about people using older versions? Easy. There is a tag called <UserAgentExceptions> that will allow you to exclude any particular user agents from participating in the SWF Verification. It's works on ranges too, you can do:

XML:
  1. <UserAgentExceptions>
  2.     <Exception from="WIN 9,0,0,0" to="WIN 9,0,0,114" />
  3.     <Exception from="MAC 9,0,0,0" to="MAC 9,0,0,114" />
  4.     <Exception from="UNIX 9,0,0,0" to="UNIX 9,0,0,114" />
  5. </UserAgentExceptions>

and that will tell FMS to bypass the SWF verification for those flash players trying to connect.

 Flash Media Server 3 out in the wild today

  • January 25th, 2008
  • 11:10 am

Hooray!  FMS3 gets released today.  I had a chance to play around with the beta and I gotta say it's pretty nice.  Turns out that some of favorite new features are actually the security features, my favorite being SWF Verification (which I was going to write about here but decided to make a separate post for it).  Performance get a tremendous boost as well, so if you develop apps which require a media server, go check it out!

 LiveBuster - New Facebook App

  • January 8th, 2008
  • 9:50 am

I love launching new projects, especially ones that were as fun to work on as it is to use.  This one was the first Facebook app I've worked on, and it's called LiveBuster.  The concept is simple, and fun...from the LiveBuster FAQ: 

What is LiveBuster? LiveBuster is a new video greetings service where YOU are the star. You can record your own video greeting and send it friends, all from Facebook in just a few minutes. It's free, fun and addictive. Facebook members just select the background they want - celebrity, animal, sports etc. and then adjust your web cam until you face or other body part of your choice is synced with the background. Press record, and we start making your video that you can share instantly. 

You can share the video with your friends, and post videos on your profile page to your Wall.  We've got some more cool features in the works that will be coming shortly as well.Go check it out, and if you have any suggestions on how we can improve the app, let us know on the LiveBuster Discussion Board.

 Gotta love penetration

  • December 13th, 2007
  • 10:15 am

Wanna be successful?  Penetrate.  Advertising, marketing, self-promotion, facebook applications, anything really, get your name out there in the public consciousness, eventually people will look to you first (as long as you don't drop the ball and start to suck).  That's why I admire most of the moves made by Adobe after the Macromedia acquisition.  Open-sourcing their products means getting their name and software out there, and (hopefully) saturating the market with their products.  On Ted Patrick's post to whip people into a frenzy (totally successful, by the way) about the new software releases he stated "Remoting and messaging will never be the same!", and I'd say it looks like that is going to be the case. Maybe I'm being over-optimistic, but I don't have a hard time picturing amf data transfer replacing vast amounts of xml-based data tranfser after a short while. I know I'd certainly rather use amf any day.