By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,737 Members | 1,836 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,737 IT Pros & Developers. It's quick & easy.

Why this code is not working on PHP

P: 1
Always getting:
Fatal error: SWFAction::__construct() [<a href='function.SWFAction---construct'>function.SWFAction---construct</a>]: / ^ Line 1: Reason: 'syntax error' in C:\www\test\test1.php on line 31

<?php
$s = new SWFShape();
$f = $s->addFill(0xff, 0, 0);
$s->setRightFill($f);

$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);
$i->setDepth(1);
$p->nextFrame();

for ($n=0; $n<15; ++$n) {
$i->rotate(-15);
$p->nextFrame();
}

$m = new SWFMovie();
$m->setBackground(0xff, 0xff, 0xff);
$m->setDimension(6000, 4000);

$i = $m->add($p);
$i->setDepth(1);
$i->moveTo(3000,2000);
$i->setName("box");

$m->add(new SWFAction("/box.x += 103;"));
$m->nextFrame();
$m->add(new SWFAction("gotoFrame(0); play();"));
$m->nextFrame();

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


Any ideas?

PHP Version: 5.1.6
Ming: 0.3beta1
Feb 7 '07 #1
Share this Question
Share on Google+
1 Reply


Motoma
Expert 2.5K+
P: 3,235
Always getting:
Fatal error: SWFAction::__construct() [<a href='function.SWFAction---construct'>function.SWFAction---construct</a>]: / ^ Line 1: Reason: 'syntax error' in C:\www\test\test1.php on line 31

<?php
$s = new SWFShape();
$f = $s->addFill(0xff, 0, 0);
$s->setRightFill($f);

$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);
$i->setDepth(1);
$p->nextFrame();

for ($n=0; $n<15; ++$n) {
$i->rotate(-15);
$p->nextFrame();
}

$m = new SWFMovie();
$m->setBackground(0xff, 0xff, 0xff);
$m->setDimension(6000, 4000);

$i = $m->add($p);
$i->setDepth(1);
$i->moveTo(3000,2000);
$i->setName("box");

$m->add(new SWFAction("/box.x += 103;"));
$m->nextFrame();
$m->add(new SWFAction("gotoFrame(0); play();"));
$m->nextFrame();

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


Any ideas?

PHP Version: 5.1.6
Ming: 0.3beta1
Welcome to The Scripts.
Try removing the / from in front of box.x. Unless you want it there. Then I don't know.
Feb 7 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.