$m = new SWFMovie();
m = SWFMovie()
SWFMovie *m = new SWFMovie();
SWFMovie m = newSWFMovie();Create a new movie object, representing an SWF version 4 movie.
SWFMovie_output(m);Dumps your lovingly prepared movie out. In PHP, preceding this with the commandheader('Content-type: application/x-shockwave-flash');convinces the browser to display this as a flash movie.
SWFMovie_save(m, filename);Saves your movie to the named file.
$i = $m->add($c);
i = m.add(c)
i = m->add(c);
i = SWFMovie_add(m, c);Add any type of data to a movie. Shapes, text, fonts, etc. must all be add'ed to the movie to make this work.
For displayable types (shape, text, button, sprite), this returns an SWFDisplayItem, a handle to the object in a display list. Thus, you can add the same shape to a movie multiple times and get separate handles back for each separate instance.
SWFMovie_remove(m, i);Remove the object instance from the display list.
SWFMovie_nextFrame(m);Move to the next frame of the animation.
$m->setBackground($r, $g, $b);
m.setBackground(r, g, b)
m->setBackground(r, g, b);
SWFMovie_setBackground(m, r, g, b);Set the background color. Why is there no rgba version? Think about it.
(Actually, that's not such a dumb question after all- you might want to let the html background show through. There's a way to do that, but it only works on IE4. Search the MM site for details.)
SWFMovie_setRate(m, frameRate);Set the frame rate. Animation will slow down if the player can't render frames fast enough- unless there's a streaming sound, in which case display frames are sacrificed to keep sound from skipping.
SWFMovie_setDimension(m, width, height);Set the movie's width and height.
SWFMovie_setFrames(m, numberOfFrames);Set the total number of frames in the animation.
SWFMovie_setSoundStream(newSWFSound(mp3FileName));Stream the named mp3 file. Not very robust in dealing with oddities (can skip over an initial ID3 tag, but that's about it). Like SWFShape::addJpegFill, this isn't a stable function- we'll probably need to make a separate SWFSound object to contain sound types.
Note that the movie isn't smart enough to put enough frames in to contain the entire mp3 stream- you'll have to add (length of song * frames per second) frames to get the entire stream in.
back to index
All content Copyright (C) 2000-2002 Opaque Industries except where noted otherwise.