Flash

Using Sounds Embedded in the Library and Other Tricks

So, in ActionScript 2.0, there existed such a thing as attachSound which would allow you to call on sounds in your library and iterate them in code much like you would call on movieclips in the library.

With ActionScript 3.0, there is no attachSound, so you need to do a little workaround. It took me a while to find this, but here you go:

import flash.utils.getDefinitionByName;
import flash.media.Sound;


var mySound:Sound;

var librarySound:Class = getDefinitionByName ( "nameOfYourSoundasLinkedFromTheLibrary" ) as Class;

mySound = new librarySound();

Basically, anything that you’re referring to as an Object in ActionScript 3.0 seems to require having a class file. So when you go to your library and export your sound objects for ActionScript, a class file is published for each one, and you need to call on these as a class in your code in order to use them like you would an external .mp3 or other audio file.

Now, for the fun part — remember what a pain in the ass it was to trigger some kind of event when an audio file would stop playing in Flash circa ActionScript 2.0? Throw the following code in to the above:

import flash.media.SoundLoaderContext;
import flash.media.SoundChannel;

var myChannel:SoundChannel;

myChannel = mySound.play();
myChannel.addEventListener( Event.SOUND_COMPLETE, AudioDoneAction );

function AudioDoneAction( event:Event ):void
{
    // Do something when the audio is done
}

So basically, the Sound class in ActionScript 3.0 allows you to load sounds and play them, but if you want to manipulate them or use them to evaluate other stuff, you want to include the Sound object as a reference in a SoundChannel object.

This seems pretty overcomplicated for my simple example here, but think about it this way. What if you had five different external audio files you wanted to load as a playlist for just one slide in an E-Learning piece, and you wanted to trigger different images and text with each audio file. You can code yourself a playlist and trigger changes upon completion of an audio file — and even track where you are in the playlist so that you could have different actions upon completion of the first and/or the last (or really at any defined place in the order of) audio in the playlist.

I couldn’t figure out the embedded audio as class thing on my own. It took a while of experimenting and searching until I found the solution here and here.

ActionScript 2.0
Development
Flash

Comments Off

Permalink

Serious Gaming on the Verge of Success…

Imagine if you had the means, the open-mindedness of the client and the management sponsorship to pull out all the stops and really produce a piece of learning that was fun, relevant and “just right” for the goals you were trying to meet with your learners? I’m at the end of such a project, on the eve of its launch, and I could not be more excited to predict a huge win for the first “serious” learning game in our organization.

I’ll be the first to admit, this project could’ve gone wrong from jump in so many ways. We had an internal client who, like many clients, was very risk-averse, so the thought of doing a “game” was a risky move and required a lot of handholding. They could have bailed at any time. We had an incredibly tight deadline for a project like this. Normally, a multimedia-heavy project like this one, you’d like a solid six months to develop it out. We gave our vendor three, and by a lucky break for all of us, the delivery was delayed by a month which was needed.

We used a brand new vendor who was brought to us initially by our CLO. I’ll be the first to admit based only on the sample products they provided that I would not have chosen them — mostly because they seemed more like an Agency than a game development house and the look and feel of the products I saw were similar in nature, and I felt their production would be a disconnect with our audience (and our internal client). When the project was emerging from the Instructional Designer on the project, I ballparked the project at a certain cost. I expected the vendor to come in high and then we’d have to haggle and negotiate. I expected that working with the vendor, like many vendors I’ve both worked for and worked with, would be a painful tug-of-war, followed by some finger pointing, followed by relief that the project just “got done.”

I could not have been more wrong about this vendor, and I’m very, very happy to say so. They came in so close to the number I ballparked, I began to think they were taking us seriously. I waited with baited breath to see their first draft of the storyboards indicating the look and feel for the game, and having taken the time to visit and talk with one of our branch stores close to their office, they produced storyboards that I felt so perfectly blended my expectations for how to be at once “cool” and at the same time “mindful” of the people we were looking to instruct, as well as the complexity of the subject matter we were looking to demystify. They made learning the material (and the subject itself) “fun” and still “tasteful.” I was very impressed, and I’m the kind of person (as you know on this blog) that doesn’t run out of opinions. I became hopeful that this really could work.

They created the project in a very complete Alpha state. We tested it in our network and found that the bandwidth required would be a major obstacle for the target audience. We talked with our vendor about reducing the audio and video quality a bit and retesting it in our network before doing any more work on integrating it with the LMS — because if it wouldn’t perform as “content” out of the LMS, there was no point on troubleshooting the LMS communication. They had new files to us in a matter of days. We retested and got a green light on performance.

