Sophie

Sophie

distrib > Mandriva > 2008.1 > i586 > by-pkgid > 703d980c580707c382b4e43e25965bc5 > files > 10784

php-manual-pt_BR-5.2.4-1mdv2008.1.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>SWFAction</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="Manual do PHP"
HREF="index.html"><LINK
REL="UP"
TITLE="Ming functions for Flash"
HREF="ref.ming.html"><LINK
REL="PREVIOUS"
TITLE="Ming functions for Flash"
HREF="ref.ming.html"><LINK
REL="NEXT"
TITLE="SWFAction->__construct()"
HREF="function.swfaction.construct.html"><META
HTTP-EQUIV="Content-type"
CONTENT="text/html; charset=UTF-8"></HEAD
><BODY
CLASS="refentry"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Manual do PHP</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="ref.ming.html"
ACCESSKEY="P"
>Anterior</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="function.swfaction.construct.html"
ACCESSKEY="N"
>Próxima</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="ming.swfaction"
></A
>SWFAction</H1
><DIV
CLASS="refnamediv"
><A
NAME="AEN115736"
></A
><P
>    (PHP 4 &#62;= 4.0.5)</P
>SWFAction&nbsp;--&nbsp;SWFAction Class</DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN115739"
></A
><H2
>Descrição</H2
><P
>&#13;   The script syntax is based on the C language, but with a lot taken out- the SWF
   bytecode machine is just too simpleminded to do a lot of things we might like. 
   For instance, we can't implement function calls without a tremendous 
   amount of hackery because the jump bytecode has a hardcoded offset 
   value. No pushing your calling address to the stack and returning- 
   every function would have to know exactly where to return to. 
  </P
><P
>&#13;   So what's left? The compiler recognises the following tokens: 
   <P
></P
><UL
><LI
><P
>&#13;      break
     </P
></LI
><LI
><P
>&#13;      for
     </P
></LI
><LI
><P
>&#13;      continue
     </P
></LI
><LI
><P
>&#13;      if
     </P
></LI
><LI
><P
>&#13;      else
     </P
></LI
><LI
><P
>&#13;      do
     </P
></LI
><LI
><P
>&#13;      while
     </P
></LI
></UL
>
  </P
><P
>&#13;   There is no typed data; all values in the SWF action machine are stored as strings. 
   The following functions can be used in expressions: 
   <P
></P
><DIV
CLASS="variablelist"
><DL
><DT
>time()</DT
><DD
><P
>&#13;       Returns the number of milliseconds (?) elapsed since the movie started. 
      </P
></DD
><DT
>random(seed)</DT
><DD
><P
>&#13;       Returns a pseudo-random number in the range 0-seed.
      </P
></DD
><DT
>length(expr)</DT
><DD
><P
>&#13;       Returns the length of the given expression. 
      </P
></DD
><DT
>int(number)</DT
><DD
><P
>&#13;       Returns the given number rounded down to the nearest integer. 
      </P
></DD
><DT
>concat(expr, expr)</DT
><DD
><P
>&#13;       Returns the concatenation of the given expressions. 
      </P
></DD
><DT
>ord(expr)</DT
><DD
><P
>&#13;       Returns the ASCII code for the given character 
      </P
></DD
><DT
>chr(num)</DT
><DD
><P
>&#13;       Returns the character for the given ASCII code 
      </P
></DD
><DT
>substr(string, location, length)</DT
><DD
><P
>&#13;       Returns the substring of length <CODE
CLASS="parameter"
>length</CODE
> at location <CODE
CLASS="parameter"
>location</CODE
> of 
       the given string <CODE
CLASS="parameter"
>string</CODE
>.
      </P
></DD
></DL
></DIV
>
  </P
><P
>&#13;   Additionally, the following commands may be used: 
   <P
></P
><DIV
CLASS="variablelist"
><DL
><DT
>duplicateClip(clip, name, depth)</DT
><DD
><P
>&#13;       Duplicate the named movie <CODE
CLASS="parameter"
>clip</CODE
> (aka sprite). The new movie clip has name <CODE
CLASS="parameter"
>name</CODE
> 
       and is at depth <CODE
CLASS="parameter"
>depth</CODE
>. 
      </P
></DD
><DT
>removeClip(expr)</DT
><DD
><P
>&#13;       Removes the named movie clip. 
      </P
></DD
><DT
>trace(expr)</DT
><DD
><P
>&#13;       Write the given expression to the trace log. Doubtful that the browser
       plugin does anything with this. 
      </P
></DD
><DT
>startDrag(target, lock, [left, top, right, bottom])</DT
><DD
><P
>&#13;       Start dragging the movie clip <CODE
CLASS="parameter"
>target</CODE
>. The <CODE
CLASS="parameter"
>lock</CODE
> argument indicates whether 
       to lock the mouse (?)- use 0 (<TT
CLASS="constant"
><B
>FALSE</B
></TT
>) or 1 (<TT
CLASS="constant"
><B
>TRUE</B
></TT
>). Optional parameters 
       define a bounding area for the dragging.  
      </P
></DD
><DT
>stopDrag()</DT
><DD
><P
>&#13;       Stop dragging my heart around. And this movie clip, too.  
      </P
></DD
><DT
>callFrame(expr)</DT
><DD
><P
>&#13;       Call the named frame as a function.  
      </P
></DD
><DT
>getURL(url, target, [method])</DT
><DD
><P
>&#13;       Load the given URL into the named target. The <CODE
CLASS="parameter"
>target</CODE
> argument
       corresponds to HTML document targets (such as "_top" or "_blank").
       The optional <CODE
CLASS="parameter"
>method</CODE
> argument can be POST or GET if you want to submit 
       variables back to the server.  
      </P
></DD
><DT
>loadMovie(url, target)</DT
><DD
><P
>&#13;       Load the given URL into the named target. The <CODE
CLASS="parameter"
>target</CODE
> argument can be a 
       frame name (I think), or one of the magical values "_level0" (replaces 
       current movie) or "_level1" (loads new movie on top of current movie). 
      </P
></DD
><DT
>nextFrame()</DT
><DD
><P
>&#13;       Go to the next frame.  
      </P
></DD
><DT
>prevFrame()</DT
><DD
><P
>&#13;       Go to the last (or, rather, previous) frame.  
      </P
></DD
><DT
>play()</DT
><DD
><P
>&#13;       Start playing the movie.  
      </P
></DD
><DT
>stop()</DT
><DD
><P
>&#13;       Stop playing the movie.  
      </P
></DD
><DT
>toggleQuality()</DT
><DD
><P
>&#13;       Toggle between high and low quality.  
      </P
></DD
><DT
>stopSounds()</DT
><DD
><P
>&#13;       Stop playing all sounds.  
      </P
></DD
><DT
>gotoFrame(num)</DT
><DD
><P
>&#13;       Go to frame number <CODE
CLASS="parameter"
>num</CODE
>. Frame numbers start at 0.  
      </P
></DD
><DT
>gotoFrame(name)</DT
><DD
><P
>&#13;       Go to the frame named <CODE
CLASS="parameter"
>name</CODE
>. Which does a lot of good, since I 
       haven't added frame labels yet.  
      </P
></DD
><DT
>setTarget(expr)</DT
><DD
><P
>&#13;       Sets the context for action. Or so they say- I really have no 
       idea what this does. 
      </P
></DD
></DL
></DIV
>
   And there's one weird extra thing. The expression frameLoaded(num) can be used
   in if statements and while loops to check if the given frame number has been
   loaded yet. Well, it's supposed to, anyway, but I've never tested it and I
   seriously doubt it actually works. You can just use /:framesLoaded instead. 
  </P
><P
>&#13;    Movie clips (all together now- aka sprites) have properties. You can 
    read all of them (or can you?), you can set some of them, and here 
    they are: 
    <P
></P
><UL
><LI
><P
>&#13;       x
      </P
></LI
><LI
><P
>&#13;       y 
      </P
></LI
><LI
><P
>&#13;       xScale 
      </P
></LI
><LI
><P
>&#13;       yScale 
      </P
></LI
><LI
><P
>&#13;       currentFrame - (read-only) 
      </P
></LI
><LI
><P
>&#13;       totalFrames - (read-only) 
      </P
></LI
><LI
><P
>&#13;       alpha - transparency level 
      </P
></LI
><LI
><P
>&#13;       visible - 1=on, 0=off (?) 
      </P
></LI
><LI
><P
>&#13;       width - (read-only) 
      </P
></LI
><LI
><P
>&#13;       height - (read-only) 
      </P
></LI
><LI
><P
>&#13;       rotation 
      </P
></LI
><LI
><P
>&#13;       target - (read-only) (???) 
      </P
></LI
><LI
><P
>&#13;       framesLoaded - (read-only) 
      </P
></LI
><LI
><P
>&#13;       name 
      </P
></LI
><LI
><P
>&#13;       dropTarget - (read-only) (???) 
      </P
></LI
><LI
><P
>&#13;       url - (read-only) (???) 
      </P
></LI
><LI
><P
>&#13;       highQuality - 1=high, 0=low (?) 
      </P
></LI
><LI
><P
>&#13;       focusRect - (???) 
      </P
></LI
><LI
><P
>&#13;       soundBufTime - (???) 
      </P
></LI
></UL
>
    So, setting a sprite's x position is as simple as <TT
CLASS="literal"
>/box.x = 100;</TT
>. 
    Why the slash in front of the box, though? That's how flash keeps
    track of the sprites in the movie, just like a Unix filesystem- 
    here it shows that box is at the top level. If the sprite named 
    box had another sprite named biff inside of it, you'd set its x 
    position with /box/biff.x = 100;. At least, I think so; correct 
    me if I'm wrong here. 
  </P
></DIV
><DIV
CLASS="refsect1"
><A
NAME="ming.swfaction.members"
></A
><H2
>Class Members</H2
><DIV
CLASS="refsect2"
><A
NAME="ming.swfaction.methods"
></A
><H3
>Métodos</H3
><P
></P
><TABLE
BORDER="0"
><TBODY
><TR
><TD
><A
HREF="function.swfaction.construct.html"
>SWFAction-&#62;__construct()</A
></TD
></TR
></TBODY
></TABLE
><P
></P
></DIV
></DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN115925"
></A
><H2
>Exemplos</H2
><P
>&#13;   This simple example will move the red square across the window.
   <TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
CLASS="EXAMPLE"
><TR
><TD
><DIV
CLASS="example"
><A
NAME="AEN115928"
></A
><P
><B
>Exemplo 1. <B
CLASS="function"
>swfaction()</B
> example</B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><code><font color="#000000">
<font color="#0000BB">&lt;?php<br />&nbsp;&nbsp;$s </font><font color="#007700">= new </font><font color="#0000BB">SWFShape</font><font color="#007700">();<br />&nbsp;&nbsp;</font><font color="#0000BB">$f </font><font color="#007700">= </font><font color="#0000BB">$s</font><font color="#007700">-&gt;</font><font color="#0000BB">addFill</font><font color="#007700">(</font><font color="#0000BB">0xff</font><font color="#007700">, </font><font color="#0000BB">0</font><font color="#007700">, </font><font color="#0000BB">0</font><font color="#007700">);<br />&nbsp;&nbsp;</font><font color="#0000BB">$s</font><font color="#007700">-&gt;</font><font color="#0000BB">setRightFill</font><font color="#007700">(</font><font color="#0000BB">$f</font><font color="#007700">);<br /><br />&nbsp;&nbsp;</font><font color="#0000BB">$s</font><font color="#007700">-&gt;</font><font color="#0000BB">movePenTo</font><font color="#007700">(-</font><font color="#0000BB">500</font><font color="#007700">, -</font><font color="#0000BB">500</font><font color="#007700">);<br />&nbsp;&nbsp;</font><font color="#0000BB">$s</font><font color="#007700">-&gt;</font><font color="#0000BB">drawLineTo</font><font color="#007700">(</font><font color="#0000BB">500</font><font color="#007700">, -</font><font color="#0000BB">500</font><font color="#007700">);<br />&nbsp;&nbsp;</font><font color="#0000BB">$s</font><font color="#007700">-&gt;</font><font color="#0000BB">drawLineTo</font><font color="#007700">(</font><font color="#0000BB">500</font><font color="#007700">, </font><font color="#0000BB">500</font><font color="#007700">);<br />&nbsp;&nbsp;</font><font color="#0000BB">$s</font><font color="#007700">-&gt;</font><font color="#0000BB">drawLineTo</font><font color="#007700">(-</font><font color="#0000BB">500</font><font color="#007700">, </font><font color="#0000BB">500</font><font color="#007700">);<br />&nbsp;&nbsp;</font><font color="#0000BB">$s</font><font color="#007700">-&gt;</font><font color="#0000BB">drawLineTo</font><font color="#007700">(-</font><font color="#0000BB">500</font><font color="#007700">, -</font><font color="#0000BB">500</font><font color="#007700">);<br /><br />&nbsp;&nbsp;</font><font color="#0000BB">$p </font><font color="#007700">= new </font><font color="#0000BB">SWFSprite</font><font color="#007700">();<br />&nbsp;&nbsp;</font><font color="#0000BB">$i </font><font color="#007700">= </font><font color="#0000BB">$p</font><font color="#007700">-&gt;</font><font color="#0000BB">add</font><font color="#007700">(</font><font color="#0000BB">$s</font><font color="#007700">);<br />&nbsp;&nbsp;</font><font color="#0000BB">$i</font><font color="#007700">-&gt;</font><font color="#0000BB">setDepth</font><font color="#007700">(</font><font color="#0000BB">1</font><font color="#007700">);<br />&nbsp;&nbsp;</font><font color="#0000BB">$p</font><font color="#007700">-&gt;</font><font color="#0000BB">nextFrame</font><font color="#007700">();<br /><br />&nbsp;&nbsp;for (</font><font color="#0000BB">$n</font><font color="#007700">=</font><font color="#0000BB">0</font><font color="#007700">; </font><font color="#0000BB">$n</font><font color="#007700">&lt;</font><font color="#0000BB">5</font><font color="#007700">; ++</font><font color="#0000BB">$n</font><font color="#007700">) {<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">$i</font><font color="#007700">-&gt;</font><font color="#0000BB">rotate</font><font color="#007700">(-</font><font color="#0000BB">15</font><font color="#007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">$p</font><font color="#007700">-&gt;</font><font color="#0000BB">nextFrame</font><font color="#007700">();<br />&nbsp;&nbsp;}<br /><br />&nbsp;&nbsp;</font><font color="#0000BB">$m </font><font color="#007700">= new </font><font color="#0000BB">SWFMovie</font><font color="#007700">();<br />&nbsp;&nbsp;</font><font color="#0000BB">$m</font><font color="#007700">-&gt;</font><font color="#0000BB">setBackground</font><font color="#007700">(</font><font color="#0000BB">0xff</font><font color="#007700">, </font><font color="#0000BB">0xff</font><font color="#007700">, </font><font color="#0000BB">0xff</font><font color="#007700">);<br />&nbsp;&nbsp;</font><font color="#0000BB">$m</font><font color="#007700">-&gt;</font><font color="#0000BB">setDimension</font><font color="#007700">(</font><font color="#0000BB">6000</font><font color="#007700">, </font><font color="#0000BB">4000</font><font color="#007700">);<br /><br />&nbsp;&nbsp;</font><font color="#0000BB">$i </font><font color="#007700">= </font><font color="#0000BB">$m</font><font color="#007700">-&gt;</font><font color="#0000BB">add</font><font color="#007700">(</font><font color="#0000BB">$p</font><font color="#007700">);<br />&nbsp;&nbsp;</font><font color="#0000BB">$i</font><font color="#007700">-&gt;</font><font color="#0000BB">setDepth</font><font color="#007700">(</font><font color="#0000BB">1</font><font color="#007700">);<br />&nbsp;&nbsp;</font><font color="#0000BB">$i</font><font color="#007700">-&gt;</font><font color="#0000BB">moveTo</font><font color="#007700">(-</font><font color="#0000BB">500</font><font color="#007700">,</font><font color="#0000BB">2000</font><font color="#007700">);<br />&nbsp;&nbsp;</font><font color="#0000BB">$i</font><font color="#007700">-&gt;</font><font color="#0000BB">setName</font><font color="#007700">(</font><font color="#DD0000">"box"</font><font color="#007700">);<br /><br />&nbsp;&nbsp;</font><font color="#0000BB">$m</font><font color="#007700">-&gt;</font><font color="#0000BB">add</font><font color="#007700">(new </font><font color="#0000BB">SWFAction</font><font color="#007700">(</font><font color="#DD0000">"/box.x += 3;"</font><font color="#007700">));<br />&nbsp;&nbsp;</font><font color="#0000BB">$m</font><font color="#007700">-&gt;</font><font color="#0000BB">nextFrame</font><font color="#007700">();<br />&nbsp;&nbsp;</font><font color="#0000BB">$m</font><font color="#007700">-&gt;</font><font color="#0000BB">add</font><font color="#007700">(new </font><font color="#0000BB">SWFAction</font><font color="#007700">(</font><font color="#DD0000">"gotoFrame(0); play();"</font><font color="#007700">));<br />&nbsp;&nbsp;</font><font color="#0000BB">$m</font><font color="#007700">-&gt;</font><font color="#0000BB">nextFrame</font><font color="#007700">();<br /><br />&nbsp;&nbsp;</font><font color="#0000BB">header</font><font color="#007700">(</font><font color="#DD0000">'Content-type: application/x-shockwave-flash'</font><font color="#007700">);<br />&nbsp;&nbsp;</font><font color="#0000BB">$m</font><font color="#007700">-&gt;</font><font color="#0000BB">output</font><font color="#007700">();<br /></font><font color="#0000BB">?&gt;</font>
</font>
</code></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
>
  </P
><P
>&#13;   This simple example tracks down your mouse on the screen.
   <TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
CLASS="EXAMPLE"
><TR
><TD
><DIV
CLASS="example"
><A
NAME="AEN115933"
></A
><P
><B
>Exemplo 2. <B
CLASS="function"
>swfaction()</B
> example</B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><code><font color="#000000">
<font color="#0000BB">&lt;?php<br /><br />&nbsp;&nbsp;$m </font><font color="#007700">= new </font><font color="#0000BB">SWFMovie</font><font color="#007700">();<br />&nbsp;&nbsp;</font><font color="#0000BB">$m</font><font color="#007700">-&gt;</font><font color="#0000BB">setRate</font><font color="#007700">(</font><font color="#0000BB">36.0</font><font color="#007700">);<br />&nbsp;&nbsp;</font><font color="#0000BB">$m</font><font color="#007700">-&gt;</font><font color="#0000BB">setDimension</font><font color="#007700">(</font><font color="#0000BB">1200</font><font color="#007700">, </font><font color="#0000BB">800</font><font color="#007700">);<br />&nbsp;&nbsp;</font><font color="#0000BB">$m</font><font color="#007700">-&gt;</font><font color="#0000BB">setBackground</font><font color="#007700">(</font><font color="#0000BB">0</font><font color="#007700">, </font><font color="#0000BB">0</font><font color="#007700">, </font><font color="#0000BB">0</font><font color="#007700">);<br /><br />&nbsp;&nbsp;</font><font color="#FF8000">/* mouse tracking sprite - empty, but follows mouse so we can<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;get its x and y coordinates */<br /><br />&nbsp;&nbsp;</font><font color="#0000BB">$i </font><font color="#007700">= </font><font color="#0000BB">$m</font><font color="#007700">-&gt;</font><font color="#0000BB">add</font><font color="#007700">(new </font><font color="#0000BB">SWFSprite</font><font color="#007700">());<br />&nbsp;&nbsp;</font><font color="#0000BB">$i</font><font color="#007700">-&gt;</font><font color="#0000BB">setName</font><font color="#007700">(</font><font color="#DD0000">'mouse'</font><font color="#007700">);<br /><br />&nbsp;&nbsp;</font><font color="#0000BB">$m</font><font color="#007700">-&gt;</font><font color="#0000BB">add</font><font color="#007700">(new </font><font color="#0000BB">SWFAction</font><font color="#007700">(</font><font color="#DD0000">"<br />&nbsp;&nbsp;&nbsp;&nbsp;startDrag('/mouse', 1); /* '1' means lock sprite to the mouse */<br />&nbsp;&nbsp;"</font><font color="#007700">));<br /><br />&nbsp;&nbsp;</font><font color="#FF8000">/* might as well turn off antialiasing, since these are just squares. */<br /><br />&nbsp;&nbsp;</font><font color="#0000BB">$m</font><font color="#007700">-&gt;</font><font color="#0000BB">add</font><font color="#007700">(new </font><font color="#0000BB">SWFAction</font><font color="#007700">(</font><font color="#DD0000">"<br />&nbsp;&nbsp;&nbsp;&nbsp;this.quality = 0;<br />&nbsp;&nbsp;"</font><font color="#007700">));<br /><br />&nbsp;&nbsp;</font><font color="#FF8000">/* morphing box */<br />&nbsp;&nbsp;</font><font color="#0000BB">$r </font><font color="#007700">= new </font><font color="#0000BB">SWFMorph</font><font color="#007700">();<br />&nbsp;&nbsp;</font><font color="#0000BB">$s </font><font color="#007700">= </font><font color="#0000BB">$r</font><font color="#007700">-&gt;</font><font color="#0000BB">getShape1</font><font color="#007700">();<br /><br />&nbsp;&nbsp;</font><font color="#FF8000">/* Note this is backwards from normal shapes.&nbsp;&nbsp;No idea why. */<br />&nbsp;&nbsp;</font><font color="#0000BB">$s</font><font color="#007700">-&gt;</font><font color="#0000BB">setLeftFill</font><font color="#007700">(</font><font color="#0000BB">$s</font><font color="#007700">-&gt;</font><font color="#0000BB">addFill</font><font color="#007700">(</font><font color="#0000BB">0xff</font><font color="#007700">, </font><font color="#0000BB">0xff</font><font color="#007700">, </font><font color="#0000BB">0xff</font><font color="#007700">));<br />&nbsp;&nbsp;</font><font color="#0000BB">$s</font><font color="#007700">-&gt;</font><font color="#0000BB">movePenTo</font><font color="#007700">(-</font><font color="#0000BB">40</font><font color="#007700">, -</font><font color="#0000BB">40</font><font color="#007700">);<br />&nbsp;&nbsp;</font><font color="#0000BB">$s</font><font color="#007700">-&gt;</font><font color="#0000BB">drawLine</font><font color="#007700">(</font><font color="#0000BB">80</font><font color="#007700">, </font><font color="#0000BB">0</font><font color="#007700">);<br />&nbsp;&nbsp;</font><font color="#0000BB">$s</font><font color="#007700">-&gt;</font><font color="#0000BB">drawLine</font><font color="#007700">(</font><font color="#0000BB">0</font><font color="#007700">, </font><font color="#0000BB">80</font><font color="#007700">);<br />&nbsp;&nbsp;</font><font color="#0000BB">$s</font><font color="#007700">-&gt;</font><font color="#0000BB">drawLine</font><font color="#007700">(-</font><font color="#0000BB">80</font><font color="#007700">, </font><font color="#0000BB">0</font><font color="#007700">);<br />&nbsp;&nbsp;</font><font color="#0000BB">$s</font><font color="#007700">-&gt;</font><font color="#0000BB">drawLine</font><font color="#007700">(</font><font color="#0000BB">0</font><font color="#007700">, -</font><font color="#0000BB">80</font><font color="#007700">);<br /><br />&nbsp;&nbsp;</font><font color="#0000BB">$s </font><font color="#007700">= </font><font color="#0000BB">$r</font><font color="#007700">-&gt;</font><font color="#0000BB">getShape2</font><font color="#007700">();<br /><br />&nbsp;&nbsp;</font><font color="#0000BB">$s</font><font color="#007700">-&gt;</font><font color="#0000BB">setLeftFill</font><font color="#007700">(</font><font color="#0000BB">$s</font><font color="#007700">-&gt;</font><font color="#0000BB">addFill</font><font color="#007700">(</font><font color="#0000BB">0x00</font><font color="#007700">, </font><font color="#0000BB">0x00</font><font color="#007700">, </font><font color="#0000BB">0x00</font><font color="#007700">));<br />&nbsp;&nbsp;</font><font color="#0000BB">$s</font><font color="#007700">-&gt;</font><font color="#0000BB">movePenTo</font><font color="#007700">(-</font><font color="#0000BB">1</font><font color="#007700">, -</font><font color="#0000BB">1</font><font color="#007700">);<br />&nbsp;&nbsp;</font><font color="#0000BB">$s</font><font color="#007700">-&gt;</font><font color="#0000BB">drawLine</font><font color="#007700">(</font><font color="#0000BB">2</font><font color="#007700">, </font><font color="#0000BB">0</font><font color="#007700">);<br />&nbsp;&nbsp;</font><font color="#0000BB">$s</font><font color="#007700">-&gt;</font><font color="#0000BB">drawLine</font><font color="#007700">(</font><font color="#0000BB">0</font><font color="#007700">, </font><font color="#0000BB">2</font><font color="#007700">);<br />&nbsp;&nbsp;</font><font color="#0000BB">$s</font><font color="#007700">-&gt;</font><font color="#0000BB">drawLine</font><font color="#007700">(-</font><font color="#0000BB">2</font><font color="#007700">, </font><font color="#0000BB">0</font><font color="#007700">);<br />&nbsp;&nbsp;</font><font color="#0000BB">$s</font><font color="#007700">-&gt;</font><font color="#0000BB">drawLine</font><font color="#007700">(</font><font color="#0000BB">0</font><font color="#007700">, -</font><font color="#0000BB">2</font><font color="#007700">);<br /><br />&nbsp;&nbsp;</font><font color="#FF8000">/* sprite container for morphing box -<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this is just a timeline w/ the box morphing */<br /><br />&nbsp;&nbsp;</font><font color="#0000BB">$box </font><font color="#007700">= new </font><font color="#0000BB">SWFSprite</font><font color="#007700">();<br />&nbsp;&nbsp;</font><font color="#0000BB">$box</font><font color="#007700">-&gt;</font><font color="#0000BB">add</font><font color="#007700">(new </font><font color="#0000BB">SWFAction</font><font color="#007700">(</font><font color="#DD0000">"<br />&nbsp;&nbsp;&nbsp;&nbsp;stop();<br />&nbsp;&nbsp;"</font><font color="#007700">));<br />&nbsp;&nbsp;</font><font color="#0000BB">$i </font><font color="#007700">= </font><font color="#0000BB">$box</font><font color="#007700">-&gt;</font><font color="#0000BB">add</font><font color="#007700">(</font><font color="#0000BB">$r</font><font color="#007700">);<br /><br />&nbsp;&nbsp;for (</font><font color="#0000BB">$n</font><font color="#007700">=</font><font color="#0000BB">0</font><font color="#007700">; </font><font color="#0000BB">$n</font><font color="#007700">&lt;=</font><font color="#0000BB">20</font><font color="#007700">; ++</font><font color="#0000BB">$n</font><font color="#007700">) {<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">$i</font><font color="#007700">-&gt;</font><font color="#0000BB">setRatio</font><font color="#007700">(</font><font color="#0000BB">$n</font><font color="#007700">/</font><font color="#0000BB">20</font><font color="#007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">$box</font><font color="#007700">-&gt;</font><font color="#0000BB">nextFrame</font><font color="#007700">();<br />&nbsp;&nbsp;}<br /><br />&nbsp;&nbsp;</font><font color="#FF8000">/* this container sprite allows us to use the same action code many times */<br /><br />&nbsp;&nbsp;</font><font color="#0000BB">$cell </font><font color="#007700">= new </font><font color="#0000BB">SWFSprite</font><font color="#007700">();<br />&nbsp;&nbsp;</font><font color="#0000BB">$i </font><font color="#007700">= </font><font color="#0000BB">$cell</font><font color="#007700">-&gt;</font><font color="#0000BB">add</font><font color="#007700">(</font><font color="#0000BB">$box</font><font color="#007700">);<br />&nbsp;&nbsp;</font><font color="#0000BB">$i</font><font color="#007700">-&gt;</font><font color="#0000BB">setName</font><font color="#007700">(</font><font color="#DD0000">'box'</font><font color="#007700">);<br /><br />&nbsp;&nbsp;</font><font color="#0000BB">$cell</font><font color="#007700">-&gt;</font><font color="#0000BB">add</font><font color="#007700">(new </font><font color="#0000BB">SWFAction</font><font color="#007700">(</font><font color="#DD0000">"<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;setTarget('box');<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;/* ...x means the x coordinate of the parent, i.e. (..).x */<br />&nbsp;&nbsp;&nbsp;&nbsp;dx = (/mouse.x + random(6)-3 - ...x)/5;<br />&nbsp;&nbsp;&nbsp;&nbsp;dy = (/mouse.y + random(6)-3 - ...y)/5;<br />&nbsp;&nbsp;&nbsp;&nbsp;gotoFrame(int(dx*dx + dy*dy));<br /><br />&nbsp;&nbsp;"</font><font color="#007700">));<br /><br />&nbsp;&nbsp;</font><font color="#0000BB">$cell</font><font color="#007700">-&gt;</font><font color="#0000BB">nextFrame</font><font color="#007700">();<br />&nbsp;&nbsp;</font><font color="#0000BB">$cell</font><font color="#007700">-&gt;</font><font color="#0000BB">add</font><font color="#007700">(new </font><font color="#0000BB">SWFAction</font><font color="#007700">(</font><font color="#DD0000">"<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;gotoFrame(0);<br />&nbsp;&nbsp;&nbsp;&nbsp;play();<br /><br />&nbsp;&nbsp;"</font><font color="#007700">));<br /><br />&nbsp;&nbsp;</font><font color="#0000BB">$cell</font><font color="#007700">-&gt;</font><font color="#0000BB">nextFrame</font><font color="#007700">();<br /><br />&nbsp;&nbsp;</font><font color="#FF8000">/* finally, add a bunch of the cells to the movie */<br /><br />&nbsp;&nbsp;</font><font color="#007700">for (</font><font color="#0000BB">$x</font><font color="#007700">=</font><font color="#0000BB">0</font><font color="#007700">; </font><font color="#0000BB">$x</font><font color="#007700">&lt;</font><font color="#0000BB">12</font><font color="#007700">; ++</font><font color="#0000BB">$x</font><font color="#007700">) {<br />&nbsp;&nbsp;&nbsp;&nbsp;for (</font><font color="#0000BB">$y</font><font color="#007700">=</font><font color="#0000BB">0</font><font color="#007700">; </font><font color="#0000BB">$y</font><font color="#007700">&lt;</font><font color="#0000BB">8</font><font color="#007700">; ++</font><font color="#0000BB">$y</font><font color="#007700">) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">$i </font><font color="#007700">= </font><font color="#0000BB">$m</font><font color="#007700">-&gt;</font><font color="#0000BB">add</font><font color="#007700">(</font><font color="#0000BB">$cell</font><font color="#007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">$i</font><font color="#007700">-&gt;</font><font color="#0000BB">moveTo</font><font color="#007700">(</font><font color="#0000BB">100</font><font color="#007700">*</font><font color="#0000BB">$x</font><font color="#007700">+</font><font color="#0000BB">50</font><font color="#007700">, </font><font color="#0000BB">100</font><font color="#007700">*</font><font color="#0000BB">$y</font><font color="#007700">+</font><font color="#0000BB">50</font><font color="#007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;}<br /><br />&nbsp;&nbsp;</font><font color="#0000BB">$m</font><font color="#007700">-&gt;</font><font color="#0000BB">nextFrame</font><font color="#007700">();<br /><br />&nbsp;&nbsp;</font><font color="#0000BB">$m</font><font color="#007700">-&gt;</font><font color="#0000BB">add</font><font color="#007700">(new </font><font color="#0000BB">SWFAction</font><font color="#007700">(</font><font color="#DD0000">"<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;gotoFrame(1);<br />&nbsp;&nbsp;&nbsp;&nbsp;play();<br /><br />&nbsp;&nbsp;"</font><font color="#007700">));<br /><br />&nbsp;&nbsp;</font><font color="#0000BB">header</font><font color="#007700">(</font><font color="#DD0000">'Content-type: application/x-shockwave-flash'</font><font color="#007700">);<br />&nbsp;&nbsp;</font><font color="#0000BB">$m</font><font color="#007700">-&gt;</font><font color="#0000BB">output</font><font color="#007700">();<br /></font><font color="#0000BB">?&gt;</font>
</font>
</code></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
>
  </P
><P
>&#13;   Same as above, but with nice colored balls...
   <TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
CLASS="EXAMPLE"
><TR
><TD
><DIV
CLASS="example"
><A
NAME="AEN115938"
></A
><P
><B
>Exemplo 3. <B
CLASS="function"
>swfaction()</B
> example</B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><code><font color="#000000">
<font color="#0000BB">&lt;?php<br /><br />&nbsp;&nbsp;$m </font><font color="#007700">= new </font><font color="#0000BB">SWFMovie</font><font color="#007700">();<br />&nbsp;&nbsp;</font><font color="#0000BB">$m</font><font color="#007700">-&gt;</font><font color="#0000BB">setDimension</font><font color="#007700">(</font><font color="#0000BB">11000</font><font color="#007700">, </font><font color="#0000BB">8000</font><font color="#007700">);<br />&nbsp;&nbsp;</font><font color="#0000BB">$m</font><font color="#007700">-&gt;</font><font color="#0000BB">setBackground</font><font color="#007700">(</font><font color="#0000BB">0x00</font><font color="#007700">, </font><font color="#0000BB">0x00</font><font color="#007700">, </font><font color="#0000BB">0x00</font><font color="#007700">);<br /><br />&nbsp;&nbsp;</font><font color="#0000BB">$m</font><font color="#007700">-&gt;</font><font color="#0000BB">add</font><font color="#007700">(new </font><font color="#0000BB">SWFAction</font><font color="#007700">(</font><font color="#DD0000">"<br /><br />this.quality = 0;<br />/frames.visible = 0;<br />startDrag('/mouse', 1);<br /><br />&nbsp;&nbsp;"</font><font color="#007700">));<br /><br />&nbsp;&nbsp;</font><font color="#FF8000">// mouse tracking sprite<br />&nbsp;&nbsp;</font><font color="#0000BB">$t </font><font color="#007700">= new </font><font color="#0000BB">SWFSprite</font><font color="#007700">();<br />&nbsp;&nbsp;</font><font color="#0000BB">$i </font><font color="#007700">= </font><font color="#0000BB">$m</font><font color="#007700">-&gt;</font><font color="#0000BB">add</font><font color="#007700">(</font><font color="#0000BB">$t</font><font color="#007700">);<br />&nbsp;&nbsp;</font><font color="#0000BB">$i</font><font color="#007700">-&gt;</font><font color="#0000BB">setName</font><font color="#007700">(</font><font color="#DD0000">'mouse'</font><font color="#007700">);<br /><br />&nbsp;&nbsp;</font><font color="#0000BB">$g </font><font color="#007700">= new </font><font color="#0000BB">SWFGradient</font><font color="#007700">();<br />&nbsp;&nbsp;</font><font color="#0000BB">$g</font><font color="#007700">-&gt;</font><font color="#0000BB">addEntry</font><font color="#007700">(</font><font color="#0000BB">0</font><font color="#007700">, </font><font color="#0000BB">0xff</font><font color="#007700">, </font><font color="#0000BB">0xff</font><font color="#007700">, </font><font color="#0000BB">0xff</font><font color="#007700">, </font><font color="#0000BB">0xff</font><font color="#007700">);<br />&nbsp;&nbsp;</font><font color="#0000BB">$g</font><font color="#007700">-&gt;</font><font color="#0000BB">addEntry</font><font color="#007700">(</font><font color="#0000BB">0.1</font><font color="#007700">, </font><font color="#0000BB">0xff</font><font color="#007700">, </font><font color="#0000BB">0xff</font><font color="#007700">, </font><font color="#0000BB">0xff</font><font color="#007700">, </font><font color="#0000BB">0xff</font><font color="#007700">);<br />&nbsp;&nbsp;</font><font color="#0000BB">$g</font><font color="#007700">-&gt;</font><font color="#0000BB">addEntry</font><font color="#007700">(</font><font color="#0000BB">0.5</font><font color="#007700">, </font><font color="#0000BB">0xff</font><font color="#007700">, </font><font color="#0000BB">0xff</font><font color="#007700">, </font><font color="#0000BB">0xff</font><font color="#007700">, </font><font color="#0000BB">0x5f</font><font color="#007700">);<br />&nbsp;&nbsp;</font><font color="#0000BB">$g</font><font color="#007700">-&gt;</font><font color="#0000BB">addEntry</font><font color="#007700">(</font><font color="#0000BB">1.0</font><font color="#007700">, </font><font color="#0000BB">0xff</font><font color="#007700">, </font><font color="#0000BB">0xff</font><font color="#007700">, </font><font color="#0000BB">0xff</font><font color="#007700">, </font><font color="#0000BB">0</font><font color="#007700">);<br /><br />&nbsp;&nbsp;</font><font color="#FF8000">// gradient shape thing<br />&nbsp;&nbsp;</font><font color="#0000BB">$s </font><font color="#007700">= new </font><font color="#0000BB">SWFShape</font><font color="#007700">();<br />&nbsp;&nbsp;</font><font color="#0000BB">$f </font><font color="#007700">= </font><font color="#0000BB">$s</font><font color="#007700">-&gt;</font><font color="#0000BB">addFill</font><font color="#007700">(</font><font color="#0000BB">$g</font><font color="#007700">, </font><font color="#0000BB">SWFFILL_RADIAL_GRADIENT</font><font color="#007700">);<br />&nbsp;&nbsp;</font><font color="#0000BB">$f</font><font color="#007700">-&gt;</font><font color="#0000BB">scaleTo</font><font color="#007700">(</font><font color="#0000BB">0.03</font><font color="#007700">);<br />&nbsp;&nbsp;</font><font color="#0000BB">$s</font><font color="#007700">-&gt;</font><font color="#0000BB">setRightFill</font><font color="#007700">(</font><font color="#0000BB">$f</font><font color="#007700">);<br />&nbsp;&nbsp;</font><font color="#0000BB">$s</font><font color="#007700">-&gt;</font><font color="#0000BB">movePenTo</font><font color="#007700">(-</font><font color="#0000BB">600</font><font color="#007700">, -</font><font color="#0000BB">600</font><font color="#007700">);<br />&nbsp;&nbsp;</font><font color="#0000BB">$s</font><font color="#007700">-&gt;</font><font color="#0000BB">drawLine</font><font color="#007700">(</font><font color="#0000BB">1200</font><font color="#007700">, </font><font color="#0000BB">0</font><font color="#007700">);<br />&nbsp;&nbsp;</font><font color="#0000BB">$s</font><font color="#007700">-&gt;</font><font color="#0000BB">drawLine</font><font color="#007700">(</font><font color="#0000BB">0</font><font color="#007700">, </font><font color="#0000BB">1200</font><font color="#007700">);<br />&nbsp;&nbsp;</font><font color="#0000BB">$s</font><font color="#007700">-&gt;</font><font color="#0000BB">drawLine</font><font color="#007700">(-</font><font color="#0000BB">1200</font><font color="#007700">, </font><font color="#0000BB">0</font><font color="#007700">);<br />&nbsp;&nbsp;</font><font color="#0000BB">$s</font><font color="#007700">-&gt;</font><font color="#0000BB">drawLine</font><font color="#007700">(</font><font color="#0000BB">0</font><font color="#007700">, -</font><font color="#0000BB">1200</font><font color="#007700">);<br /><br />&nbsp;&nbsp;</font><font color="#FF8000">// need to make this a sprite so we can multColor it<br />&nbsp;&nbsp;</font><font color="#0000BB">$p </font><font color="#007700">= new </font><font color="#0000BB">SWFSprite</font><font color="#007700">();<br />&nbsp;&nbsp;</font><font color="#0000BB">$p</font><font color="#007700">-&gt;</font><font color="#0000BB">add</font><font color="#007700">(</font><font color="#0000BB">$s</font><font color="#007700">);<br />&nbsp;&nbsp;</font><font color="#0000BB">$p</font><font color="#007700">-&gt;</font><font color="#0000BB">nextFrame</font><font color="#007700">();<br /><br />&nbsp;&nbsp;</font><font color="#FF8000">// put the shape in here, each frame a different color<br />&nbsp;&nbsp;</font><font color="#0000BB">$q </font><font color="#007700">= new </font><font color="#0000BB">SWFSprite</font><font color="#007700">();<br />&nbsp;&nbsp;</font><font color="#0000BB">$q</font><font color="#007700">-&gt;</font><font color="#0000BB">add</font><font color="#007700">(new </font><font color="#0000BB">SWFAction</font><font color="#007700">(</font><font color="#DD0000">"gotoFrame(random(7)+1); stop();"</font><font color="#007700">));<br />&nbsp;&nbsp;</font><font color="#0000BB">$i </font><font color="#007700">= </font><font color="#0000BB">$q</font><font color="#007700">-&gt;</font><font color="#0000BB">add</font><font color="#007700">(</font><font color="#0000BB">$p</font><font color="#007700">);<br /><br />&nbsp;&nbsp;</font><font color="#0000BB">$i</font><font color="#007700">-&gt;</font><font color="#0000BB">multColor</font><font color="#007700">(</font><font color="#0000BB">1.0</font><font color="#007700">, </font><font color="#0000BB">1.0</font><font color="#007700">, </font><font color="#0000BB">1.0</font><font color="#007700">);<br />&nbsp;&nbsp;</font><font color="#0000BB">$q</font><font color="#007700">-&gt;</font><font color="#0000BB">nextFrame</font><font color="#007700">();<br />&nbsp;&nbsp;</font><font color="#0000BB">$i</font><font color="#007700">-&gt;</font><font color="#0000BB">multColor</font><font color="#007700">(</font><font color="#0000BB">1.0</font><font color="#007700">, </font><font color="#0000BB">0.5</font><font color="#007700">, </font><font color="#0000BB">0.5</font><font color="#007700">);<br />&nbsp;&nbsp;</font><font color="#0000BB">$q</font><font color="#007700">-&gt;</font><font color="#0000BB">nextFrame</font><font color="#007700">();<br />&nbsp;&nbsp;</font><font color="#0000BB">$i</font><font color="#007700">-&gt;</font><font color="#0000BB">multColor</font><font color="#007700">(</font><font color="#0000BB">1.0</font><font color="#007700">, </font><font color="#0000BB">0.75</font><font color="#007700">, </font><font color="#0000BB">0.5</font><font color="#007700">);<br />&nbsp;&nbsp;</font><font color="#0000BB">$q</font><font color="#007700">-&gt;</font><font color="#0000BB">nextFrame</font><font color="#007700">();<br />&nbsp;&nbsp;</font><font color="#0000BB">$i</font><font color="#007700">-&gt;</font><font color="#0000BB">multColor</font><font color="#007700">(</font><font color="#0000BB">1.0</font><font color="#007700">, </font><font color="#0000BB">1.0</font><font color="#007700">, </font><font color="#0000BB">0.5</font><font color="#007700">);<br />&nbsp;&nbsp;</font><font color="#0000BB">$q</font><font color="#007700">-&gt;</font><font color="#0000BB">nextFrame</font><font color="#007700">();<br />&nbsp;&nbsp;</font><font color="#0000BB">$i</font><font color="#007700">-&gt;</font><font color="#0000BB">multColor</font><font color="#007700">(</font><font color="#0000BB">0.5</font><font color="#007700">, </font><font color="#0000BB">1.0</font><font color="#007700">, </font><font color="#0000BB">0.5</font><font color="#007700">);<br />&nbsp;&nbsp;</font><font color="#0000BB">$q</font><font color="#007700">-&gt;</font><font color="#0000BB">nextFrame</font><font color="#007700">();<br />&nbsp;&nbsp;</font><font color="#0000BB">$i</font><font color="#007700">-&gt;</font><font color="#0000BB">multColor</font><font color="#007700">(</font><font color="#0000BB">0.5</font><font color="#007700">, </font><font color="#0000BB">0.5</font><font color="#007700">, </font><font color="#0000BB">1.0</font><font color="#007700">);<br />&nbsp;&nbsp;</font><font color="#0000BB">$q</font><font color="#007700">-&gt;</font><font color="#0000BB">nextFrame</font><font color="#007700">();<br />&nbsp;&nbsp;</font><font color="#0000BB">$i</font><font color="#007700">-&gt;</font><font color="#0000BB">multColor</font><font color="#007700">(</font><font color="#0000BB">1.0</font><font color="#007700">, </font><font color="#0000BB">0.5</font><font color="#007700">, </font><font color="#0000BB">1.0</font><font color="#007700">);<br />&nbsp;&nbsp;</font><font color="#0000BB">$q</font><font color="#007700">-&gt;</font><font color="#0000BB">nextFrame</font><font color="#007700">();<br /><br />&nbsp;&nbsp;</font><font color="#FF8000">// finally, this one contains the action code<br />&nbsp;&nbsp;</font><font color="#0000BB">$p </font><font color="#007700">= new </font><font color="#0000BB">SWFSprite</font><font color="#007700">();<br />&nbsp;&nbsp;</font><font color="#0000BB">$i </font><font color="#007700">= </font><font color="#0000BB">$p</font><font color="#007700">-&gt;</font><font color="#0000BB">add</font><font color="#007700">(</font><font color="#0000BB">$q</font><font color="#007700">);<br />&nbsp;&nbsp;</font><font color="#0000BB">$i</font><font color="#007700">-&gt;</font><font color="#0000BB">setName</font><font color="#007700">(</font><font color="#DD0000">'frames'</font><font color="#007700">);<br />&nbsp;&nbsp;</font><font color="#0000BB">$p</font><font color="#007700">-&gt;</font><font color="#0000BB">add</font><font color="#007700">(new </font><font color="#0000BB">SWFAction</font><font color="#007700">(</font><font color="#DD0000">"<br /><br />dx = (/:mousex-/:lastx)/3 + random(10)-5;<br />dy = (/:mousey-/:lasty)/3;<br />x = /:mousex;<br />y = /:mousey;<br />alpha = 100;<br /><br />&nbsp;&nbsp;"</font><font color="#007700">));<br />&nbsp;&nbsp;</font><font color="#0000BB">$p</font><font color="#007700">-&gt;</font><font color="#0000BB">nextFrame</font><font color="#007700">();<br /><br />&nbsp;&nbsp;</font><font color="#0000BB">$p</font><font color="#007700">-&gt;</font><font color="#0000BB">add</font><font color="#007700">(new </font><font color="#0000BB">SWFAction</font><font color="#007700">(</font><font color="#DD0000">"<br /><br />this.x = x;<br />this.y = y;<br />this.alpha = alpha;<br />x += dx;<br />y += dy;<br />dy += 3;<br />alpha -= 8;<br /><br />&nbsp;&nbsp;"</font><font color="#007700">));<br />&nbsp;&nbsp;</font><font color="#0000BB">$p</font><font color="#007700">-&gt;</font><font color="#0000BB">nextFrame</font><font color="#007700">();<br /><br />&nbsp;&nbsp;</font><font color="#0000BB">$p</font><font color="#007700">-&gt;</font><font color="#0000BB">add</font><font color="#007700">(new </font><font color="#0000BB">SWFAction</font><font color="#007700">(</font><font color="#DD0000">"prevFrame(); play();"</font><font color="#007700">));<br />&nbsp;&nbsp;</font><font color="#0000BB">$p</font><font color="#007700">-&gt;</font><font color="#0000BB">nextFrame</font><font color="#007700">();<br /><br />&nbsp;&nbsp;</font><font color="#0000BB">$i </font><font color="#007700">= </font><font color="#0000BB">$m</font><font color="#007700">-&gt;</font><font color="#0000BB">add</font><font color="#007700">(</font><font color="#0000BB">$p</font><font color="#007700">);<br />&nbsp;&nbsp;</font><font color="#0000BB">$i</font><font color="#007700">-&gt;</font><font color="#0000BB">setName</font><font color="#007700">(</font><font color="#DD0000">'frames'</font><font color="#007700">);<br />&nbsp;&nbsp;</font><font color="#0000BB">$m</font><font color="#007700">-&gt;</font><font color="#0000BB">nextFrame</font><font color="#007700">();<br /><br />&nbsp;&nbsp;</font><font color="#0000BB">$m</font><font color="#007700">-&gt;</font><font color="#0000BB">add</font><font color="#007700">(new </font><font color="#0000BB">SWFAction</font><font color="#007700">(</font><font color="#DD0000">"<br /><br />lastx = mousex;<br />lasty = mousey;<br />mousex = /mouse.x;<br />mousey = /mouse.y;<br /><br />++num;<br /><br />if (num == 11)<br />&nbsp;&nbsp;num = 1;<br /><br />removeClip('char' &amp; num);<br />duplicateClip(/frames, 'char' &amp; num, num);<br /><br />&nbsp;&nbsp;"</font><font color="#007700">));<br /><br />&nbsp;&nbsp;</font><font color="#0000BB">$m</font><font color="#007700">-&gt;</font><font color="#0000BB">nextFrame</font><font color="#007700">();<br />&nbsp;&nbsp;</font><font color="#0000BB">$m</font><font color="#007700">-&gt;</font><font color="#0000BB">add</font><font color="#007700">(new </font><font color="#0000BB">SWFAction</font><font color="#007700">(</font><font color="#DD0000">"prevFrame(); play();"</font><font color="#007700">));<br /><br />&nbsp;&nbsp;</font><font color="#0000BB">header</font><font color="#007700">(</font><font color="#DD0000">'Content-type: application/x-shockwave-flash'</font><font color="#007700">);<br />&nbsp;&nbsp;</font><font color="#0000BB">$m</font><font color="#007700">-&gt;</font><font color="#0000BB">output</font><font color="#007700">();<br /></font><font color="#0000BB">?&gt;</font>
</font>
</code></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
>
  </P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="ref.ming.html"
ACCESSKEY="P"
>Anterior</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Principal</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="function.swfaction.construct.html"
ACCESSKEY="N"
>Próxima</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Ming functions for Flash</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="ref.ming.html"
ACCESSKEY="U"
>Acima</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>SWFAction-&#62;__construct()</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>