|
From: Catherine L. <cat...@ya...> - 2003-10-01 19:54:19
|
Dear All,
Hmmm.... I had a thorough test with different senarios in my php, found that if I have swf files with many lines, polygons into shapes without any SWFText elem, it can go beyond than 64K However, once I have SWFText elem in php, I can only see the SWF file being display [$movie->output()] if the file size is <=64K, Meanwhile, I get a BLANK page if it goes beyond >64K [$movie->save("xxx.swf")].
Something is very weird, just now, I accidentally hit with this algorithm, and I got to see the file being display (included SWFTEXT elem with 80k file size), under condition if I save the file at least TWICE and then Display through IE:
...
$movie->save('c:\inetpub\wwwroot\webemap\swfoutput\Sample1.swf');
$movie->save('c:\inetpub\wwwroot\webemap\swfoutput\Sample1.swf');
header('Content-type: application/x-shockwave-flash');
$movie->output();
it won't work if I have it save to a file once, nor directly display thru IE, it must save to a file at least TWICE.... weird eh?
Is it possible the PROBLEM cause by following algo :
<?php
$movie = new SWFMovie();
$movie->setRate(12.000000);
$movie->setDimension(2880,1720);
$movie->setFrames(1);
$movie->setBackground(219,227,173);
$Sprite = new SWFSprite();
$s = new SWFShape();
$s->setLine( 14,251, 252, 253);
$s->movePenTo(-1154.3, -615.26);
$s->drawLineTo(-1064.33, -636.53);
$s->drawLineTo(-868.78, -660.37);
$s->drawLineTo(-658.92, -686.61);
$s->drawLineTo(-570.69, -708.07);
$s->drawLineTo(-267.83, -889.31);
$i = $Sprite->add($s);
$s = new SWFShape();
... /*repeat adding shape with lines into same sprite *?
$Sprite->nextFrame();
$clip = $movie->add($Sprite);
$clip->moveTo(1440,860);
$clip->setName('Road');
....
...
$f= new SWFFont("Arial.fdb");
$Sprite = new SWFSprite();
/*Repeat with this block with many text at different location and rotation into Sprite name TEXT*/$t = new SWFText();
$t->setFont($f);
$t->setHeight(20);
$t->setColor(0,0,0);
$i = $Sprite->add($t);
$str_text = "St. xxx";
$t->addString("$str_text");
$i->move(-737.32, 389.42);
$i->rotate(0);
$Sprite->nextFrame();
$clip = $movie->add($Sprite);
$clip->moveTo(1440,860);
$clip->setName('TEXT');
....
$movie->nextFrame(); /* (end of frame 0) */
$movie->save('c:\inetpub\wwwroot\webemap\swfoutput\Sample1.swf');
$movie->save('c:\inetpub\wwwroot\webemap\swfoutput\Sample1.swf');
header('Content-type: application/x-shockwave-flash');
$movie->output();
Finally, I don't think it cause by the ActionScript, as I didn't include any on my PHP, just play with Shapes, lines...and Text only.
Any Idea? Many Thanks.
Regards,
Catherine
Wolfgang Hamann <ham...@t-...> wrote:
Hi Catherine,
I am generating swf files much bigger than that (e.g. containing mp3 sounds)
What is is that exactly stops at a 64 k boundary - can you explain your way of generating
map more in detail?
The swf format itself restricts the size of some elements to 64 k, such as an individual
actionscript statement
Wolfgang
---------------------------------
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search |