Then we moved onto LMS integration. I put together the API Wrapper and the rest of the SCORM packaging for our vendor, because they had not built for an LMS deployment before, and it would be just silly to make them go through the learning curve when I could just do that heavy lifting with little effort. They were able to write and read from the LMS at the prototype level (we did a technical test before they even tried to get the real content working to debug the communication issues). Not looking at their ActionScript at all, when we noticed some issues with suspend_data not being sent to the LMS, even though the code was the same as the prototype. It turned out that the content was sending consecutive JavaScript calls, which goes back to the whole synchronous/asynchronous deal about ActionScript and JavaScript (we had to use Flash 7 Player because my organization had not upgraded to Flash 9 Player at the time). Moving the calls so they were separated and event-driven made a huge difference. I was on the phone for a day and a half with the vendor. In ten years, I never worked as, for or with a more willing partner.

For reasons I’m sure you can understand, I can’t show you the game. I probably can’t talk much about what the game is about or what we’re trying to teach. I probably can’t broadcast the vendor we’re working with (though if you ask me offline, depending on whom you work for, I’ll be happy to tell you).

The point of this posting is to get off my chest in as public a means as I can how happy I am to be able to help make the vision of one of our Instructional Designers a reality — even if all I am is the babelfish (Hitchhiker’s Guide reference). We have our foot in the door for serious gaming. I’m betting it’s going to be a smashing success and will usher in a shift in instructional approach, both as far as what we propose and what our internal clients will consider.

And… I’m just happy as hell that after years of producing cool and not-so-cool page turning stuff, I get to finally be part of something different. I worked with a fantastic Instructional Designer and a really incredible Project Manager (I actually am gushing over Project Management and Instructional Design) — both of whom really “get it.” I had a boss who was willing to take a chance and a CLO who was ready to be a sponsor on something different. Best yet: I had an internal client who, despite their concerns, was willing to trust us and get the job done right.

And one more thing: I’m very humbled that there are vendors out there that can really be a partner in making great learning experiences, on-time, on-budget and far-exceeding expectations.

For the first time in as long as I can remember, I have a happy project story and it didn’t kill us.

Flash
Instructional Design
JavaScript
Project Management
SCORM
Serious Games

Comments (3)

Permalink

All Hail Blaze DS

Adobe just released a free and open-source Java implementation of flash/flex remoting service called Blaze DS for Java.

This is pretty huge for people, as it supports remoting to the new AMF version (3) which just got documentation released, but it also supports remoting and polling over port 80 — so no more getting blocked out behind firewall constraints (a common theme today?). And, did I mention — it’s FREE?

So this will allow Flash and Flex developers to do realtime data manipulation with databases through this Java service — and you don’t have to run ColdFusion (or AMFPHP) to do it. I love remoting. I’ve loved it since I first played with it and Flash MX (6).

The impact of this and developing media-rich (or just plain pretty) performance support tools is a very positive one, especially for enterprise IT departments that may not know anything about PHP but will support Java.

Flash
Flex
Tools

Comments Off

Permalink

Ah, the memories…

If you want to see the wonders that Flash 5 Actionscripting brought back in the day (like 2000), check out this little learning game that got me hooked on the idea that Flash and Education combined could be a career.

Warning, the controls in the Flash 9 player are not as fluid as they used to be in Flash 5. The game also now runs so fast that it’s a lot jerkier than it used to be on a Pentium I :)

Flash

Comments Off

Permalink

Podcasts on Flash

With my 3G iPod nano, I’ve run the course on getting my learn on as far as adjusting my fantasy football team or catching up on political satire. This weekend I was getting jiggy with ActionScript 3 and actively sought out what podcasts might be available, video or otherwise, on the subject.

I didn’t find much. However, I found at least one use of podcasting that are extending the official knowledge out there. I’ve been reading the ActionScript 3.0 Game Programming University by Gary Rosenzweig off my Safari account to get a little more hands-on with the code. Turns out, Gary also has a podcast that extends the lessons in the book, complete with screen grabs (done on the Mac, just to needle it in for some of you) on how to further modify or extend the code examples detailed in some of the lessons. That’s pretty nifty from both a marketing and an educational perspective.

I’d love to find out more about podcasts centered around Flash, Actionscript 3 or scripting in general (for all my experimentations and tutorials, Ruby on Rails still isn’t taking for me — and neither is Flex).

ActionScript 2.0
Development
Flash
Podcasts
Tools
Training

Comments Off

Permalink

OpenDocument Format + Flash = Open Content Templates?

A thought just occurred to me, and I hope it spurs some discussion from the Flash coders that are among us.

So OpenDocument Format is an approved ISO standard for Office-type documents, including spreadsheets. In fact, ISO is in the process of moving the standard forward to version 1.2, where it’s expected that tables will be supported in the presentations created in ODF.

Lots of us who build custom courses are using our own XML Schema to fill-in the content of Flash-based online courses. But… what if a bunch of us used the same format for our XML? A little over a year ago, some of us got together via the os-flash.org project for “Edumatic” and after a couple of very nice “how do you do?” emails, it plain died. I was reminded of its existence yesterday when I got my automated notice about my subscription to the newsgroup in my email.

