Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > media > main > by-pkgid > 0afeee9cca140e167a996902b9a677c5 > files > 2676

php-manual-en-4.3.0-2mdk.noarch.rpm

<HTML
><HEAD
><TITLE
>SWFMorph</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="PHP Manual"
HREF="index.html"><LINK
REL="UP"
TITLE="Ming functions for Flash"
HREF="ref.ming.html"><LINK
REL="PREVIOUS"
TITLE="SWFMorph->getshape2"
HREF="function.swfmorph.getshape2.html"><LINK
REL="NEXT"
TITLE="SWFMovie->add"
HREF="function.swfmovie.add.html"><META
HTTP-EQUIV="Content-type"
CONTENT="text/html; charset=ISO-8859-1"></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"
>PHP Manual</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="function.swfmorph.getshape2.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="function.swfmovie.add.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="function.swfmorph"
></A
>SWFMorph</H1
><DIV
CLASS="refnamediv"
><A
NAME="AEN53984"
></A
><P
>    (PHP 4 &#62;= 4.0.5)</P
>SWFMorph&nbsp;--&nbsp;Creates a new SWFMorph object.</DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN53987"
></A
><H2
>Description</H2
>new <B
CLASS="methodname"
>swfmorph</B
> ( void)<BR
></BR
><DIV
CLASS="warning"
><P
></P
><TABLE
CLASS="warning"
BORDER="1"
WIDTH="100%"
><TR
><TD
ALIGN="CENTER"
><B
>Warning</B
></TD
></TR
><TR
><TD
ALIGN="LEFT"
><P
>This function is
<SPAN
CLASS="emphasis"
><I
CLASS="emphasis"
>EXPERIMENTAL</I
></SPAN
>. The behaviour of this function, the
name of this function, and anything else documented about this
function may change without notice in a future release of PHP. 
Use this function at your own risk.</P
></TD
></TR
></TABLE
></DIV
><P
>&#13;     <B
CLASS="function"
>swfmorph()</B
> creates a new SWFMorph object. 
    </P
><P
>&#13;     Also called a "shape tween". This thing lets you make those tacky 
     twisting things that make your computer choke. Oh, joy! 
    </P
><P
>&#13;     The methods here are sort of weird. It would make more sense to just 
     have newSWFMorph(shape1, shape2);, but as things are now, shape2 needs
     to know that it's the second part of a morph. (This, because it starts
     writing its output as soon as it gets drawing commands- if it kept its
     own description of its shapes and wrote on completion this and some 
     other things would be much easier.) 
    </P
><P
>&#13;     SWFMorph has the following methods : <B
CLASS="function"
>swfmorph-&#62;getshape1()</B
>
     and <B
CLASS="function"
>swfmorph-&#62;getshape1()</B
>.
    </P
><P
>&#13;     This simple example will morph a big red square into a smaller
     blue black-bordered square.
     <TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
CLASS="EXAMPLE"
><TR
><TD
><DIV
CLASS="example"
><A
NAME="AEN54004"
></A
><P
><B
>Example 1. <B
CLASS="function"
>swfmorph()</B
> example</B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><PRE
CLASS="php"
>&#60;?php
  $p = new SWFMorph();

  $s = $p-&#62;getShape1();
  $s-&#62;setLine(0,0,0,0);

  /* Note that this is backwards from normal shapes (left instead of right).
     I have no idea why, but this seems to work.. */

  $s-&#62;setLeftFill($s-&#62;addFill(0xff, 0, 0));
  $s-&#62;movePenTo(-1000,-1000);
  $s-&#62;drawLine(2000,0);
  $s-&#62;drawLine(0,2000);
  $s-&#62;drawLine(-2000,0);
  $s-&#62;drawLine(0,-2000);

  $s = $p-&#62;getShape2();
  $s-&#62;setLine(60,0,0,0);
  $s-&#62;setLeftFill($s-&#62;addFill(0, 0, 0xff));
  $s-&#62;movePenTo(0,-1000);
  $s-&#62;drawLine(1000,1000);
  $s-&#62;drawLine(-1000,1000);
  $s-&#62;drawLine(-1000,-1000);
  $s-&#62;drawLine(1000,-1000);

  $m = new SWFMovie();
  $m-&#62;setDimension(3000,2000);
  $m-&#62;setBackground(0xff, 0xff, 0xff);

  $i = $m-&#62;add($p);
  $i-&#62;moveTo(1500,1000);

  for($r=0.0; $r&#60;=1.0; $r+=0.1)
  {
    $i-&#62;setRatio($r);
    $m-&#62;nextFrame();
  }

  header('Content-type: application/x-shockwave-flash');
  $m-&#62;output();
?&#62;</PRE
></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="function.swfmorph.getshape2.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="function.swfmovie.add.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>SWFMorph-&#62;getshape2</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="ref.ming.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>SWFMovie-&#62;add</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>