Set Element Position

Q&A about the latest versions
Post Reply
Aduffy
Posts: 24
Joined: Wed Sep 03, 2008 8:40 pm

I am having a little trouble with the "Set Element Position" Action.

It seems the "Offset X/Y" values are based on the original starting position of the element on the stage and not the top left of the element it is contained in.

In my situation I am building a multi node tour, and have a Site map image on the top right of my skin. Nested in that I have a bunch of "Dot" buttons that load up the node they represent.

Clicking on one also uses "Set Element Position" to place my "Field of View" (FOV) element over that dot.

This Current tour has 18 nodes.

When the tour starts, our first node is positioned at 50/50 (x/y based on top left of parrent)
Lets say the second node dot is at 75/75
when the user clicks on the 75/75 dot, I have to use "Set Element Position" with a value of 25/25.

I get that the value is an "Offset" as it says in the interface, and I can (and have) calculated up all the appropriate values based on the original starting point...

The problem comes when the client changes there mind!!! "Lets start on this other node instead"

Crap.. Now I have to recalculate and reset every one of the 18 nodes in my tour.. and you can bet the client will change his mind yet again...

It seems to me that "Set Element Position" should not be an offset of the elements starting point, but an absolute value based on the parents top left. In this way I could change the original starting point node at any time I liked.


My original workaround idea was to position my FOV element that I am trying to move at 0/0, and using onload to move it to my starting nodes position! Sounds like it would work, and it does... to a point... When I click in a different node "dot" the FOV element moves to where I wanted it to... But unfortunately the "Onload" action fires after the new node has loaded and then moves my FOV back to my tours starting point...

Sadness..

Any how can we please have a "Set Element Absolute Position"

Am I missing something.. Is there an existing way to get around this problem??
User avatar
thomas
Chief Gnome
Posts: 2617
Joined: Fri Sep 01, 2006 3:56 pm
Location: Vienna, Austria
Contact:

I can give you two hints that may help:
  • You can use an element name instead of a position so for example you can use "Set Postion" - target = "other" - position "$self" to move the element "other" to the elements position
  • Instead of "load" you can use "init" to position the element. "init" gets only called one time, not for each pano
MfG, Thomas
Post Reply