Tween/resize texfield problem

  • Hi,

    In my recent project I need 2 similar plugins to resize/tween the same way. The first one is floorplan, which is made of 2 layers - bakckground image that makes a frame, and the floorplan itself. This combination works - tweens/resizes exactly as I need. Both elements - floorplan and its frame tween/resize corretly - floorplan is perfectly aligned inside the frame all the time.

    Then I have a combination of a background image used as a frame, and a scrollable texfield plugin. And I am not able to set it to work as I need. When the pano loads, then il is lined up OK. When I click on the textfield, both elements resize/tween but the alignment of texfield is offset - it is not inside the frame. And I need it to be aligned the same way as floorplan is.

    Here you can check it yourself:

    http://www.3dpanoramy.sk/pokus/vstupna_hala.html

    The code of the 2 problematic elements is here:

    I have spent a lot of time to find out why it does not work as I need, but I am probably blind and I can't see it.

    Any tips, what's wrong?

    Thanks, Juraj

  • Yes, I have tried it with the original "no scrollable" textfield plugin - no difference. You can see yourself - I have replaced it in my example - see link in my first post.
    Now I somehow set it to SWITCH the size of plugin and the background frame to correct sizes, but it still doesn't TWEEN from one size to another. Check the link.

    Juraj

  • So I think my problem is, that i don't know how to use GET function correctly...

    Code
    onclick="switch(destwidth, 577,189); tween(width, $destwidth); switch(destx, 27,15); tween(x, $destx); 
    				 	
    switch(plugin[info_pozadie].width, 611, 200); tween(plugin[info_pozadie].width, get(plugin[info_pozadie].width), 1.0);  "

    The first line of the code works OK.

    The second line is problematic. I understand it like this:

    Code
    switch(plugin[info_pozadie].width, 611, 200);

    switches (changes) the width of plugin called "info_pozadie" from one value (611 px) to another (200 px) and back every time I click on the hotspot. Then

    Code
    tween(plugin[info_pozadie].width, get(plugin[info_pozadie].width), 1.0);

    should tween the width of the same plugin "info_pozadie" to a value, that is result of the GET function, the tween should take 1.0 second. The result of the that GET function should be 611 after the first click on the plugin, then it should be 200 after next click, then 611 again and so on.
    It looks simple, but it doesn't work. And I don't know why...

    It simply switches the size of the plugin (the frame of textfield content), but it doesn't tween it.
    http://www.3dpanoramy.sk/pokus/vstupna_hala.html

    Any tips?

    Thanks

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!