 Thread Author
# 3

08-06-2010, 09:12 AM
|
| | CrackBerry User Device(s): 9000 (Bold) Carrier: T-Mobile | | Join Date: Jun 2008 Posts: 12 Likes Received: 0
Thanked 0 Times in 0 Posts
| |
Hello,
What I found is just to add a translate transformation for each layer you want to more (didn't look into transforming an object yet).
In composer, start with creating a layer for each button, name them so you can easily manage them as you'll have to work in the wordpad/notepad after.
Place the buttons where you want them to be at the start and then export it into a SVG file.
Then open the file with a text editor and (as I'm not good doing math without one) have a calculator with you.
I've put it at the end of the file just above the </svg> but I'm sure it's not compulsory.
<animateTransform
xlink:href="#LButton_10" <! Specifies which layer to apply the transformation to -->
id="_anim_l30" <! ID for the transformation, each must have a different number -->
attributeName="transform"
type="translate" <! What kind of transformation, you can rotate, scale, skewX, skewY and translate -->
to="146,56" <! how much on each axis it will have to translate the layer -->
dur="0.5s" <! duration of the transformation -->
fill="freeze"
begin="TButton_2.focusin" <! when to do the transformation--> />
Now this one says that when the button2 has the focus, the layre LButton_10 will translate.
Beware, the "to=" doesn't say where it is going, it says how much to translate the layer on X & Y.
So it all starts from the start position you defined in Composer.
Now you need a line for each button & each "focusing".
That mean that if you have 6 buttons, you'll need 5 * 6 lines = 30. (not 36 because when it start and button 1 has the focus, the buttons stays where they are, it's only when you're focusing on one of the other 5 that you need the buttons to move) so you'll need to say where each button needs to go depending on which one has the focus.
You'll may need a calculator because each time, the translation is based on the start position, not the last as I thought at first.
If you need anything more about this or if I didn't manage to make myself very clear, don't hesitate to let me know
__________________
"Tell me and I'll forget, Show me and I'll remember, Involve me and I'll understand" [Confucious]
Last edited by Jeffrey_0404; 08-06-2010 at 09:17 AM.
|