Snippets: Flash Component Pack [update]

October 19th, 2004 by Joen , ,

Snippets

Back in the days, I actually used to do Flash work. Behind the scenes, I still do. At work, I meet up with Flash at an almost daily basis. As do my many talented co-workers.

More often than not, I find myself building the same preloaders, making the same fade effects and encountering the same debugging problems over and over again.

That’s why I, and a couple of co-workers, built a pack of Flash components to ease the work flow.

Flash provides a way of creating a form of “widgets”. Small pieces of self-contained code, that does specific things within the framework of Flash. Quite fortunate, since Flash at its very core means doing everything yourself. Not anymore for me, no sir.

“Snippets” is a pack of my best components, that I find myself using again and again. Drag and drop a preloader on to the stage, and it’ll show you how much of your movie has loaded. Need some candy on that button? Drag “Rollover Fade” onto it, and have it fade in on mouse over. Need to meet a deadline, and don’t care to set the tab index on every single button and textfield? Drag in “Disable Tab” and forget about it. Need to debug this or that variable, but can’t access trace() from your server test environment? Drag “Debug log()” onto stage, and use log()!

If you do work in Flash, you need these components. I’m not being overly self-confident by saying this, after all, I wasn’t the only developer on this pack. Credit is due to Tomas and Tobias, especially for their help developing the Debug log. Additionally, it has evolved over a couple of years now, so most serious bugs have been ironed out.

Downloads

Various components for Macromedia Flash MX (Also works for Macromedia Flash MX 2004). They add functionality, or simplify daily tasks like creating rollover fades and much more. Read more about the Snippets Component Pack.

Snippets Component Pack

Macromedia Extension Manager

The Extension Manager is needed for installing components.

Installation and Usage

Make sure you have the Macromedia Extension Manager installed. This comes with the Flash install, so it should already be there for relevant users. With the Extension Manager in place, just download and execute the component pack, and It’ll be installed.

The component pack resides in the Component panel (Window > Components). In Flash MX, the Flash UI Components pack is selected by default. To switch to the Snippets pack, click the upper right arrow of the palette, and select Snippets.

To use a component, drag it onto the stage, or onto a movieclip, a button or a textfield. For instance, preloaders and debugging tools are plainly dragged on to the stage, as they are stand alone.

Button effects, such as Rollover Fade and Rollover Scale can be dragged onto almost anything, including buttons, movieclips and textfields.

Other effects, including MovieClip Fade, and Mouse Delay are intended just for movieclips, but will also work on buttons et al.

The Debug log() is probably the most powerful component in the pack. It is an alternative to the trace() function in Flash, but provides extra features, including support outside of the Flash authoring environment. To use the debug log instead of the trace function, drag the component onto stage, preferably in a layer that spans the entire timeline. Use log("strings"+vars) to send debug information and output to the log, just like you would using trace(). You can use both trace() and log() in your movie, without conflict.

MX vs. MX 2004

While these components were built in Flash MX (v. 6), they have been tested in and work just fine in Flash MX 2004 (v. 7). The only difference being that the component icons are sized for Flash MX which has a different icon size than MX 2004. Thus, icons will appear slightly scaled in MX 2004. I plan to release two versions in the future. Don’t worry about the technical aspects though, they work fine in MX 2004.

Known Issues

One known issue is with the “Debug log()”. Currently, it is being instanced in frame 1, thus not ready to receive function calls. Any log() calls you have in this frame won’t be recognized the first time around.

I know it is possible to instance components prior to frame 1 using #initclip, but I haven’t really gotten this to work. If you’re a wiz, and able to do this, don’t hesitate to get in touch with me.

Bugs / Suggestions / Questions?

While the current iteration of the Snippets component pack is complete, tested and ready to use, I’m always open to suggestions and/or bug reports.

Update: I have released a new version of the log() component that’s part of this pack.


Websites linking to this post:

  1. David Steele Overholt » Blog Archive » Prototyping & Usability Testing in Flash

Comments (33)

  1. Your Snippet components are great...thanks for all your efforts. I'm finding sounds extremely difficult to come to terms with...so your toggle sound component is extremely useful...for a background sound..but is there a way to fade the sound in and out when turning it off and on? Your help much welcomed...thanks...Mark...

    Quote

  2. Joen says:

    Mark,

    Yep I suppose you could make a fade to the master volume knob... I'm not quite sure how to "approach" the problem, and I'm afraid that I won't have time to update these components anytime soon... But remember, they're free and open source, so you could pick them up, fork them, or pass them on to another developer if you wanted to...

    Quote

  3. Joen

    Thanks for speedy response...and providing snippets as open source...I'll forward any modifications that seem worthy. Thanks...Mark

    Quote

  4. Cleverson Sim?es says:

    I?ve downloaded the Download Snippets v. 0.9, but my Macromedia Extensions don?t intall it, my version of Flash is the Professional 8 and the Macromedia Extensions is the 1.7.240, i receive the message: "This extension package is not compatibile with this version of the Macromedia Extension Manager.

    My Flash is new, how to?

    Thanks very well.

    Quote

  5. Joen says:

    Cleverson Sim?es said:

    I?ve downloaded the Download Snippets v. 0.9, but my Macromedia Extensions don?t intall it, my version of Flash is the Professional 8 and the Macromedia Extensions is the 1.7.240, i receive the message: ?This extension package is not compatibile with this version of the Macromedia Extension Manager.

    My Flash is new, how to?

    Thanks very well.

    I'll take a look at the extensions pack and see if it needs updating. I'll post a comment here when I update it.

    Quote

  6. Kyle says:

    Just wanted to say thanks and to let you know that it installed fine for me. (Flash 8). Hat's off to ya, sir.

    Quote

  7. Scott says:

    Hi, great components!! I was wondering though if it's possible to preview that the MovieClip fade within the Flash timeline itself? I'm guessing not, but that would be great if it was possible.

    Quote

  8. Joen says:

    Hi, great components!! I was wondering though if it?s possible to preview that the MovieClip fade within the Flash timeline itself? I?m guessing not, but that would be great if it was possible.

    I don't think such a live preview is possible... The live preview won't know where on the main timeline it is, unfortunately.

    Glad you like the components, though.

    Quote

  9. Kyle says:

    Hi Joen,

    Is there any place where I can find more info on the debugger? It's still being a bugger for me. How do you use the query and watch features?

    Thanks again.

    Quote

  10. Joen says:

    Kyle, I've actually JUST built a new debugger that's far superior to the old one. If you stay subscribed to this thread, I'll write a comment here when I publish it.

    As for the query and watch features, I've actually removed them from the new version because no-one ever used them. For "query" you could type in the name of a variable to view its contents, for instance _root.myvar. I don't think it ever worked properly. Watch was only used by one of my colleagues. I don't even remember what it does.

    The new version can trace from frame 1, not only frame 2 as this one can. It's also liquid resizable.

    Quote

  11. Kyle says:

    Beauty!
    I've been developing something that you may be interested in as well. Is there an address that I can use to send you a preview?

    Quote

  12. Joen says:

    I have updated the "log" component that was in this pack to a far superior version.

    Quote

Comment

(required)

(required)

Textile

Textile is a method that uses simple symbols to quickly write rich text markup. These are the most common:

  • _emphasis_
  • *strong*
  • -deleted text-
  • !imageurl.gif!