1.::SWF::MovieClip(3) User Contributed Perl Documentation .::SWF::MovieClip(3)
2
3
4
6 SWF::MovieClip - MovieClip Class
7
9 use SWF::MovieClip;
10 my $movieclip = new SWF::MovieClip();
11
13 SWF::MovieClip allows you to add animated objects to your Flash movies.
14
16 $mc= new SWF::MovieClip()
17 Returns an SWF::MovieClip object.
18
19 $item = $mc->add($swfobject)
20 When you add following types of objects to the $mc they will return
21 a SWF::DisplayItem:
22
23 SWF::Button
24 SWF::PrebuiltClip (a whole external swf file)
25 SWF::MovieClip (you can nest them like a tree)
26 SWF::Shape
27 SWF::Text
28 SWF::TextField
29 SWF::VideoStream
30
31 [ToDo: to be verified: When you add a SWF::Sound the return value
32 is a SWF::SoundInstance: $si = $mc->add($sound); ]
33
34 $si = $mc->startSound($sound)
35 Starts making noise and returns an object of SWF::SoundInstance
36 class.
37
38 $mc->stopSound($sound)
39 Stops sound started by startSound() method.
40
41 $mc->remove($di)
42 Removes SWF::DisplayItem $di from the display list.
43
44 $mc->nextFrame()
45 Move to the next frame in the timeline of SWF::MovieClip $mc
46
47 $mc->setNumberOfFrames($i)
48 $mc->setFrames($i)
49 Sets total number of $mc frames to $i This is an optional
50 autofiller, e.g. when you want to be sure that 2 different
51 movieclips have 100 frames when playing, but the number of
52 nextFrame() calls in these 2 movieclips is unknown or dynamic
53 (dependent on data from databases, whatever). By default a
54 movieclip the number of frames in the timeline is how often you
55 called $mc->nextFrame for this clip.
56
57 $mc->labelFrame($name)
58 Sets frame name to $name. You are then able to access this frame
59 by name in ActionScript, not just by frame number.
60
61 $mc->setScalingGrid($x, $y, $w, $h)
62 This function (available from SWF>=8) sets a 9 slice scaling grid:
63 1 2 3 4 5 6 7 8 9 X, y, w and h define a rectangle, which is the
64 dimension of the center slice (5). All other slices are determined
65 out of the characters bounds and the defined rect. While slice 5 is
66 scaled vertical and horizontal, slice 2 and 8 are only scaled
67 horizontal. Slice 4 and 6 only vertical. The 4 corner slices are
68 not scaled (1, 3, 7, 9). [ToDo: to be verified]
69
70 $mc->removeScalingGrid()
71 Removes scaling grid rectangles.
72
73 $mc->addInitAction($action)
74 Adds an initial ActionScript block to MovieClip $mc. These actions
75 are executed before the MovieClip is available as a script object.
76 [ToDo: to be verified]
77
78 $mc->setSoundStream($sound, $rate, [$skip])
79 Includes streaming sound to a movie. [ToDo: add more doc and a
80 demo here.]
81
83 Soheil Seyfaie (soheil@netcom.ca) Peter Liscovius
84
85 see AUTHORS of ming distribution (ming.sf.net)
86
88 SWF::DisplayItem for how you can modify the instances in a
89 SWF::MovieClip or SWF::Movie SWF, SWF::Action, SWF::InitAction,
90 SWF::Button, SWF::Movie, SWF::Shape, SWF::Sound, SWF::SoundStream,
91 SWF::Text, SWF::TextField, SWF::VideoStream
92
93
94
95perl v5.32.0 2020-07-28 .::SWF::MovieClip(3)