swftools-common
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Swftools-common] positioning of objects, swfc, linux


From: peter kostov
Subject: Re: [Swftools-common] positioning of objects, swfc, linux
Date: Wed, 20 Aug 2008 20:17:09 +0300
User-agent: Thunderbird 2.0.0.14 (X11/20080621)

Huub Schaeks wrote:
Hello Peter

I have tested your script and found that x<0 indeed did not get a shift to the 
left, regardless of .pin settings by the way. But after building swfc again from 
CVS that works fine, so I guess what ever it was, it's fixed now.

The position at 0,0 seemed fine to me. If you look at the .swf in a browser it 
will not show the image in the top let corner, but that is due to the alignment 
and scaling of the flash player in the browser window.

Regards
Huub

Date: Tue, 19 Aug 2008 11:02:26 +0300
From: address@hidden
To: address@hidden
Subject: [Swftools-common] positioning of objects, swfc, linux

Hi Matthias,

I have a question about positioning an objects. I use swfc from
swftools-2008-06-08-1156 and have the following script:

.flash bbox=290x250 version=7 fps=15 name="weekly_editorial.swf"
compress background=#ffffff

.jpeg pic "decoracii.jpg"


         .sprite layer1
                 .frame 1
                 .put pic x=0 y=0
         .end


.frame 1
.put layer1

.frame 2

.end

As you can see I am .put-ing a picture on x=0 y=0, but in the resulting
file the picture seems to be almost randomly placed. It is not on 0,0.
How can I set the exact position when I place objects? Maybe there are some principles for positioning that I do not understand? As I know every object inherits the coordinate system of its parent, right? So the parent of sprite layer1 should be the movie itself, the 'stage', or not?
And the sprite should begin at 0,0 - the upper left corner.
One more thing If I try to give the picture an offset, regardless of the sign before the number the picture is always shifted to the right, eg. x=100 and x=-100 give me the absolutely same effect. That is strange for me. If I use pin=center then I can shift the picture to the left with x=-100, but the first issue remains. What are the other options for pin in the latest swftools (swftools-2008-07-27-1136)?

I am attaching a sample swf file and the original picture.

Any help will be very much appreciated,
Peter

--

-------
Boryana & Peter Kostovi,
web design & webdevelopment
home site: http://bgwebdeveloper.com

_________________________________________________________________
Doe de quiz, upload je foto en download gratis jouw topsporter Wink!
http://yourinnerathlete.windowslive.com?locale=nl-nl&ocid=TXT_TAGLM_WLYIA_whichathlete_nl

I am not sure if my answer has reached the list or only Huub, so here is it again:


now I am using the latest swftools and x<0 shifts to the left correctly indeed, but I am still not understanding the logic of placing objects. The position 0,0 should be the upper left corner of the movie, regardless of the position and scaling of the player in the browser (i do not expect it to be the upper left corner of the browser window or the screen :) On the attached screenshot you can see that the picture is not placed on x=0 if put without giving the x parameter or with x=0. On the screenshot the black line is the border of the movie. The picture is cropped tight on the left. The shift is about 86px to the right.

I have searched through the source code of swfc and although I am not a C programmer at least I found all the options that I can pass to .put for instance. Now I will experiment with them and see what happens. :)

Best regards,
Peter

--

-------
Peter Kostov,
web design & webdevelopment, 3D
http://hqtextures.com

JPEG image


reply via email to

[Prev in Thread] Current Thread [Next in Thread]