Aug
12
2009
Update: I should have waited to do this post (rather than do it at midnight). I could have just pointed to several other great posts that have some great opinions.
http://flashartofwar.com/2009/08/13/what-the-interface/
http://ncannasse.fr/blog/the_failure_of_as3
———————————————————————————————————————
The Flash developer community is up in arms (http://blog.joa-ebert.com/2009/08/06/this-is-an-outrage/). Although I don’t have any links, I am sure designers are too. Designers haven’t been too happy about AS3 after all. Lets face it, we all have dedicated a lot of our brain cycles to the Flash Platform. We have our reasons to love and hate Adobe. We all want the Flash Platform to become perfect. Are we asking too much?
If you look at posts like The Future of Flash (http://onflash.org/ted/2009/08/future-of-flash-platform.php) you get the feeling that as long as you are loud enough Adobe will listen. Lee Brimelow says (http://blog.joa-ebert.com/2009/08/06/this-is-an-outrage/#comment-174005) that there are too many wants and just not enough time. I for one believe them both.
The way I see it, the real problem is that there is no transparency around the future of the Flash Player and the Flash IDE. Maybe we have just become spoiled because we got info about Flash Catalyst long ago (Thermo at the time) and we get early beta’s of other tools. Heck, the Flex SDK is open source. You can pull down nightly builds of it. We are getting used to the idea that Adobe is open. Even Adobe wants people to believe they are open (http://www.openscreenproject.org/). So all this openness, but still very little information around Flash Player and Flash IDE comes out.
So, my first request is that Adobe think about being more transparent about the Flash IDE and Flash Player. If there really aren’t any changes coming, then say so. If you are going to try to implement a feature the community is asking for, let the community know. If it isn’t going to make the cut in the end, let us know. We can take it. Sure some people might get upset, but they already are right now because they don’t feel like Adobe is listening. While you are at it, why isn’t the Flash IDE’s bug tracker open to the public?
no comments | tags: ActionScript3, AS3, Flash, Flex
Jul
29
2009
For anyone who doesn’t know about the situation between Aral Balkan and Sys-Con (a.k.a. Ulitzer) you can start here http://aralbalkan.com/2284.
This post is just to add some data to the ongoing situation. In this post (http://aralbalkan.com/2316) Aral breaks down what progress has been made, and where to go from here. He also provides a list of all the people listed as authors (http://aralbalkan.com/2303) and asks for help notifying people on the list of the going ons (its 6,287 long!). Finally he posts that on the sys-con domain each article is duplicated 437 times. If you consider that it is also duplicated exactly the same way on the ulitzer domain it would be double that number.
But that is not all. I found 18 more domains that could be duplicating each article again. Now subdomains don’t seem to work on these domains, they just link back to ulizter, but still we are up to around 890 times that every article is pushed out there.
Here are the domains that I found:
www.blog-n-play.com/node/40838
www.yachtchartersmagazine.com/node/40838
www.itvcon.com/node/40838
riabook.com/node/40838
flexseminar.com/node/40838
ajaxworld.com/node/40838
realworldajaxbook.com/node/40838
ajaxseminar.com/node/40838
realworldjava.com/node/40838
cloudcomputingexpo.com/node/40838
www.virtualization-europe.com/node/40838
www.virtualizationconference.com/node/40838
rubyonrailsseminar.com/node/40838
www.iphonedevsummit.com/node/40838
www.openwebdevsummit.com/node/40838
soaworld2008.com/node/40838
www.soaworld2009.com/node/40838
soaworld2007.com/node/40838
no comments
Jul
10
2009
Normally I listen to music while I am writing code. I do this to help remove outside noises and the distractions of other’s conversations. I know I am not alone in doing this as it is common to see developers hacking away with headphones on. Recently I found two problems with this technique.
First, I think I need to find some new music because it doesn’t seem to be working very well lately. I find that conversations around me are catching my attention and that I am no longer noticing the music. I suppose I could just crank up the volume, but my ear drums wouldn’t appreciate that.
The second problem I have been noticing is that there is another distraction. One that music is doing nothing for. One that only gets worse the more I cut off the outside. This distraction is my mind. You see, I usually have a lot of things going on just as most of us do. I have a daughter who is about to turn 1. I have a wife who stays home to raise our daughter, which means I am her main form of human contact. I have a full-time day job, and I have a lot of ideas that flow through my head. These range from things around the house, side development projects, thoughts of researching other technologies and recently, a particular interest that I will post about soon.
After seeing a recent uptake of people having video running while they work, I got to thinking. Maybe this would be just enough distraction to allow me to focus. So a couple weeks ago I watched Wall-E on Netflix streaming. That didn’t work out too well as I wanted to actually watch it as I had only seen it once before. I almost wrote the idea off, but decided to give it another shot this week. So yesterday I browsed Netflix instant play selection and came across Coupling, one of my all-time favorite BBC shows. I have seen every episode of the first 4 seasons before so I am thinking I won’t need to actually ’see’ most of it.
Two days in and I find that this works great. I am slightly distracted with the show, yet I maintain focus on my current project. I am no longer trying to mentally write code for side projects. I am no longer trying to design a box to hold a LCD panel and camera (hint of future project). My mind no longer wanders to other things, obviously two things is enough. I can’t see myself doing this all the time, but in times when I have a particularly distracting side project, or life issue I believe this will come in very handy.
I would love to hear your solution for staying focused. Do you listen to music, watch movies/TV or do you not have this problem?
no comments
Jan
22
2009
I think the Event metadata tag is broken. Yes, it can accomplish what it needs to, but rather than being something that just helps a developer, it seems to be a pothole in the road. There are two basic issues with it that I wish could be changed.
Issue 1. Why do we need to add these anyway? The compiler should be able to quickly determine if a class dispatches an event and add it to the code hints.
Issue 2. Why the crazy behavior? It seems like the Event tag should be simple to implement, and if you are just firing a default Event as a custom type, no big issues should arrise. But if you have a custom event class where you put your public static const to describe the types that it should fire, this is where things really start to break down.
So let’s say we have a custom event called NodeEvent. We will be using this event to fire a load complete notification and passing the node that fires the event along.
public class NodeEvent extends Event
{
public static const COMPLETE:String = "Complete";
private var _node:Node;
public function NodeEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false)
{
super(type, bubbles, cancelable);
}
public function set node(val:Node):void
{
_node = val;
}
public function get node():Node
{
return _node;
}
}
Now in our Node class we want to dispatch a NodeEvent
var ne:NodeEvent = new NodeEvent(NodeEvent.COMPLETE);
ne.node = this;
dispatchEvent(ne);
So far so good. But lets see what happens if we add the Event tag.
[Event(name="Complete", type="com.artjumble.events.NodeEvent")]
Well this won’t work. This is what you get in your code hint:
NodeEvent._COMPLETE
Two problems with this. One is that it sticks an underscore before any capital letter for the value of the event type. The other is that this doesn’t even match our public static variable. In this example it doesn’t seem too bad, but what about this: You find that this “complete” collides with a standard Event.COMPLETE so you want to change it to something more unique.
public static const COMPLETE:String = "myUniqueEventName";
Now in the code hint you get
NodeEvent.MY_UNIQUE_EVENT_NAME
This is completely backwards. The tag should be using the variable NAME, not the value. It seems really weird that it is setup this way when you consider the simple fact that having a public static variable like this is just for the reason that it helps lower the changes of making an error by typing in the string value of the event type. So you think it would only make sense that the Event metadata tag would do the same thing.
Unfortunately, this will most likely not get fixed as it would break code that is already written. So for now if you want to take advantage of the Event tag, you need to follow this kind of naming convention:
public static const MY_CAMEL_CASE_EVENT_NAME:String = "myCamelCaseEventName";
no comments | tags: AS3, Code, Flash, Flex | posted in Code
Dec
30
2008
So this question seems to come up a lot. Like every other week a lot. So this post is a quick and easy way to load fonts at runtime for use as embedded fonts. This version is geared to Flex development and I may post again later on how to do this type of thing in just Flash.
So this is a two step process. Yes it is that easy.
Step 1
Create a css file that embeds the font you want to use. Here is an example:
@font-face {
src:url("C:\\WINDOWS\\Fonts\\arial.ttf");
font-family: Arial;
}
@font-face {
font-weight: bold;
src:url("C:\\WINDOWS\\Fonts\\arialbd.ttf");
font-family: Arial;
}
@font-face {
font-style: italic;
src:url("C:\\WINDOWS\\Fonts\\ariali.ttf");
font-family: Arial;
}
@font-face {
font-weight: bold;
font-style: italic;
src:url("C:\\WINDOWS\\Fonts\\arialbi.ttf");
font-family: Arial;
}
Save this as Arial.css.
Now in FlexBuilder just right-click on this file and select Compile CSS to SWF. You can also run the compiler on the command line just like this:
Step 2
The swf that is created in Step 1 is a module that when loaded automatically registers the embedded fonts in it. If you use the ModuleLoader the just loading the module does all the work. If you use the ModuleManager then you have to make sure to call the factory’s create method.
NOTE: I created a nice little tool that helps in creating these font swfs at work. I am thinking that I might attempt to create this kind of tool as an AIR app. I will post again if I do this.
no comments | tags: AS3, Flash, Flex | posted in Code
Dec
15
2008
Nate Beck posted his reasons why you should contribute to the Flex SDK. All great reasons and persuaded me to sign up as contributor. Now I just need to remember to look for areas to add to.
no comments
Oct
24
2008
Well that took long enough: Flex 3 Style Explorer
no comments | tags: AS3, Flex | posted in Code
Oct
23
2008
Ok, I found this a bit odd.
The old document type of xml node, XMLNode has a property nodeType that returns an int that aligns with XMLNodeType constants. But the new e4x based XML has a property nodeKind that returns a string stating what type the node is. Unfortunately, there doesn’t seem to be a class to check this against.
no comments | tags: AS3, Flash, Flex, XML | posted in Code
Oct
22
2008
I ran into a strange issue with the release of Flash Player 10. For some reason anything with audio in it, including loaded mp3s, swfs with audio on the timeline and loaded flvs, would quit working when I updated to FP10, yet worked fine in FP9. After hunting for most of the day I finally found the issue. It seems to be related to an anonymous function as an IO_Error handler when loading the sound. Here is the (very) offending code.
private function loadBackgroundMusic():void{
var file:URLRequest=new URLRequest("background.mp3");
BackgroundMusic=new Sound(file);
BackgroundMusic.addEventListener(IOErrorEvent.IO_ERROR,function(e:IOErrorEvent):void{});
BackgroundMusic.play(0,int.MAX_VALUE);
}
As you can see this is some one’s (name to be withheld) idea of a nice small implementation of loading a sound and looping it. Well FP10 chokes on it when the background.mp3 is not found.
Follow up: This problem is in version 10.0.12.36. It is also in all previous public releases (RC/Beta), except the first one 051508. It does not seem to happen at all on Mac.
Here is the official word on the problem:
This error occurs as a result of playing an invalid file (which you’ve already discovered). If a Sound object is given the play() command when it’s data is corrupted by an incomplete/invalid load, you’ll experience the interruption of media playback that you’ve been seeing on your site.
Trevor McCauley – http://www.senocular.com
no comments | tags: ActionScript3, AS3, Code, Flash, Flex | posted in Code
Oct
21
2008
Yeah, I know. So overused it isn’t really funny anymore. Oh well.
To start with this is pretty much just a place for me to post things that I will want to find in the future. Maybe it will turn into more sometime… or not.
no comments | posted in NA