Re: swftophp
Rcom Developers <[email protected]> Fri, 3 Oct 2003 21:39:59 -0700
| Newsgroups | gmane.comp.web.ming.general |
|---|---|
| Message-ID | <[email protected]> |
Peter et al --
Thanks for the feedback. Maybe if I describe what I'm doing a little
more, you'll be able to point out what I'm doing wrong, and possibly
steer me in the right direction.
1. I have a Macromedia Director based GUI that allows the user to order
various prebuilt swfs (built in Macromedia Flash) into a sequence, add
images to the animations, and add an audio track. I then pass the
user's edit list on to a PHP script on a remote server that combines
the selected swfs, images and audio.
2. My script uses the swftophp command line utility to convert the
pre-made template animations into a single php script which I then
parse in order to replace various objects with other objects.
3. I output a single swf to the file system.
I do use Ming_setScale() in my script, but the problem I am having is
with the images. The images appear much smaller than the rest of the
objects. I have sort of created a hack to make everything show up
properly using actionscript to set the _xscale and _yscale to 20 times
what it currently is, and it works fine. I'm sort of over getting it to
work right because I have a deadline on Monday and I have plenty of
other bobba to do before then.
The last thing that I need to figure out is that the objects in the
resulting animation seems to shift when they either begin, or end
animating. There is a noticeable difference between the original
animation and the combined animation. You can see this in an example at
http://imediapro.rcomnetworks.com/toolkit/swfinput.php The page will
run the script to combine the swfs. the page should give you three
links, one for the swf file, one for the resulting php code, and one
for the source to the whole system. Please take a look and let me know
if anyone can help me figure this out.
You guys rock! Thanks!
Brandon
AIM: jesterworld || jesterworld2003
On Friday, October 3, 2003, at 05:09 PM, peter wrote:
> Short anwser:
> Before
>
> printf("\t$m = new SWFMovie();\n");
>
> in swftophp.c add
>
> printf("\tMing_setScale(1);\n");
>
>
> Long anwser:
> Default scale was changed sometime from 1 to 20 in ming, but the
> swftophp
> wasn't updated in this point. Look in swftoperl.c, where this and the
> setVersion is fixed.
>
> No, there is currently no option to alter the scale in swftophp or any
> other
> tools in the util/ directory of ming-cvs.
>
> If you want to work in pixels instead of twips, you can switch the
> scale
> everywhere you need to do this in the outputscript when
> adding/changing code
> to the outputscript.
>
> The possibility to set the Mingscale for swftophp could also add an
> "accuracyerror" to the values. Thats because mingfunction currently
> only
> accept integers as parameters and ignore numbers after comma.
>
> Example: Asume a shape is defined in a swf as
> drawLine(1234,0); (in twips = Mingscale=1)
> So this is a line 1234/20= 61.7 pixels long. (if you wonder,
> commavalues have
> effect in antialiasing and naturally add accuracy for zoomed objects)
> All is ok.
>
> If you now set the Mingscale to 20, then
> swftophp would (if somebody implement this option) write:
> drawLine(61.7,0);
> Until this step ok.
>
> But ming would write in the new generated swf:
> drawLine(1220,0); (61*20)
> and not as you maybe asume
> drawLine(1234,0); (61.7*20)
>
> So before somebody add this feature to swftophp and the other tools,
> the
> minglib should be modified/fixed to support commavalues and round the
> values
> internal to twips.
>
> peterdd
>