But back then, we were talking about how do we even write the XML format so it’s the same. Well… we have an open standard that’s not only approved and maintained internationally… but it’s freaking FREE. So here’s my thinking:

There’s no shortage of tools that can create an ODF presentation (OpenOffice.org and NeoOffice on the Mac are but a few). But Google is supporting ODF, also with their online GoogleDocs application. So the authoring tools are there. We just need a common way to support them.

That’s where some Flash scripting and graphic/multimedia design moxy comes in. Imagine a workflow where anyone can author the learning content anywhere on free-to-use tools that are also easy to use (in other words, not much change management needed to do it). Then with a little scripting savvy, a developer simply takes the ODF export of the presentation, uses it to populate a course and makes the tweaks required (goal state: none) to put it into an LMS.

Now you have an incredibly fast way to take the abundance of content in your organization and put it into a digestible format for online learning in current systems.

So if you’ve read this far, the next question is… who’s interested? Because this is definitely not a one-man job.

Adoption
Development
Flash
Interoperability
Productivity
Standards

Comments (5)

Permalink

Leopard: The Agony of the Update

I could just punt my Macbook Pro right about now.

It’s a good thing I did a full backup last week of my drive using SuperDuper. If you’re thinking about upgrading your Mac to Leopard, here are some words of advice:

Most of you are probably okay with doing just an upgrade, in which case if Flash is working already, you’re in the clear.

But for those of you like me who are especially anal about upgrades and look at them as a time to flush out the crap and do a pristine installation of the new system, I would HIGHLY recommend not reformatting your drive to HFS+, Case Sensitive, Journaled…. this is a new (to me) option available to you with Leopard. Thing is, Adobe CS3 — it doesn’t like the Case-sensitive part AT ALL.I did the clean install and used Migration Assistant to get my files and preferences back into place. I kept trying to launch Flash and had nothing but issues. Then I did a completely clean installation and tried to manually install Flash again. But that kept resulting in a “Supported System Error.” Like a good boy scout, I reported it to Adobe, but then it got me thinking that it was my choice in File Systems for the disk… so… round 3, I reformatted to HFS+, Journaled and Flash installed just magically.

So… freaking… annoyed.

Flash

Comments (4)

Permalink

FFL Podcast Production ramping up!

Sorry for being silent for so long (again… again). There’s a lot going on with work that’s been keeping me busy enough to ignore blogging on all my sites.

I wanted to propose a podcast curriculum where I’ll talk to something having to do with SCORM and Flash in small chunks, and hopefully keep it light, somewhat entertaining but valuable and focused.

So from the feedback I’m gathering in comments on the SCORM 1.2 ExternalInterface demo, here’s what I think you need to start with:

  • Content Package and the Manifest in SCORM 1.2
    1. Get to know the tools we’ll use.
    2. The Parts of the Manifest
    3. Organizing your Manifest in SCORM 1.2
    4. The Manifest and Metadata in SCORM 1.2
    5. How Aaron Rolls (practices and conventions)
  • Communicating with the SCORM API
    1. The Parts of your SCO
    2. Using the APIWrapper.js
    3. Accessing the Run-Time Data Model
    4. The Top 10 Data Model Elements in SCORM 1.2
    5. How Aaron Rolls (practices and conventions)

Now… what else am I missing? And are you willing to help, either in the production of the content, QA and testing or simply in supporting the effort with a couple of bucks for some caffeine goodness?

Flash
Podcasts
SCORM
Tools
Training

Comments (1)

Permalink

Clean Pop-ups out of Articulate Presenter

Ever need to launch several files out of one slide as a pop-up window in Articulate Presenter? I have that need and so do a few of the Instructional Designers I work with. So after some research and review, I’ve modified the player.html file in C:\Program Files\Articulate\Presenter\players 5.0\core and I can now publish content with abandon with custom flash pieces that can launch nice, clean pop-up windows.

When creating your Flash content, you’ll call a popup like this:

getURL( "javascript:popUpWindow('your_file.html',left,top,width,height);" );

where…

  • left = a number indicating how many pixels off the left edge of the screen you want the popup to be placed (use 0 for the edge)
  • top = a number indicating how many pixels off the top edge of the screen you want the popup to be placed (use 0 for the edge)
  • width = a number indicating how wide you want the popup
  • height = a number indicating how tall you want the popup.

You can download the modified player.html file here.

Articulate
Development
Flash
JavaScript

Comments (3)

Permalink

Flash For Learning: The Group

I’ve tried this before, but there’s been a pretty significant uptick in the amount of email and activity on the blog related to Flash and SCORM. I thought maybe it’d be useful to have a more collaborative knowledge share. So I’m inviting friends, readers, developers and designers who are involved in E-learning projects and are using Flash to join up with the Flash For Learning group.

E-Learning
Flash
Tools

Comments (2)

Permalink