<------ RANT Start ----->
Well I've several hours trying to find an easy way to post code on Blogger and I'm convinced it can't be done. At least not easily. I know wordpress has a easy way of doing why not Blogger? They even have a repository of code at Google CODE, so you'd think this would be an easy task.
Well if anyone knows how to do it, please let me know.
<------ RANT End----->
Friday, February 8, 2008
Posting Code on Blogger
Posted by noti at 4:34 PM 0 comments
Wednesday, February 6, 2008
AS3 Custom Events
I've read in couple of blogs (this one recently) on the problems with passing data between Objects/Classes. I, myself, used to use Proxy as well as binding data to dynamic classes (ie-MovieClip) a LOT of the time in AS2, but now in AS3 things have changed (for the BETTER!).
In comes Custom Events. I recently used Custom Events in a project where I wrote a Class for controlling the Sound object. I found using Custom Events was MUCH easier than it's reputation is known for, and very similar in nature to Proxy. Below is a quick Sample of the SoundControlEvent.
With CustomEvents it easy to read the passed property without having to access the dispatching object. As outlined below:
var evt:SoundControlEvent = new SoundControlEvent(SoundControlEvent.SOUND_POSITION);
evt.position = _channel.position;
dispatchEvent(evt);
Hopefully Custom Events will become more popular as AS3 gets futher into the mainstream. It makes for easy to read code that extremely portable.
Posted by noti at 9:11 AM 0 comments
Labels: Actionscript 3, AS3, Custom Events
Monday, February 4, 2008
Communicating between AIR (swf) windows
I wanted to make a quick note on something I came across yesterday as I was working on my AIR app that uses separate NativeWindows.
Essentially what I wanted to do was call a method in another swf and pass it an argument.. a path to a song in the local file system. The way I approached this was with LocalConnection. (If there is another way to communicate between NativeWindows please let me know!) I had set up listeners in the swf for a status.level of either 'status' or 'error' so I could make sure I was actually communicating. Every time I tried to communicate between the two swf's I would get an 'error' condition. What was the problem? It seems that in AIR you must allow the local domain. As soon as I added:
_conn.allowDomain('*');
Everything worked fine.Hopefully this will help someone searching for some answers on communicating between windows.
Posted by noti at 7:58 AM 0 comments
Labels: Actionscript 3, AIR, LocalConnection
Sunday, February 3, 2008
Multiple Windows in AIR
I was working on my MusicPlayer app and I wanted to open my player from the playlist manager in another window. This actually isn't very hard, but if you're not careful you'll open the new window and nothing will appear! That's because after you've initialize all the NativeWindow properties you MUST set the visible property to true. If you don't, the window is created but nothing is visible on screen.
Luckily for me I was opening a swf with sound or else I wouldn't never known something fishy was happening and might've thought I was initializing it incorrectly. I could hear the music but I couldn't see anything. After reviewing some examples, I could see the error of my ways.
On a similar note, make sure you set the stage.scaleMode and stage.align properties for the new window or else you may end up with a very odd sized loaded asset.
Posted by noti at 8:55 AM 0 comments
Labels: Actionscript 3, AIR
Friday, February 1, 2008
I'm BACK!!
After a looooong break with job changes and freelance work I'm back blogging again. I'm going to try and keep my blogs now to all my experiments in AIR and Actionscript 3 and post the results whenever I can.
My first post back is about a little problem that had me pulling my hair (what I have left of it) out. What should've taken me about 10 minutes took over 3 hours! I'm hoping this may help someone else out and save them the aggrevation. It has to do with the latest AIR beta 3 update available at adobe labs.
Being the impatient person I am, I always love to play with the lastes toys, I downloaded the latest AIR beta update. The first thing you have to know is that you HAVE to update your Flash CS3 to Flash 9.0.2. That took me about two attempts to install the update to figure out (the updater just states something along the lines of "This program does not qualify for this update.".. very helpful). After that was complete the updater worked, but none of my AIR apps would compile it kept giving me the error that a class couldn't be found. That really confused me because I knew I had updated everything. I then tried the command in Flash "AIR - Create AIR file" which still produced the same error. Now I was really confused. After some searches on Adobe labs, it stated that this error will only occur on the first compile... which wasn't happening (at least for me). After tinkering around I finally noticed that on another file that did compile the following was missing from the publish settings in the Actionscript 3.0 classpaths:
$(AppConfig)/ActionScript 3.0 AIR 1.0/Classes
After I added that to my newly created app, everything compiled correctly. Now I just hope Adobe makes things a little easier when version 1 is released.
Posted by noti at 12:18 PM 0 comments
Labels: Actionscript, AIR
Tuesday, April 10, 2007
It's Pimpin'...
Well it's finally finished and live, (No not my portfolio), the site I've been working on last month for MasterLift... pimpmylift.ca!!!
This has been the largest AS2 project I've worked on. It has 23 classes.. a main document class, 2 controller classes, and each section that inherit from a Section class. I've learned a lot form this project and hope to carry what I've learned on to some new upcoming projects.
I was only commissioned to build the Flash front end, nothing after you're "Done" so the way some things function aren't standard but they work well just the same. Try it out and send some pimped out forklifts to your friends.
www.pimpmylift.ca
Posted by noti at 12:30 PM 0 comments
Thursday, April 5, 2007
Crazy or genius?
I resisted posting this for a variety of reasons but I figured I'd give in.
If anyone has seen the movie EdTV then you may get a kick out of this. A new website (social experiment) has started with the same premise as EdTV. It's called aptly enough, justin.tv. A guy named Justin wears a webcam that's online 24/7.
Now based on the fact it's very difficult to connect and lately it's getting worse, I think it's growing in popularity. But I have to ask why? Why is it that we want to see someone' s boring daily life. Is it human nature just to see what someone has and compare ourselves to them? Or is it something else? Personally I think this experiment (if you can call it that) is ludicrous. But I think I'm in the minority. And the fact I'm posting this must mean I been affected some how.
Take a look and judge for yourself. Are you compelled to watch? or do you just walk away?
BTW - A very cool project I been working for a forklift company is due to launch Monday. I'll post a link when its live.
Posted by noti at 8:06 AM 0 comments