Welcome to GuardiansWorlds.com
 
 

  User Info Box

Anonymous
3.17.164.220
Nickname:

Password:

Security Code:
Security Code
Type Security Code:


User Stats:
Today: 0
Yesterday: 0
This Month: 0
This Year: 0
Total Users: 117
New Members:
Online Now:
  Guests: 38
3.17.xxx.xxx
66.249.xx.xxx
66.249.xx.xxx
162.158.xxx.xxx
162.158.xxx.xxx

  Total Online: 38
Server Time:
Apr 22, 2025
01:56 pm UTC
 

  Modules/Site Links

· Home
· Bible-MM
· Birds-MM
· Car_Show-MM
· Christmas-MM
· Content
· Domaining-MM
· Downloads
· Drugs-MM
· Event Calendar
· FAQ
· Feedback
· Fish-MM
· Gambling_Guide-MM
· Guardians Worlds Chat
· HTML_Manual
· Internet_Traffic_Report
· IP_Tracking Tool
· Journal
· Members List
· Movies-MM
· Music_Sound-MM
· NukeSentinel
· PHP-Nuke_Tools
· PHP_Manual-MM
· PING Tool
· Private Messages
· Recommend Us
· Reptiles-MM
· Search
· SEO_Tools
· Statistics
· Stories Archive
· Submit News
· Surveys
· Top 30
· Topics
· Visitor Mapping System
· Web Links
· Webcams
· Web_Development-MM
· YahooNews
· YahooPool
· Your Account
 

  Categories Menu

· All Categories
· Camaro and Firebird
· FTP Server
· New Camaro
· News
· Online Gaming
 

  Survey

Which is your favorite generation Camaro or Firebird?

1st Gen. 67-69 Camaro
2nd Gen. 70-81 Camaro
3rd Gen. 82-92 Camaro
4th Gen. A 93-97 Camaro
4th Gen. B 98-2002 Camaro
1st Gen. 67-69 Firebird
2nd Gen. 70-81 Firebird
3rd Gen. 82-92 Firebird
4th Gen. A 93-97 Firebird
4th Gen. B 98-2002 Firebird



Results
Polls

Votes: 67
Comments: 0
 

  Cluster Maps

Locations of visitors to this page
 

  Languages

Select Interface Language:

 

 
  SWFDisplayItem->rotateTo

SWFDisplayItem->rotateTo

(no version information, might be only in CVS)

SWFDisplayItem->rotateTo -- Rotates the object in global coordinates

Description

void swfdisplayitem->rotateto ( float degrees )

Warning

This function is EXPERIMENTAL. 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.

swfdisplayitem->rotateto() set the current object rotation to degrees degrees in global coordinates.

The object may be a swfshape(), a swfbutton(), a swftext() or a swfsprite() object. It must have been added using the swfmovie->add().

This example bring three rotating string from the background to the foreground. Pretty nice.

Example 1. swfdisplayitem->rotateto() example

<?php
  $thetext
=  "ming!";

  
$f = new SWFFont("Bauhaus 93.fdb");

  
$m = new SWFMovie();
  
$m->setRate(24.0);
  
$m->setDimension(2400, 1600);
  
$m->setBackground(0xff, 0xff, 0xff);

  
// functions with huge numbers of arbitrary
  // arguments are always a good idea!  Really!

  
function text($r, $g, $b, $a, $rot, $x, $y, $scale, $string)
  {
    global
$f, $m;

    
$t = new SWFText();
    
$t->setFont($f);
    
$t->setColor($r, $g, $b, $a);
    
$t->setHeight(960);
    
$t->moveTo(-($f->getWidth($string))/2, $f->getAscent()/2);
    
$t->addString($string);

    
// we can add properties just like a normal PHP var,
    // as long as the names aren't already used.
    // e.g., we can't set $i->scale, because that's a function

    
$i = $m->add($t);
    
$i->x = $x;
    
$i->y = $y;
    
$i->rot = $rot;
    
$i->s = $scale;
    
$i->rotateTo($rot);
    
$i->scale($scale, $scale);

    
// but the changes are local to the function, so we have to
    // return the changed object.  kinda weird..

    
return $i;
}

  function
step($i)
  {
    
$oldrot = $i->rot;
    
$i->rot = 19*$i->rot/20;
    
$i->x = (19*$i->x + 1200)/20;
    
$i->y = (19*$i->y + 800)/20;
    
$i->s = (19*$i->s + 1.0)/20;

    
$i->rotateTo($i->rot);
    
$i->scaleTo($i->s, $i->s);
    
$i->moveTo($i->x, $i->y);

    return
$i;
  }

  
// see?  it sure paid off in legibility:

  
$i1 = text(0xff, 0x33, 0x33, 0xff, 900, 1200, 800, 0.03, $thetext);
  
$i2 = text(0x00, 0x33, 0xff, 0x7f, -560, 1200, 800, 0.04, $thetext);
  
$i3 = text(0xff, 0xff, 0xff, 0x9f, 180, 1200, 800, 0.001, $thetext);

  for (
$i=1; $i<=100; ++$i) {
    
$i1 = step($i1);
    
$i2 = step($i2);
    
$i3 = step($i3);

    
$m->nextFrame();
  }

  
header('Content-type: application/x-shockwave-flash');
  
$m->output();
?>

See also swfdisplayitem->rotate().

 
 


 
  Disipal DesignsAnti-Spam
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © 2002 by me.
You can syndicate our news using the file backend.php or ultramode.txt This site contains info,links,chat,message board/forum for online games,gaming,other features.Check out my servers and stats for Killing Floor, Quake3 Rocket Arenas & Deathmatch,Trade Wars 2002 & FTP server.Camaro/Firebirds, car info.