code reviewing and tons of debugging info!

Thaylin | May 20, 2011

In the last month or so I’ve been tasked with reviewing a project for performance profiling and just code cleanup in general. It’s been quite a task as I wasn’t familiar with a single part of the code so finding tools to aid in this is uber helpful.
With that in mind, here are a few [...]

Uploading multiple images/data to server!

Thaylin | April 8, 2011

Oh man what a life saver this was! Super easy to implement and works awesomely so far!
Multipart form data in as3 [Class version 1.2]
Implementing is as easy as this:

?View Code ACTIONSCRIPT1
2
3
4
5
6
7
8
9
10
11
12
13
jpgEncoder = new JPGEncoder( 100 )
 
var photo:ByteArray = jpgEncoder.encode( this.getBitmapData( photoBitmap) );
var thumbnail:ByteArray = jpgEncoder.encode( this.getBitmapData(thumbnailBitmap) );
 
var ml:MultipartURLLoader = new MultipartURLLoader();
ml.dataFormat = URLLoaderDataFormat.TEXT; // or [...]

setting properties at runtime from xml or css

Thaylin | March 9, 2011

Mainly this is just a post to remind myself in later times about this code snippet but basically this will work with any class with accessible variables.
Take an xml node such as

?View Code XML1
<class id="myClass" color="#FF0000" isActive="false"/>

You can use this snippet to parse through those attributes to set all of your variables for you assuming [...]

Dynamic class property retrieval

Thaylin | December 11, 2009

I’m taking a break from the pattern tutorials for the moment to write the as3 facebook connect integration library I’ve been meaning to write. With that said, here’s a little method I didn’t realize was around to pull properties from classes. Normally the for..in method you can pull properties available within an object, but this [...]

Singleton Pattern introduction

Thaylin | November 11, 2009

Staying on the course of my tutorial kick I’m now moving to the Singleton pattern. Understanding this pattern will help later in understanding patterns such as the Factory Pattern which I will be discussing later.
Another pattern, or rather anti-pattern according to some, is called the Singleton Pattern.
The Singleton pattern, as the name implies, allows for [...]

MVC (Model-View-Controller) introduction simplified

Thaylin | November 4, 2009

It recently came to my attention that while working alone I have lost a bit of the ability to explain programming patterns. It’s not that I’ve forgotten about them, as I use variations of them in everyday work, but I’ve just lost touch with the ability to easily explain the workings of them.
So what better [...]

See the code Flex generates for you

Thaylin | September 24, 2009

A fascinating way of seeing all the code that the mxmlc compiler generates from your flex apps is to set a compiler flag for your project.
-keep
This takes all the generated code from your mxml files and places it in a “generated” folder in your src folder. This is great because it gives you the option [...]

FireBugLogger class update

Thaylin | June 3, 2009

So a while ago I wrote a class that I called FireBugLogger that uses the console.debug as well as the rest of the FireBug method calls.
Today I came across a great way to help the other developers that may be implementing your flash on the html side. Though you’ll have to call the debug [...]

crossdomain gateway or “How can I get that data!”

Thaylin | May 29, 2009

A lot of sites today are very open with their APIs allowing users from other sites to retrieve their data, but sometimes you’ll come across websites that may not have that same open access. When their sites limit the access that other sites can retrieve data from via the crossdomain file it’s frustrating to say [...]

the down lo on ExternalInterface and javascript injection via actionscript 3

Thaylin | May 21, 2009

Yesterday I did a presentation on ExternalInterface and it’s uses along with how to inject javascript on the page and a few other tidbits at FlashCodersNY.
Here’s the zip file with the project we went over. Whether you were there or not you should still be able to easily follow along since there’s tons of comments [...]