I want to display a rotating object in flex. I have done so by photographing a model in 20 positions on a turntable.
I put all the images in a slideshow.
I make 20 mouseover buttons side by side to 'go to slide' numbers 1 - 20.
This works fine - you can see it if you wish on
www.macsnapper.com select flash tests.
but
to avoid the tedium of making 20 buttons the correct size and position each time I make a new presentation (since the objects will have different sizes or proportions) I thought I could make it more automatic by using script to make active 'zones' distributed across the width of the slideshow object, using the mouse x position to select the appropriate slide to show...
The following script works when I am developing/testing but fails when I publish - can anyone please tell me why???
------- the script-------
var slideshowWidth = Slideshow.GetWidth()
var mousePos = GetMousePosition()
var mouseX = mousePos.x
var zoneSize = slideshowWidth/20 \\(if there are 20 slide images)
var slideNum = mouseX/zoneSize \\ relates the x-pos to the slide no.
var slideNum = Math.round(slideNum)
Slideshow.GotoSlide(slideNum)
-------- end script --------------