Finally, I know why buttonMode doesn’t always show the hand cursor in AS3 – curse you mouseChildren!

4 06 2009

After a long time coding in AS3, you’d think I would have known this by now. But no, I’m too lazy to look it up.

I’m coding a new Flash activity (it’s so dinky that I shouldn’t really call it that) where I’ve got a movieclip that I would like users to click. I usually have dynamic text sitting on top of clickable items, but the text field always obscures the movieclip underneath so that the hand cursor does not appear even if I have buttonMode set to true. I’ve never bothered to work this out since this is usually not a big problem. Not good for the user of course.

So I finally looked it up and found a couple of useful discussions around this (http://blog.ickydime.com/2008/04/mouseenabled-vs-mousechildren.html and http://www.actionscript.org/forums/archive/index.php3/t-140973.html).

Turns out the solution is dead simple. Just set the movieclip’s mouseChildren property to false. Damn, I feel stupid now.





Using Mindjet MindManager Pro

12 05 2008

Sequencing activity to be created in Flash CS3, using Mindjet MindManager to design

This week I’m working on a new Flash project – we’re creating a new eLearning activity that has people dragging and dropping different parts of a process into a sequence. After the sequence is complete, the learner can then click each part of the process to launch an explanatory animation or video (depending on what decide to use for this piece), followed by one or more questions.

Because I’m still fairly new to the OOP approach and AS 3.0 (I’ve created custom classes before, but still used a largely procedural approach to coding AS 2), I decided to use Mindjet MindManager to help me plan out the different classes needed in this activity. So far, I love it! It allows me to add text markers that I can customize to indicate the super class that each class is extending, as well as the container object that it will be instantiated in. I’m also using it to draw out relationships between the various classes.





Essential ActionScript 3.0 is awesome!

28 04 2008

I’m kicking myself for not discovering Colin Moock’s books sooner. It’s been eight or nine years since I’ve started working in Flash, and have picked up my skills through a number of different resources, but so far this is by far the best book I’ve read. I suppose it’s because I never took comp sci in university, and this book explains ActionScript in the same way that other programming languages are explained. With AS 1 and 2, I’ve always used books that took more of a front-end designer’s perspective, and I always felt like concepts were dumbed down just to accommodate the non-programming types. VERY unsatisfying. With Moock’s book, I finally feel complete, as if the last remaining pieces of the puzzle are falling into place. I’m looking forward to getting my hands on the O’Reilly book on ActionScript design patterns next…





Finally got CS3 installed

25 04 2008

I never thought I would say this, but I started to hate Adobe after two and a half days of failed installation attempts. I had waited a couple of months after receiving the license key, since I knew it would take a long time to install and I’ve been really busy in the past few months. It was to be a treat at the end of an endless year of toil – and I had also been patiently waiting as well for everything to end before I would crack open my first AS3 book.

My first few attempts ended up in hours of “repairing shared components”. Each time I grew suspicious of what was happening in the background, and decided to uninstall all of the CS2 components after some advice from a coworker. It still didn’t work. Then I decided to uninstall every vestige of Adobe products from my machine (including the Flash player!) — and that seemed to do the trick…for a while anyways. That was not fun. In fact, I had to let my machine run overnight to do this. This time however, it paid off (somewhat). The installation process went further, but it still showed that the “shared components” had still crapped out. Valiantly I tried to launch Dreamweaver and Flash anyways, but this time I got a “licensing” error.

I won’t bore you with more of the gory details, but let’s just say that in the end, CS3 Cleaner saved the day. I think the previously installed Adobe beta products may have left undesirable traces that were never removed in full by the previous uninstallation processes. The Cleaner basically helped remove these traces.

Finally, at 12:45am on day 3, I succeeded in installing the CS3 suite. Dear god, I don’t want to go through that again please.





AS 3, here I come

22 04 2008

Yes, I’m a little behind in keeping up with changes in ActionScript, although I have been working on Flex (mostly MXML though). My goal is to get ramped up in AS 3.0 in the next month or so.








Follow

Get every new post delivered to your Inbox.