Posts Tagged FlashDevelop

I am Flash Developer

This isn’t the next article I wanted to write but it was on my list since Flash In The Can Toronto (2010). It comes from all the talks surrounding the refusal from Apple to let Flash on the iPad ( i guess we can just say iOs now).  During that period a lot off people (including me) where uncertain about their future. I mean when someone as powerful as Steve Jobs tells you that your job shouldn’t exist, you think about it twice. Out of the turmoil that ensued, some voices touched me more than others. What they were saying is that they, as developers, weren’t tied to a technology and that if Flash was to disappear tomorrow, they would still have a job. That got me to think. A lot. The next thing that affected me was something I heard at FITC concerning designers. How they don’t call themselves ’Photoshop Designers’ or ‘Corel Draw Designer’ (I tried to think of another product than Adobe but just could come up with Corel Draw (who uses that anyway), but you get the idea). I think this follows a bit the same vibe as the comments from the Flash dudes.

All of this feed my reflexions, I mean I have tried a lot of technologies (all things in perspective, I am still at the start of my career, so I humbly say so). I have tried Java, PHP, MySQL, C, Flash, ActionScript 2 and 3, HTML/JavaScript/Css, Ajax, Asp, C#, Python. And you know what? There is nothing I like better than doing ActionScript 3. I mean the tools help a lot; FDT (yes I said it, I now like FDT) or FlashDevelop for code and Flash CS5 for visual assets. I like the workflow, I like making PSDs alive, I really like using TweenLite to make stuff move, I like figuring out how to build my applications so that they minimize load time and CPU usage (I also like maximizing CPU but don’t tell HTML5 fanatics, they know jack shit about pushing limits, yet, but they will know what I mean when they taste it, which will happen for sure). All of that I can’t get from any other technology to the extent that Flash does it right now.

It’s been 2 months that I am at B-Reel right now. I really love it, but the project that I am doing right now mostly doesn’t involve Flash ( I managed to stick a bit of Robotlegs in there) and is mainly Javascript/Html/Css. I really look forward to doing a Flash project. I really don’t want to do html ever again. I don’t have fun doing it (well I am just speaking about the technology, the project itself is amazing). Also, I feel the world of Flash is so deep and there is so much you can do to get better that if you learn all of the other technologies you can never get truly as good on the Flash Platform as one could be. For all of these reasons, that is why I am Flash Developer, that is my title and I am not ashamed or feel diminished by it. It really defines me.

With that being said, it gives me security. I think I am not alone in this situation. I think Flash gives a mean to express themselves to a lot of people and because of that, you can be sure that these people will produce tons of cool shit with it. And other people will want to see that cool shit. That gives a reason for Flash to be. Someday there will be Flash on the iOs. You can be sure of that (I mean Steve Jobs has an expiration date, right?)

, , , ,

17 Comments


And now an AS3 Project – Robotlegs project template for FlashDevelop

So yesterday I gave you files templates for Robotlegs. I now give you a project template. File templates are used when you want to add a new file to a project, project templates are used at the creation of a project. It will create the folder structure, add libraries and create the basic files you will need in most projects of that type.

In this Robotlegs project template I added 7 files : Preload.fla, Main.as, IMain.as, MainContext.as, CreateModelsCommand.as, CreateMediatorsCommand.as and ApplicationModel.as.

I added the Preload.fla because has explained in this post, I pass the loaderInfo(I do this to pass the flashvars) from the preloader to the loaded Main so I thought it would make understanding why I did that in the Main easier. This is a template preloader so there is no graphics in it, just the basic code to make a preloader work.

In the Main.as I also do some weird things, namely this:

if (Capabilities.playerType == "StandAlone"){
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
init(this.loaderInfo);
}
 
//and this in the init method
if (Capabilities.playerType == "StandAlone"){
local = true;
}

I do this to test locally without having to compile the preloader every time. Also, I might need to know if I am local if I use AMF. In that case, the url for my gateway will be different.

For the rest, it is pretty straight forward, a MainContext for the application that will start it, a command to create the models, a command to create the mediators and finally an ApplicationModel. I don’t create the ApplicationModel in the CreateModelsCommand because I want to parse the data(parameters) inside of the LoaderInfo I passed in the constructor of the MainContext.

If you use this project template along with the files templates, you’re in for major time saving while enjoying Robotlegs!

Here are the files:
000 ActionScript 3 – AS3 Project with Robotlegs.rar

So when you downloaded the files, go in FlashDevelop, in the top menu select Tools and then Application Files… This will open the application files folder of FlashDevelop. Now go in the Projects Folder and add the files that you downloaded (copy the “000 ActionScript 3 – AS3 Project with Robotlegs” folder there). Now the next time you create a new project in FlashDevelop, scroll down and you will see it.

You may not agree with everything that is in those templates, then there is two things you can do. Either discuss about it in the comments or modify my project template. It is very easy to do so; I never even looked at documentation to learn how to do it.

, , ,

3 Comments


Robotlegs templates for FlashDevelop

I just finished my first project using Robotlegs and I can say I really like it. Way less code to write. The only thing that bothers me is that you have to create new Events when you want to pass around complex data but I think AS3Signals might fix that so I will look into that later on.

