Category: Flash

Using dynamic text to toggle a play/pause button

I’ve been building a simple flash video player based on the one here and had the idea to use dynamic text to easily toggle the play button between the play and pause states. The Webdings font character for the play state is “4” and for the pause state is “;”

To avoid problems with fonts not displaying on some machines, click the “Embed” button on the text properties panel when creating the dynamic text, and embed the numerals.

Continue reading

Getting cubic bezier drawing API’s to work in my projects

There are several examples of drawing methods that draw a cubic bezier line that can be changed interactively by moving two control points and two anchor points, which is exactly what I needed for a project. An example of one is HERE. This one is by Robert Penner, from his book: Robert Penner’s Programming Macromedia Flash MX”

I couldn’t figure out why I could not get these functions to work in my own pieces, even when I exactly duplicated the structure of his flash movie. They would work in his, but not in mine.

The first frame of the movie has two “include” references in it, to two actionscript files containing all the common functions for his drawing methods.


#include "drawing_api_core_extensions.as"
#include "bezier_draw_cubic.as"

Continue reading

Accessing the main timeline from a loaded SWF on another level.

I have a flash file which loads an external SWF (call it external.swf) into the main timeline, on level 10. In this case, using _root or _parent to call the symbols on the main timeline will not work, since _root or _parent would refer to items on _level10.

The main timeline also contains a movie clip called “swapColors_mc” with two frames called “red” and green”.

To control the color change of swapColors_mc by clicking a button in external.swf once it is loaded, open “external.fla” (the original flash file from which external.swf is created) and add this actionscrip to the button:


on (release) {
_level0.swapColors_mc.gotoAndPlay("green");
}

Continue reading

Flash Newbie Discovery

Flash experts can skip this, for sure.

OK – this is so I don’t forget again!

The key to getting things to work in Flash is simply: Everything MUST be named!

Every instance, scene beginning, significant frame, movie clip, etc. must have a name, and hopefully one that makes sense to you a week after creating the project.

Continue reading