Learned about a promising library for Actionscript 3 today, Casalib. There will be more information about the library, as I’m just starting to get to playing with it.
Something that has been pissing off recently, has been the lack of ability to easily reference the stage from any object in AS3. I find myself building controllers to manage objects in the stage, and I have to play tricks with passing objects around. Why I haven’t written a class to access the stage is beyond me.
In looking at the blog for Casalib, I saw a post Get Access to the Stage Wherever You Need It.
I’ll quote the article below:
In ActionScript 2, it was possible to access the stage from anywhere, through the static Stage class. With ActionScript 3, we lost that ability, and only display objects were permitted access—and only once they had been added to the stage.
To help you get access wherever you need it, CASA Lib for AS3 has a utility class called
org.casalib.utilpackage. It’s a static class that lets you keep track of the stage (or multiple stages if you’re developing an AIR app with multiple windows). Here’s how we recommend using it.
In the constructor of your main document class, just call this line of code:StageReference.setStage(this.stage);
Now, throughout your entire site or application, you can get access to the stage reference from anywhere by using this line of code:StageReference.getStage();
I know, can you believe it? All this drama, and we find out they’re both amicably working towards a solution.
Saw it on Apple Insider, Adobe, Apple working together on Flash for iPhone.
Seems like it was announced recently.
Apple Insider mentions that Apple has been trying to tout HTML 5 as a replacement to flash on the iPhone. I know HTML 5 has some cool toys in it, but not nearly enough to meet why people demand Flash on the iPhone — because everyone is already USING flash on the web. Saying you provide a desktop like browsing environment and not including Flash is a big deal to me.
This made me happy to read (except the HTML 5 part). Hope you enjoy the news too!
I’ve asked myself the Flash or Flex question recently and wanted to post my thoughts.
It’s a good idea to think about platforms when building web applications ahead of time. Factors I traditionally use, but will not reference here, are the current employee skillsets, ability of the team to learn, and cost to update software. I know — it’s good to get updated software in a company, but sometimes it just doesn’t make sense for a company to spend $1,000 for 5 users, to maintain a project that only costs $5,000 to build. If the company is already equipped with Flash but not Flex — it may make sense to choose Flash even though the project doesn’t lend itself.
That being said, here’s the breakdown of Flash and Flex
Flash has always been the tool used by develops wanting to create vector animations on the web. Recently Microsoft has introduced Silverlight, we will be ignoring that option for this scenario as I don’t believe I have the expertise to judge Silverlight.
- Comes with standard Adobe Creative Suite Bundles
- Timeline based animations
- Hand animated assets
- Standard Animation
- Self Created Vector Assets
- Highly customized interfaces
- Animation / Design leaning IDE
- Familiar environment, as it is the standard way to deploy SWFs
- Not meant for AS3 development
- Becomes a basic text editor in most Object Oriented development exercises
- Timeline approach means maintenance is more expensive long term
Basically Flash is the ideal environment for development if you are doing things such as banners, animations, logos, or any other visual type of project. It leans itself towards graphic design and animation.
Flash is found in the Adobe Creative Suite 4 Web Premium
Flex is the newcomer to the vector animation IDE’s from Adobe. Flex is primarily targeted at developers working in the Flash environment. Flex 3 Builder is a modified Eclipse IDE. The Flex platform was built to enable developers to adapt better to Flash, and be able to create Flash O-O applications.
- Developer friendly IDE
- Built in components for standard GUI elements
- Meant for highly interactive applications
- Performance tools
- Maintaining code
- Can leverage SWFs
- Can leverage AS3 code
- No Timeline
- Not for designers
- May seem “cryptic” to traditional Flash developers
- Not visual
- Requires learning new MXML code
- Complex working environment
Flex is meant for application development. The IDE lets developers work in a familiar environment, separate from the graphical tools designers are traditionally used to. Flex will give developers the tools they need to rapidly prototype application interfaces, with standardized tools and interface elements.
So which one should I choose?
Ultimately both Flash and Flex compile into the Flash SWF format. That means they are both capable of the same functionality and same graphical quality. The major difference is in the individual building the SWF, as well as the goal of the SWF. If your goal is for a design oriented SWF, then go with Flash. If you want an application, or a complex interactive interface then Flex will most likely be your tool of choise.
We’re all web developers here right?
Most of us?
At least, I am.
An article posted at DrunkenFist.com, Why Front End Performance Matters to Everyone, Not Just the High Traffic Giants, goes into why front end performance is important on all sized sites.
The article quotes a commonly spoken theme in web development:
That stuff is for the Googles of the world. We don’t really need to focus on that with what we do.
I hear it all the time from people. That there isn’t a need to worry about that 35k 120×120 JPEG on the home page. Lets make it animate, even if the single function adds 28k to the page download.
What sticks with people is hearing that when google shaves off some small amount of file size, the result is something like $50,000 / hour in return. This number is made up, but meant to illustrate a point. To small store owners, $50,000 is a large number. To google, it is very small. Small business will possibly realize a few dollars a month with extensive optimization, assuming their hosting plans are even based on that at all.
What’s the point in optimization if we only make a few dollars a month?
The end user experience. The user experience is not quantifiable in terms like “$10 / hour”, it is just as important. A faster web page, more solid web page, reflects the business itself.
If a company is always interested in making all of their processes more efficient, then it is more likely that whatever they do for revenue has the same types of optimizations. Over years, optimizations can become quite dramatic.
If this year a website only gets 1000 visitors, and of that only 10 of the users realized the benefit of the optimization — that doesn’t mean much. However, what if one of those 10 users just happens to run a blog in your industry?
The point of all of this, front end performance is important. You can almost always improve the user experience.
As an exersize try to build a standard webpage with a miniscule allowed footprint. I’ve always had the most fun with flash banner ads that must fit into 10k or 20k file sizes. You will gain an understanding of what you are working with, and become more of a craftsman in your work.
Flash banner customization has helped me understand the following skills:
- Embedded fonts — picking which letters to embed and fonts to embed
- Sometimes vector art in Flash is much more efficient than imported graphics
- Sometimes vector art in flash is NOT as memory efficient as imported graphics
There are always tradeoffs in everything we do. Until we push our work to the edge, we rarely see how to control it.
We’ve been waiting for it, and the G1 has now demoed running Flash Player 10.
Andy Ruben has demoed that Flash can run on Android. In Andy Ruben demos Flash on the G1; it won’t be long now, we read that on November 17th at the Adobe MAX event Andy Ruben was able to demo Flash.
See the video below:
In the 2008 presidential elections, CNN had some pretty “cheesy” special effects.
CNN tried to involve “holograms” (they were far from holograms technically) into their live coverage. In reality, it was mostly augmented reality that they were using. Give them credit for trying something new. It would have been nice for them not to say it was a hologram. For the next 5 years people are going to see real holograms and say they saw CNN do it better in 2008.
Boffswana (formerly Digital Pictures Interactive) has published the source code to a Papervision and Flash powered augmented reality.
Papervision – Augmented Reality, lets you print out a symbol and place it on your desk. When you start up the flash movie and let it access your video camera, you can move a 3d object around in the flash movie — augmented reality .. not a hologram — and see a 3d monster object move around as if he were on top of it.
They provide source code and printouts. How fun.
A video from there site is below:
Sometimes when you start out doing something on computers, it seems so hard until you get the tools that everyone else uses.
In this post I’m asking everyone else for feedback, what do you like to use? Go ahead and comment it in there, I’ll add it to the article as I see em.
Below are some of my favorite pieces of software for web development, some will be very obvious (Flash, Photoshop, etc.) … some maybe not so much:
I love textpad for basic text changes from everything PHP, to HTML, to writing notes. It’s great to have multiple documents, line numbers, quick global / file / local search and replaces etc. I use this when I’m working with source files, XML definition files, CSS files, to CFM or other formats. I love it.
Those of you who know homesite, will know it’s pretty much gone nowadays. The heyday was many years ago. The direct FTP editing was amazingly useful. It has some features that I still go back to now and then. Mostly search and replace functionality, FTP based editing (right on ther server … mostly), document formatting (code sweeper), and other utilitarian functions.
Working on the web, we all are in constant use of FTP (more so than we should be). Cute FTP has always been a staple of my software toolbox. It’s so easy to launch connections to all the FTP servers you use throughout the day, keep them open for jumping between projects. The number of protocols it supports is flexible (FTP, FTP w/ SSL, SFTP, HTTP, HTTPS, etc.), and it always seem to be able to connect. The speeds and setting are highly configurable. It’s nice having 50 simultaneous downloads going at a time.
Whoever isn’t using SVN, should be using SVN (or CVS or whatever other version control system you can think of). Tortoise SVN is an essential windows interface enhancement to integrate SVN into the file browser. For those of you who use CVS, there’s a Tortoise CVS as well. It is easy to look at version histories, compare files based on modification dates, and to pull down new updates.
Source control is underutilized in my experience. So many sites aren’t run with source control. Think of the advantages: automatic source control, automatic offsite backup (if you use an external host — which I would love to recommend svnrepository.com, a very cheap hosted SVN repository). Read about it, get used to it, it will save a project.
You were waiting for me to say it weren’t you? An open source IDE. Technically it started as a Java IDE (most Java developers should be intimately familiar with this). Thanks to add-ons developed by the community, it supports, quite adeptly, PHP and other web development technologies. It has built in SVN support, supports deployment scripts… its amazing. Try it, explore the community around it. Check out the Subclipse add-on, as well as the Web Developer Tools, and Eclipse XML Editors and Tools.
Adobe Photoshop (Adobe Creative Suite 4 Design Premium)
Another obvious one. Photoshop is a requirements for all web development. No, you shouldn’t be doing web design work as a developer. However, there is always the need to look at colors, size things, cut up images, process original artwork, the list goes on forever. I really recommend the Adobe Creative Suite, we use almost all of the software anyway.
Microsoft Word (Microsoft Office)
You will always need this (or another decent word processor). Yes, you can get by without it. However the sheer amount of things Word can handle: Estimates, Proposals, Letterheads, Envelopes, Labels, the list goes on and on.. you will wish you had it someday.
Microsoft Excel (Microsoft Office)
Another one that you don’t always think about, but excel makes writing estimates so much easier. You can update your entire estimate based upon a new discount, manage hours, track changes. I’ve used Google’s online spreadsheets before – they are great. But they aren’t fully able to replace excel yet.
Microsoft PowerPoint (Microsoft Office)
Those proposals are much better with an accompanying presentation. Tell your clients what you do, what they need, in a way that can impact people in a conference room. Everyone yawns when it comes to yet ANOTHER powerpoint presentation, but you look unprofessional without one in most cases.
Normally this is on a hosted platform, but you need a database to do the cooler web development projects. MySQL is cheap, but if you want you can substitute in Microsoft SQL Server, or even Oracle. In my experience if you know why you want MS or Oracle, you can pay for them. If you don’t know why you want either of those, just go with MySQL.
PHP MY Admin
Administration software is just as important as the backend engine, at least for development. It lets you manage a database online, easily, and export simply. If you haven’t used it, try it.
SQL Server Management Studio
Another tool for development on SQL servers. Same as PHP My Admin, arguably much more helpful, but it is a client app. If you’re working with Oracle, or prefer these desktop applications to the PHPMyAdmin web interface — check out Aqua Data Studio.
There are really dozens more tools I consider very useful. Not exluding:
– Versions of all browsers
– VPN Connectivity software
– Remote Desktop
– VNC Client
– pcAnywhere (not so much anymore)
– Outlook / Email Client
Last but not least, is Google. It is the best tool you will have when working in web development.
A topic I am highly interested, the intersection of two of my favorite technologies — Adobe Flash (earlier, Macromedia Flash) and the iPhone.
Although there are reports that Adobe is investing in porting Flash over to the iPhone, Flash for the iPhone (seangw.com), according to the iPhone SDK agreement, recently published by wikileaks.org, “No interpreted code may be downloaded and used in an Application except for code that is interpreted and run by Apple’s Published APIs and built-in interpreter(s).”
Personally I just cannot see Apple eliminating Flash from the iPhone. It is a power struggle between Adobe and Apple, but why? Adobe’s applications have supported the core Apple “worhshippers”, designers, who have used Apple devotedly for decades. The only thing that Flash does for the iPhone is eliminate control by Apple over content on the iPhone. We all know it’s going to happen sooner or later.
Some other arguments Apple is using, or that can be conceivable are:
- Lack of control over applications
- Goes against the iPhone developer’s Terms of Service specifically prohibiting Flash from appearing on the iPhone.
- Customer support complaints regarding flash (given the already large number of requests for the iPhone)
- Battery life issues
- Straining the iPhone’s limited resources
I’m doing some research into what other people use as their desired AS3 package/class structure.
In reading a handful of articles and reviewing some code, I ran into the following post:
- AS2 has a flexible approach to packages
- AS2 package names are more closely associated with the location of the FLA
- AS3 requires full use of packages if you want to use classes or objects
- AS3 requires the use of “public” as a definition of scope
Go there, read it.
In his post, he analyzes the benefits and problems associated with pie based navigation.
The greatest benefit, is that users associate a direction with an option — and can form habitual patterns of behavior. This makes the navigation seem very logical.
To contrast with that, when the user gets comfortable with the location of navigation this way, he becomes very set back when that navigation structure changes.
Think about it as your car. You, in your driver seat, are in the center. Around you in all angles are different options for you to execute. You know exactly where to look to find what you want. It’s the same interface that web users can use. They can efficiently get their mouse to the option they want.
Alternatively, imagine every button in your car were on a long list. You know where everything is, but you have to skim over all of the buttons whenever you want to hit any single other one. You also have to reach further for some buttons than others.
The average distance the mouse has to travel is minimized, as all options are placed around the mouse at an equal distance.
It’s a great idea. Maybe the basis for a Flash navigation experiment in the future.