Since I have all my templates for PureMVC done in FlashDevelop, I thought I would do the same for Robotlegs. So I have built a template for a Command, a Context, a Mediator, an Actor and I also put in a ResizeModel (I know some people do this in a mediator but if you want to change this go ahead). Now, I don’t think these will be perfect, but it is a good starting point.

I am also working on a AS3 Project – Robotlegs template, but I want to try it out before I give it out. When I am pleased with it, I’ll post it along with an update of the other templates.

Here is the files with the templates:

RobotlegsTemplates.rar

To add them in FlashDevelop, in the Tools menu click in Application Files. This will open the folder where the applications files for FlashDevelop are. In there open the Templates folder, then the ProjectFiles folder, then the AS3Project folder. Now copy the Robotlegs folder you downloaded there. To use them, in the project view in FlashDevelop, right click on a folder, click “Add” and then Robotlegs. At that point you will see the five templates you just added.

Robotlegs Templates for Flash Develop

, , , , , , , , ,

3 Comments


Log, trace, log, release, log?

Ok, this title doesn’t make sense if you haven’t read the article which goes against the concept of title, but I find it funny!

So here I was looking for a solution to the problem I think every Flash Developer most have had: I can trace fine when I am in the Flash IDE but sometimes I need to test in the browser and then I loose my traces…

Easy solution: use a logger tool like Alcon or MonsterDebugger.

Problem: it’s annoying. When you are at the point where you need the extra logger you need to find the ActionScript classes to make it work blabla.

What I want is an elegant solution that when I test locally it uses the trace and when I test in the browser it uses the logger. I was already using the snippet for trace in FlashDevelop so I thought I could make a snippet that would have this if statement and do just that. My first bump in the road was the fact that I didn’t know how to add an import statement when using a snippet at a different place in the code.

So while looking in the FlashDevelop forums I came upon FDTracer. Well it doesn’t exist anymore, it was a pluggin before but it is now an integral part of FlashDevelop. Turns out I always had it under my nose but I never knew about it. It would be nice if in the interface they actually tell what it is and how to use it.

So here are a couple of pictures to show you where that logger is. In FlashDevelop, under View it is called Flash Log Viewer and is by default one of the tab at the bottom of the program:

What this thing does is that it reads the logs that the Flash Player writes on the computer. You see, when you put the final swf on the server and the user plays it in his browser, all of your trace statements are written in the log file. That is why leaving trace statement in your final release is not that good for performance. Anyway one last thing to know is that you actually have to start it before it works. So press the little play button and start seeing your trace.

What is cool with this little thing is that it will work locally and in the browser, you don’t have do to anything(execpt press play) to make it work. Also if you feel spyish you can check the trace from Flash website made by others.

So yeah, please clean your traces…

, , , , , ,

10 Comments


My verdict on FDT

I said I would try FDT for a month and I am sad to say that I did not find it superior to FlashDevelop. FDT has some good sides and even stuff that it does better than FlashDevelop, here are some:

  • compile errors while editing
  • debugger
  • ant support

But it has two major problems, first it is built on Eclipse which makes it much more complicated than it should be. Secondly it is very expensive (well I had more problems with it than just that, but these are the game changers). I don’t even understand why it cost so much… It even cost more than Flash Builder. Anyway that seems weird to me, but maybe it’s just me. Anyway in comparison to FlashDevelop which is free, it doesn’t stand a chance.

While venturing in the FDT world we came across templates, snippets and short keys. Those are very useful things when you use them. Templates are also time savers when you are using PureMVC because when you want to create a Mediator, all you have to provide it is the mediator name, and it’s view  name and type and it will generate the rest; no more copy paste from other mediator. Also project template are very cool. Snippets are mini templates, for example to generate getters and setters. Short cuts are combination of keys you press to do an action instead of going trough a menu to do the same action. Well, it just happens that FlashDevelop has all those things, but I just wasn’t using them… So out of all this I came out with increased efficiency.

FDT might still be a very good tool, mostly if you are already familiar with Eclipse, but for me FlashDevelop is still the way to go. If  FlashDevelop gets a Debugger than I won’t even ask myself the question.

, , , ,

9 Comments


New FlashDevelop beta version

This is just to tell you that there is a new version of the beta of FlashDevelop 3(ActionScript editor). There wasn’t any change since august 25th. I didn’t try it yet, but I soon will, it can only be better.

, ,

No Comments


9-slices scaling, Papervision 3D, Tweener and FlashDevelop

I am currently working on a website with tons of rounded corners, so I’m pretty happy they added 9-slices scaling in Flash 8. The only problem I had today, was that I wanted to apply 9-slices scaling on a mask and it happens that you just can’t. You can’t do it using ActionScript and you can’t use it using the Flash Authoring tool. I don’t know about flash 9, but I sure hope they will get that to work.

I also stumbled upon something that looks pretty cool: Papervision 3D . The name says it, you can use it to do 3D in flash, haven’t tried it yet but it looks sweet. And while browsing their website I found a nice example using Tweener which I spoke off recently. They’ll both deserve more investigation.

Finally, on the same project I am working with all those rounded corner I am using FlashDevelop. I use it because I find the Flash Authoring tool to be really bad (Flash 8 ) for ActionScript. Well I said FlashDevelop was good, but I would rectify what I said, and now say that it is still experimental. I had all sort of problems with it, mostly with the auto-completion tool completing things all the time which I didn’t ask for . Just thought I’d share that with you.

, , , ,

No Comments