Posts Tagged ‘Flash’

Illustration: Mr. Noodle (vectors in Flash)

Wednesday, December 23rd, 2009

Mr Noodle vectorJust finished up a vector version of my little machine-gun toting rabbit, Mr. Noodle. I had originally planned a game for him where he uses a ‘holy’ gun to kill shades & phantoms that have overtaken the surrounding woodland. We’ll see if I ever get there.

Anyways, enjoy a special holiday treat of Mr. Noodle at most desktop sizes!
View it larger here.

Sharing is fun!
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Faves
  • Twitter

Flash: Saving Filesize When Embedding Fonts

Sunday, June 29th, 2008
flashHead Flash: Saving Filesize When Embedding Fonts

I’ve noticed some massive bloat recently in my Flash files & have found my newest culprit. Font embedding. Curses! Thankfully it’s really easy to correct. Here are some tips.

1. Flash auto embeds every font symbol used in static text fields. So if a button using Tahoma Bold says “Click Here” it will embed ClickHer. But keep in mind if you use Tahoma Italic on another “Click Here” button it will re-import those font symbols again.

2. When embedding fonts in a movie, make sure you ONLY embed what you need. If you know a field will only have lowercase fonts, embed only those.

3. _sans, _serif, & _typewriter are built into the Flash Player itself. So there is MINIMAL filesize (around 100 bytes) increase when using these fonts. HOWEVER, they cannot be rasterized, or animated well & will dissappear under masks.

4. When embedding a font, take a look at your fonts folder on your hard-drive & sort by filesize. Which ones have the lowest filesize? Which ones look the best? The filesize of a font is a DIRECT reflection on the file bloat added to your Flash movie.

PS:  A great looking, free, low filesize font is AM Sans. It can be found here. It’s also a great Futura substitute. Also LucidiaMAC is a great for embedding. I’ve embedded the entire alphabit (upper & lower), numbers & select symbols for a file size increase of ~7kb.

Happy Flashing!

Sharing is fun!
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Faves
  • Twitter

Flash: Interacting with JavaScript

Wednesday, April 2nd, 2008
flashHead Flash: Interacting with JavaScript

Wondering how to get your Flash movies to interact with your HTML? Look no further. This write up explains how to get & call Javascript functions from within your Flash movie. (AS3 ONLY)

Flash Code (Master Movie) – This FLA has a btnSender Movieclip
import flash.external.ExternalInterface; function fnSendRelease(evt:Event) { //Calls the JS function, "jsFunc" ExternalInterface.call("jsFunc","test text"); } btnSender.addEventListener('mouseDown',fnSendRelease);
Flash Code (Receiver Movie) – This FLA has an dynamic text field with the name of in_ti
import flash.external.ExternalInterface; function asFunc(str:String):void { in_ti.text = str; } // Gets the info from JavaScript ExternalInterface.addCallback("asFunc",asFunc);

The Javascript <script language="JavaScript"> function jsFunc(str) { // Make sure your flash movie is referenced as "menuget" flashMovie=document.getElementById("menuget"); flashMovie.asFunc("FLASH Says : " + str); } </script>

Anyways, just press your sender button, and whatever is in your sender field should send to the other SWF file. Let me know if you run into any issues & I’ll see what I can do.

Sharing is fun!
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Faves
  • Twitter

Flash: Google Analytics in AS2

Tuesday, December 18th, 2007

Flash CS3

This article is pulled directly from Google Analytics FAQs page. I thought it was useful, so here it is just dropped on me site. Read the full article on the Google’s site here.

(Updated Jan 1, 2008)

Google Analytics lets you track any browser based event, including Flash and JavaScript events by using the _trackPageviewfunction, you can assign a page filename to any Flash action, and enter that filename into the appropriate goal or funnel step. Important: Please note that your analytics tracking code and calls to _gat._getTracker and _initData must be placed on the page above the call to _trackPageview.

<script type=”text/javascript”>
var gaJsHost = ((“https:” == document.location.protocol) ? “https://ssl.” : “http://www.“);
document.write(unescape(“%3Cscript src=’” + gaJsHost + “google-analytics.com/ga.js‘ type=’text/javascript’%3E%3C/script%3E”));
</script>
<script type=”text/javascript”>
var pageTracker = _gat._getTracker(“UA-xxxxxx-x”);
pageTracker._initData();
pageTracker._trackPageview();
</script>

To track an event, call _trackPageview() with an argument specifying a name for the event. For example, calling:

pageTracker._trackPageview(“/purchase_funnel/page1.html”);

will cause each occurrence of the the calling Flash event to be logged as though it were a pageview under the name /purchase_funnel/page1.html . The argument must begin with a forward slash and be in quotes. The event names may be organized into any directory style structure you wish. The path/filename argument to _trackPageview need not represent an actual URL on your website.

Flash Code Examples

on (release) {
// Track with no action
getURL(“javascript:pageTracker._trackPageview(‘/folder/file.html’);”);
}

on (release) {
//Track with action
getURL(“javascript:pageTracker._trackPageview(‘/folder/file.html’);”);
_root.gotoAndPlay(3);
myVar = “Flash Track Test”;
}

To verify that _trackPageview is being called correctly, you can check your Top Content report 24-48 hours after the updated tracking code has been executed. You should be able to see the assigned pagename in your report

Happy tracking!

Sharing is fun!
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Faves
  • Twitter

Flash: Syncing audio in long movies

Saturday, October 20th, 2007
flashHead Flash: Syncing audio in long movies

I remember when syncing audio in Flash used to be such a pain. Those were the days. Editing & re-syncing audio in other programs to bring them back in a the correct rate. Guessing. Waiting.

Well, no more. I’ve finally discovered a way to stop messing around & get it done in one shot. My new favorite transcoder SUPER. That’s right. I re-compress the video & set its frame rate to match my Flash movie (usually 30fps). Once its done, import as normal & bingo. My six minute movie has the audio synced perfectly! What a happy, happy day. In fact, I bet that this could work for Youtube videos as well (which to my best knowledge are also at 30fps).

Get SUPER. A fitting name for this program.

Sharing is fun!
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Faves
  • Twitter