📄 swf::movie.3pm
字号:
.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32.\".\" Standard preamble:.\" ========================================================================.de Sh \" Subsection heading.br.if t .Sp.ne 5.PP\fB\\$1\fR.PP...de Sp \" Vertical space (when we can't use .PP).if t .sp .5v.if n .sp...de Vb \" Begin verbatim text.ft CW.nf.ne \\$1...de Ve \" End verbatim text.ft R.fi...\" Set up some character translations and predefined strings. \*(-- will.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left.\" double quote, and \*(R" will give a right double quote. \*(C+ will.\" give a nicer C++. Capital omega is used to do unbreakable dashes and.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,.\" nothing in troff, for use with C<>..tr \(*W-.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'.ie n \{\. ds -- \(*W-. ds PI pi. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch. ds L" "". ds R" "". ds C` "". ds C' ""'br\}.el\{\. ds -- \|\(em\|. ds PI \(*p. ds L" ``. ds R" '''br\}.\".\" If the F register is turned on, we'll generate index entries on stderr for.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index.\" entries marked with X<> in POD. Of course, you'll have to process the.\" output yourself in some meaningful fashion..if \nF \{\. de IX. tm Index:\\$1\t\\n%\t"\\$2"... nr % 0. rr F.\}.\".\" For nroff, turn off justification. Always turn off hyphenation; it makes.\" way too many mistakes in technical documents..hy 0.if n .na.\".\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2)..\" Fear. Run. Save yourself. No user-serviceable parts.. \" fudge factors for nroff and troff.if n \{\. ds #H 0. ds #V .8m. ds #F .3m. ds #[ \f1. ds #] \fP.\}.if t \{\. ds #H ((1u-(\\\\n(.fu%2u))*.13m). ds #V .6m. ds #F 0. ds #[ \&. ds #] \&.\}. \" simple accents for nroff and troff.if n \{\. ds ' \&. ds ` \&. ds ^ \&. ds , \&. ds ~ ~. ds /.\}.if t \{\. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u". ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'.\}. \" troff and (daisy-wheel) nroff accents.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'.ds 8 \h'\*(#H'\(*b\h'-\*(#H'.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#].ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#].ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#].ds ae a\h'-(\w'a'u*4/10)'e.ds Ae A\h'-(\w'A'u*4/10)'E. \" corrections for vroff.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'. \" for low resolution devices (crt and lpr).if \n(.H>23 .if \n(.V>19 \\{\. ds : e. ds 8 ss. ds o a. ds d- d\h'-1'\(ga. ds D- D\h'-1'\(hy. ds th \o'bp'. ds Th \o'LP'. ds ae ae. ds Ae AE.\}.rm #[ #] #H #V #F C.\" ========================================================================.\".IX Title "SWF::Movie 3".TH SWF::Movie 3 "2003-01-20" "perl v5.8.8" "User Contributed Perl Documentation".SH "NAME".Vb 1\& SWF::Movie \- SWF Movie class.Ve.SH "SYNOPSIS".IX Header "SYNOPSIS".Vb 1\& use SWF::Movie;.Ve.PP.Vb 2\& $m = new SWF::Movie();\& $m = new SWF::MovieWithVersion(version);.Ve.SH "DESCRIPTION".IX Header "DESCRIPTION"SWF::Movie is the root object of your flashfile. It contains all your other objects you want in your movie.Ming supports many Flash4 and Flash5 features and some of Flash \s-1MX\s0(Flash6)..PPThe SWF::Movie object contains information like the flashversion, the size, the frames per second, the background color. Except that, the SWF::Movie behaves like a SWF::MovieClip. It only cannot be added to another SWF::Movie or SWF::MovieClip. ;\-).PPNotice: The version of your flashmovie can be set by the object \s-1SWF\s0. See \s-1SWF\s0 for more details..SH "METHODS".IX Header "METHODS".IP "add(SWFObject)" 4.IX Item "add(SWFObject)"Add an instance of a SWF-object to your current frame. The returnvalue is a SWF::DisplayItem..Sp.Vb 1\& Possible SWF\-objects are:.Ve.Sp.Vb 6\& SWF::Action\& SWF::MovieClip\& SWF::Shape\& SWF::Sound\& SWF::Text\& SWF::TextField.Ve.Sp.Vb 2\& $m\->add($shape); # possible, but not more accessible for us\& $shape_1 = m\->add($shape); # good instance.Ve.IP "addExport(SWF::Block, name)" 4.IX Item "addExport(SWF::Block, name)"??? what this method is good for ???.IP "remove(SWF::DisplayItem)" 4.IX Item "remove(SWF::DisplayItem)"Removes the given instance from the current and following frames of the main timeline. .Sp.Vb 1\& $m\->remove($shape_i);.Ve.IP "\fInextFrame()\fR" 4.IX Item "nextFrame()"Finish a frame of the main timeline. New added objects will be added in the next frame..Sp.Vb 1\& $m\->nextFrame();.Ve.IP "setFrames(int)" 4.IX Item "setFrames(int)"Preset the number of frames of the main timeline. n not used frames before finishing the movie will filled with n \fInextFrame()\fR statements.If you inserted more \fInextFrame()\fR commands than you set with \fIsetFrames()\fR the \fIsetFrames()\fR will be ignored. .Sp.Vb 1\& $m\->setFrames(100);.Ve.IP "setBackground(red,green,blue)" 4.IX Item "setBackground(red,green,blue)"Set the background in red, green, blue values. Possible value are 0..255 or hexvalues 0x0..0xff..Sp.Vb 2\& $m\-setBackground(0xff,0x99,0x00); # orange bg\& $m\-setBackground(0,200,255) # green bg.Ve.SpA transparency level isn't available I asume. (In Flash \s-1MX/F6\s0?). A transparent background can be set in the HTML-code for Internet Explorer. Please inform the Authors if that is available for nonIE\-browsers..IP "setDimension(x,y)" 4.IX Item "setDimension(x,y)"Set the dimension in pixel..Sp.Vb 6\& #We should implement this in ming c\-lib!!\& #min: (0.0,0.0) # ;\-)\& #max: (?,?)\& #default: (0.0?,0.0?)\& #Behavior when values <min: ming sets it to min\& #Behavior when values >max: ming sets it to max.Ve.Sp.Vb 2\& $m\->setDimension(200,100);\& $m\->setDimension(123.45,67.89);.Ve.IP "setRate(int)" 4.IX Item "setRate(int)"Set the playing speed in frames/second. .Sp.Vb 6\& #We should implement this in ming c\-lib!!\& #min: 0\& #max: ?\& #default: ?\& #Behavior when value <min: ming sets it to min\& #Behavior when value >max: ming sets it to max.Ve.Sp.Vb 1\& $m\->setRate(30);.Ve.IP "\fIprotect()\fR" 4.IX Item "protect()"A feature that prevents only flashnewbies from importing your movie into Macromedias Flash authoring tools. It cannot protect your content from being loaded by other flashmovies, deleting of the protection with a hexeditor or disassembling with tools. .Sp.Vb 1\& $m\->protect();.Ve.IP "setSoundStream(SWF::Sound)" 4.IX Item "setSoundStream(SWF::Sound)"Puts an SWF::Sound object as streaming sound into the main timeline..Sp.Vb 1\& $m\->setSoundStream($sound);.Ve.IP "streamMp3(filename)" 4.IX Item "streamMp3(filename)"Simplifies the \fIsetSoundStream()\fR. You only need the filename. .Sp.Vb 1\& $m\->("iloveyou.mp3");.Ve.SpHint: If you want to reuse this sound/mp3 later in this movie, create a reusable SWF::Sound object and then put it into \fIsetSoundstream()\fR..IP "labelFrame(string)" 4.IX Item "labelFrame(string)"Gives the current frame a label that can be used by actionscript as anchor. Then you don't have to count your \fInextFrame()\fR lines anymore. :\-).Sp.Vb 1\& $m\->labelFrame("win");.Ve.Sp.Vb 3\& #max characters of a label??? \& #What happen if we put there a big string?? \& #Which characters are allowed??.Ve.IP "output([int compresslevel])" 4.IX Item "output([int compresslevel])"Writes the SWF::Movie to stdout. This is normally used for webservers/cgi\-scripts. Don't forget to send the \*(L"Content\-Type:\*(R"\-lines before writing out the movie..SpThe parameter compresslevel is optional. compresslevel between 0 and 9. Higher values will be interpreted as 9. Values smaller 0mean no compression. By default the SWF::Movie will be send without compression. .SpNotice: compression available since Flash \s-1MX\s0(Flash 6). Ming does not check this for you if you write flash4 or flash5 movies..IP "save(filename [, int compresslevel])" 4.IX Item "save(filename [, int compresslevel])"Save the SWF::Movie to a file. .SpThe parameter compresslevel is optional. compresslevel between 0 and 9. Higher values will be interpreted as 9. Values smaller 0 mean no compression. By default the SWF::Movie will be saved without compression. .SpNotice: compression available since Flash \s-1MX\s0(Flash 6). Ming does not check this for you if you write flash4 or flash5 movies..SH "EXAMPLE".IX Header "EXAMPLE"3 examples: a regular minimal SWF::Movie, one with all methods and a more interesting..IP "minimal empty example" 4.IX Item "minimal empty example".Vb 2\& #!/usr/bin/perl \-w\& use SWF::Movie;.Ve.Sp.Vb 3\& $m = new SWF::Movie();\& $m\->nextFrame();\& $m\->save("emptyminimal.swf");.Ve.IP "full empty examples" 4.IX Item "full empty examples".Vb 2\& #!/usr/bin/perl \-w\& use SWF::Movie;.Ve.Sp.Vb 7\& $m = new SWF::Movie();\& $m\->setVersion(4);\& $m\->setBackground(0xff,0xcc,0x0);\& $m\->setDimension(200,100);\& $m\->protect();\& $m\->setRate(30);\& $m\->setFrames(10); # ming fills it automatic with frames.Ve.Sp.Vb 2\& $m\->nextFrame()\& $m\->save("empty.swf");.Ve.IP "streaming example" 4.IX Item "streaming example".Vb 1\& #!/usr/bin/perl \-w.Ve.Sp.Vb 2\& use SWF("Shape");\& SWF::setVersion(6);.Ve.Sp.Vb 5\& $m = new SWF::Movie();\& $m\->setBackground(0xff,0xcc,0x0);\& $m\->setDimension(200,100);\& $m\->setFrames(10);\& $m\->streamMp3("forever.mp3");.Ve.Sp.Vb 6\& $s= new SWF::Shape();\& $s\->setLine(40,0xff,0xff,0);\& $s\->setRightFill(0xff,0,0); \& $s\->drawLine(50,0);\& $s\->drawLine(0,20);\& $s\->drawLineTo(0,0);.Ve.Sp.Vb 10\& $s_1= $m\->add($s);\& $s_2= $m\->add($s);\& $s_1\->move(50,40);\& $s_2\->move(10,40);\& for($i=1;$i<5;$i++) {\& $m\->nextFrame();\& $s_2\->move(0,10);\& }\& $m\->nextFrame();\& print "Content\-type: application/x\-shockwave\-flash\en\en";.Ve.Sp.Vb 1\& $m\->output(9); # with compression level 9 (since flash6).Ve.SH "AUTHOR".IX Header "AUTHOR"Soheil Seyfaie (soheil at users.sourceforge.net)..SH "SEE ALSO".IX Header "SEE ALSO"\&\s-1SWF\s0, SWF::Action, SWF::Bitmap, SWF::Button, SWF::Constants, SWF::DisplayItem, SWF::Fill, SWF::Font, SWF::Gradient, SWF::Morph, SWF::Movie, SWF::Shape, SWF::Sound, SWF::Sprite, SWF::TextField, SWF::Text
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -