Posts Tagged ‘Actionscript’

Flash Blues

Friday, August 10th, 2007

Work proceeds on the new Geogad web site. Some days the frustration level is pretty high, but things should be getting a little easier. Why the optimism? Because the new Flash program is more or less under control.

Flash is a very powerful and very popular way to display images, animation, audio, and video across multiple browsers and platforms. But that power comes with a cost. I am not referring to the cost of the software program. I am talking about the hair you will rip out and the remaining ones that will go white as you battle the program to get it to do what you know it should.

The heart of Flash’s power for developers is Actionscript, a scripting language somewhat like Javascript that dynamically controls the Flash movies. The main problem with Actionscript is that it feels like a kludge. For example, the last few hours I have been trying to figure out why Geogad’s Flash volume slider was working yesterday but not today. It turns out the problem is that the volume slider appears above a movieClip that is on a mask layer that is used to mask the movie on the layer below. All of this is fine and dandy and exactly what Flash and its mask layers were designed to do. Judging by depth of the movie used as the mask and the position of its masked layer, it should not interfere with the volume slider. However, it prevents the mouse from clicking on the volume slider.
The solution was to switch the masked layer to a regular layer. Then I used Actionscript to dynamically set the movieClip as a mask for the movie below (see the setMask property for more info). Now I have my mask, but it is not incorrectly grabbing mouse clicks that belong to the volume slider in the layer above.

As I said, Flash is very powerful. You need that power when you find something that does not work the way that it should, so you have to create a workaround. Luckily there seem to be multiple ways to do most things in Flash. The only problem is the days lost trying to figure out what is not working the way that it should and then figuring out another way to do it.

Technorati tags: Flash, Actionscript, masked layers, incorrectly capturing clicks, dynamic masks

Trouble with Flash Help

Sunday, February 4th, 2007

OK, now I don’t want to come off as very negative here.  But I have got to say that I am surprised at how slow the Adobe Flash site works.  It seems to take a very long time to pull info from the Actionscript online Dictionary.  I can only assume that they are using Flash to display this info and that may be why it takes so long. 

Thinking about my time with the Adobe site makes me compare it to Sun’s Java site.  Maybe it is because Java is a more structured language while Actionscript is a script, but I have a much easier time tracking down info on the Java site.  Of course, learning Java is much more difficult than Actionscript.  I have to admit that I find Actionscript’s fast and loose variable definition a bit hard to keep track of.  I like the strong typing in Java.  But I got up to speed on basic Actionscript in a few days.  Java takes longer than that to learn.

My greatest help for learning Flash and Actionscript is not from Adobe but from Flash gurus who have posted examples and tutorials on their sites.  Without these sites, I would be weeks away from completing my Flash projects.  A few that have proven helpful for me are

 http://www.kirupa.com/

http://www.cbtcafe.com

http://www.webdevelopersnotes.com

 Thanks for all the help.

Technorati tags: Flash, Actionscript, Java, Adobe, flash tutorials