SWFBitmap->getHeight

(no version information, might be only in CVS)

SWFBitmap->getHeight -- Returns the bitmap's height

Description

int swfbitmap->getheight ( void )

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.

swfbitmap->getheight() returns the bitmap's height in pixels.

See also swfbitmap->getwidth().

font>addFill($g, SWFFILL_RADIAL_GRADIENT);
  
$f->scaleTo(0.03);
  
$s->setRightFill($f);
  
$s->movePenTo(-600, -600);
  
$s->drawLine(1200, 0);
  
$s->drawLine(0, 1200);
  
$s->drawLine(-1200, 0);
  
$s->drawLine(0, -1200);

  
// need to make this a sprite so we can multColor it
  
$p = new SWFSprite();
  
$p->add($s);
  
$p->nextFrame();

  
// put the shape in here, each frame a different color
  
$q = new SWFSprite();
  
$q->add(new SWFAction("gotoFrame(random(7)+1); stop();"));
  
$i = $q->add($p);

  
$i->multColor(1.0, 1.0, 1.0);
  
$q->nextFrame();
  
$i->multColor(1.0, 0.5, 0.5);
  
$q->nextFrame();
  
$i->multColor(1.0, 0.75, 0.5);
  
$q->nextFrame();
  
$i->multColor(1.0, 1.0, 0.5);
  
$q->nextFrame();
  
$i->multColor(0.5, 1.0, 0.5);
  
$q->nextFrame();
  
$i->multColor(0.5, 0.5, 1.0);
  
$q->nextFrame();
  
$i->multColor(1.0, 0.5, 1.0);
  
$q->nextFrame();

  
// finally, this one contains the action code
  
$p = new SWFSprite();
  
$i = $p->add($q);
  
$i->setName('frames');
  
$p->add(new SWFAction("

dx = (/:mousex-/:lastx)/3 + random(10)-5;
dy = (/:mousey-/:lasty)/3;
x = /:mousex;
y = /:mousey;
alpha = 100;

  "
));
  
$p->nextFrame();

  
$p->add(new SWFAction("

this.x = x;
this.y = y;
this.alpha = alpha;
x += dx;
y += dy;
dy += 3;
alpha -= 8;

  "
));
  
$p->nextFrame();

  
$p->add(new SWFAction("prevFrame(); play();"));
  
$p->nextFrame();

  
$i = $m->add($p);
  
$i->setName('frames');
  
$m->nextFrame();

  
$m->add(new SWFAction("

lastx = mousex;
lasty = mousey;
mousex = /mouse.x;
mousey = /mouse.y;

++num;

if (num == 11)
  num = 1;

removeClip('char' & num);
duplicateClip(/frames, 'char' & num, num);

  "
));

  
$m->nextFrame();
  
$m->add(new SWFAction("prevFrame(); play();"));

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