mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-28 14:58:55 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@146748 c90b9560-bf6c-de11-be94-00142212c4b1
93 lines
2.4 KiB
XML
93 lines
2.4 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.3 $ -->
|
|
<!-- splitted from ./en/functions/ming.xml, last change in rev 1.24 -->
|
|
<refentry id="function.swfsprite">
|
|
<refnamediv>
|
|
<refname>SWFSprite</refname>
|
|
<refpurpose>Creates a movie clip (a sprite)</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<methodsynopsis>
|
|
<type>new</type><methodname>swfsprite</methodname>
|
|
<void/>
|
|
</methodsynopsis>
|
|
&warn.experimental.func;
|
|
<para>
|
|
<function>swfsprite</function> are also known as a "movie clip",
|
|
this allows one to create objects which are animated in their own
|
|
timelines. Hence, the sprite has most of the same methods as the movie.
|
|
</para>
|
|
<simpara>
|
|
<function>swfsprite</function> has the following methods :
|
|
<function>swfsprite->add</function>,
|
|
<function>swfsprite->remove</function>, <function>swfsprite->nextframe</function>
|
|
and <function>swfsprite->setframes</function>.
|
|
</simpara>
|
|
<para>
|
|
This simple example will spin gracefully a big red square.
|
|
<example>
|
|
<title><function>swfsprite</function> example</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$s = new SWFShape();
|
|
$s->setRightFill($s->addFill(0xff, 0, 0));
|
|
$s->movePenTo(-500, -500);
|
|
$s->drawLineTo(500, -500);
|
|
$s->drawLineTo(500, 500);
|
|
$s->drawLineTo(-500, 500);
|
|
$s->drawLineTo(-500, -500);
|
|
|
|
$p = new SWFSprite();
|
|
$i = $p->add($s);
|
|
$p->nextFrame();
|
|
$i->rotate(15);
|
|
$p->nextFrame();
|
|
$i->rotate(15);
|
|
$p->nextFrame();
|
|
$i->rotate(15);
|
|
$p->nextFrame();
|
|
$i->rotate(15);
|
|
$p->nextFrame();
|
|
$i->rotate(15);
|
|
$p->nextFrame();
|
|
|
|
$m = new SWFMovie();
|
|
$i = $m->add($p);
|
|
$i->moveTo(1500, 1000);
|
|
$i->setName("blah");
|
|
|
|
$m->setBackground(0xff, 0xff, 0xff);
|
|
$m->setDimension(3000, 2000);
|
|
|
|
header('Content-type: application/x-shockwave-flash');
|
|
$m->output();
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"../../../../manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|