In OpenExhibits, an HTML Exhibit component have a local coordinates system?
For example, in a 180° degree totated HTML page, a dragged object moves in the opposite direction.
The HTML element is simply a CML wrapper for Flash's HTMLLoader class and all elements extend Sprite and inherit the same coordinate system. Yes they have their own local coordinate space so if you prompt for object.x, you will get the rotated x value and not it's stage position. You can access both local and stage coordinates through the event by the stageX or localX accessors.
- if I put a web page into an OpenExhibits window
- then by touches I move the window in a new position in the screen
- then I touch an HTML element into my web page, for example a div like
div id="myElement" ontouchmove="console.log('X:' + event.screenX + ' Y:' + event.screenY)"
the traced values are referred to the top-left origin of the OpenExhibits window or to the stage area?
Thank you for spending your time answering my questions!
I have not experimented with positioning the html content to determine if it is relative to the object or the stage. My first guess would be that it is scoped to the object. It seems you have the steps required for a simple test case so I would suggest pulling down our examples repository and executing your test case in the existing HTMLViewer example.
This topic is now closed. New replies are no longer allowed.
This topic is now archived. It is frozen and cannot be changed in any way.