Archive for the 'ActionScript 2.0' Category

MP3 Cue Points Article Updated on Adobe Developer Connection

Tuesday, December 4th, 2007
ActionScript 2.0 ActionScript 3.0

I wrote a cue points article last year (October, 2006) for what was then called the Adobe Dev Center.  One of the editors recently asked me to update that article for Flash CS3, which I was happy to do.  It’s now available on the Adobe Developer Connection at the following URL.

If you’re looking for a way to assign cue points to audio files (especially MP3 files loaded at runtime), I hope you find this article useful.  It steps through a custom SoundSync class in ActionScript 2.0 and 3.0.

How to Play Flash Video Files (FLV) Sequentially

Friday, October 19th, 2007
ActionScript 2.0 ActionScript 3.0

Half a year ago, I wrote a brief article on “How to Play Sound Files Sequentially” (AS2).  Recently, a reader was asking how to apply the same principle to video.  In his case, Paul had to play a commercial first, then follow it with a longer content video — and the user controls (buttons, scrubber, etc.) needed to be disabled wile the commercial was playing.  As it turns out, Paul worked out a solution of his own, partly based on some of the other articles here, but I thought it would be fun to do a quick version too.  That way, he can compare notes and anyone else can look on.  Keep reading »

How to Use Flash Video (FLV) Cue Points

Tuesday, October 9th, 2007
ActionScript 2.0 ActionScript 3.0 Flash

Video cue points can be used for all sorts of things in Flash.  Typical uses involve triggering other activity, such as peripheral movie clips whose animations enhance the video content, or triggering text, such as closed captions.  I’ve seen some developers in the Adobe forums even use a cue point to signal that a video clip has reached its end.  Strictly speaking, cue points aren’t needed for that last goal (see “How to Determine the Completion of a Flash Video (FLV) File”), but it’s certainly a possible way to go.

If you’re interested in cue points yourself, but don’t know where to begin, let’s dive in.  Keep reading »

ActionScript:  Figuring Out Where to Begin

Friday, August 24th, 2007
ActionScript 2.0 ActionScript 3.0 Flash

Here’s the third of my Notes on Design guest blog entries.  It was published yesterday already, but I missed it.  Too quick for me! out-where-to-begin/

How to Build an Interactive Flash Video (FLV) Load Progress Bar

Wednesday, August 22nd, 2007
ActionScript 2.0

A number of readers have expressed interest in the last handful of video-related blog entries.  These include “How to Build a Flash Video (FLV) Progress Bar” (Part 1 and Part 2) and, somewhat related, “How to Build a Basic Slider Widget (AS2).”  In some of the blog comments, mischa, Marius, and kweku were asking about how to display the load progress of an FLV file.  This was in addition to the existing functionality, which allows the user to see how much of the video has played and also to seek by dragging a knob along a track.  Questions included a) how to make sure the user couldn’t drag the seek knob beyond the loaded portion of the video and b) how to make the track itself clickable, so the user could bypass the knob if desired.  Let’s take a look at how to incorporate these new elements by adding them to the ActionScript 2.0 presented in Part 2 of the progress bar series.  Keep reading »

How to Save Bandwidth when Displaying Flash Video

Friday, August 17th, 2007
ActionScript 2.0 ActionScript 3.0 Flash

I’m on the technical advisory board for Sessions School of Design, a distance learning school based in New York.  Anjula Duggal, managing editor for the Sessions blog (DesignSessions:  Notes on Design), recently asked me to guest author a handful of articles for them, which I’m happy to do.  Thanks to Anjula and editor Katie Feo for helping to get me squared away!  :)

My first article is here: when-displaying-flash-video/

How to Build a Basic Toggle Button (AS2)

Tuesday, August 14th, 2007
ActionScript 2.0 Flash

kweku and nab have been interested a play/pause button — essentially a toggle button, something that “remembers” when it’s been clicked — and fortunately, the mechanics are fairly simple.  The key to the desired functionality is a Boolean variable.  Let’s take a look.  Keep reading »

How to Build a Basic Slider Widget (AS2)

Tuesday, July 24th, 2007
ActionScript 2.0 Flash

In reply to a request from kweku, here’s another look at the basic slider used in the two-part “How to Build a Flash Video (FLV) Progress Bar” series.  This time, the slider widget, comprised again of two movie clips, will be used to adjust the volume of an FLV video file.  The ActionScript 2.0 involved is fairly straightforward and, in fact, can be cobbled together from existing articles on this blog.  Let’s break it down.  Keep reading »

How to Build a Flash Video (FLV) Progress Bar (Part 2)

Tuesday, July 10th, 2007
ActionScript 2.0

In Part 1, not quite a week ago, we looked at a relatively simple way to track the progress of an FLV file as played without the FLVPlayback Component in a SWF.  Here in Part 2, we’ll make the knob draggable, causing the video to seek to the point in time that corresponds to the knob on its track.  As it turns out, the ActionScript involved doesn’t change all that much.  It may look like a lot more code, but the mechanics should be easy enough to follow.  Keep reading »

How to Build a Flash Video (FLV) Progress Bar (Part 1)

Thursday, July 5th, 2007
ActionScript 2.0

Following on the heels, at least conceptually, of “How to Control Video (FLV) without a Component” here’s a quick look at how to indicate the progression of an FLV by way of a custom made progress bar (thanks for the suggestion, Rick!).  In a follow-up article, I’ll show how to make the progress bar interactive by having the draggable knob seek to keyframes in the FLV.  It turns out that much of the code for this first part derives from “How to Determine the Completion of a Flash Video (FLV) File,” which shows how to determine video length, with and without the use of Components, in ActionScript 2.0.  In this article, we’ll be going the non-Component route, because FLVPlayback already has a progress bar.  Before we delve into the code, we need to prepare two small movie clips.   Keep reading »