Forum Moderators: open
I'm new to flash so excuse me if my terminology is wrong!
I have a flash movie that acts as a slide-show to show different views of products on a web page. It gets its image data from an xml file (path, dimensions etc).
On each product page there will be one movie that displays a set of images, all the images for a particular product page will have the same dimensions. However different product pages will have images with different dimensions.
What I have now is a working "static" version where the stage is = 200x200 with a movie clip in a mask with dimensions 200x150. The remaining 50px of the stage area has navigation buttons "next" and "previous".
This works fine if the image is 200x150px but if the image is 200x200px then I want the stage to show the image plus 50px for the navigation buttons. ie I want to make the stage have a height of 250px and the movie mask a height of 200px.
I am setting the flash object html dimensions at runtile using JS but the actual flash movie always ends-up at the fixed dimension.
I thought first of all I would set the size of the Stage element but it turns out that is a read only value. Setting the size of my mask and movie-clip don't seem to have any effect.
How can I dynamically alter the flash at runtime to expand and contract according to the images dimensions?
General pointers?
Thanks
For a flash movie filling 100% its html container, just enter the actionscript 'Stage' variable against your flash document's original size to calculate the correct position of your button (eg: 'lower left' would be (button._x =_root._width - Stage._width)/2 ; button._y = (_root.height - _button._height) + ((Stage.height -_root._height )/2) ) and use a onEnterFrame() function to keep it there if you have a liquid layout.
Good luck!
[edited by: Josefu at 7:41 am (utc) on April 19, 2007]