Fwd: Re: help please! - Rotation

Anews <[email protected]> Thu, 6 Nov 2003 15:57:37 +0100
Newsgroups gmane.comp.web.ming.general
Message-ID <20031106145729.BYZO8542.kudu@there>
Hi!

Sorry for late post, but I had some problems with my ISP's SMTP server...

Here it goes again:

----------  Forwarded Message  ----------

Subject: Re: [ming-fun] help please! - Rotation
Date: Wed, 5 Nov 2003 10:47:07 +0100
From: Anews <[email protected]>
To: "** sLiMkRaZy **" <[email protected]>, [email protected]

Hi!

The following example works:

<?php
  ming_useswfversion(5);
  $m=new SWFMovie();
  $m->setDimension(533,555);
  $m->setBackground(0x00, 0xff, 0xff);
  $m->setRate(50);

  $mRotator=new SWFSprite();

  // just some text:
  $t = new SWFText();
  $font="/var/www/sanje/anim/ArialCE.fdb";
  if (!is_readable($font))
    die("Font not found: $font");
  $t->setFont(new SWFFont($font));
  $t->setHeight(24);
  $t->setColor(0x00, 0x00, 0x00);
  $t->moveTo(0,150);
  $t->addString("JUST SOME TEXT TO ROTATE");
  $mRotator->add($t);

  $mRotator->nextFrame();
  $imRotator=$m->add($mRotator);
  $imRotator->setName("rotator");
  $imRotator->rotate(45);

  // use ActionScript to rotate the object:
  $m->nextFrame();

  header("Cache-Control: private");
  header("Cache-Control: max-age=1");
  header('Content-type: application/x-shockwave-flash');
  header('Content-Disposition: attachment; filename="rotator.swf"');
  $m->output();
?>

Enjoy!

Anze

-------------------------------------------------------