Everything about this seems like a bad idea. There's a reason Flash buttons died off after the 90s.
@
Hi xber9
While ClayUUID is generally right in pointing out that Flash/Animate buttons are out ...
I once more looked into this <div><object></object></div> and came up with a possibility "how to resize an animation through <object>" . Well, not through <object> but through the <div> around the <object>.
See the example here: https://testline.memetic-tv.net/cjsobject/
For this to work you have to set the Publish Settings of your button(s):
- Center Stage: Both
- Make responsive: Both
- Scale to fill visible area: Fit in view
For the <div> in which the <object> is nested I've added some CSS to do the sizing. In particular I'm using the css units vw and vh.
- vw - Relative to 1% of the width of the viewport*
- vh - Relative to 1% of the height of the viewport*
* Viewport = the browser window size. If the viewport is 50cm wide, 1vw = 0.5cm.
I use these relative units instead of %, because knowing the size ratio of the button (1:1), one can more easily set the correct proportions of the nesting <div> container. It spares you the empty spaces in a %-controlled <div>. In Web design there might be situations where the %unit is more appropriate (i.e. when using a responsive framework like Bootstrap).
One <div> including the Animate <object> looks like this:
<div style="background-color:green; position:relative; width:20vw; height:15vw; margin:1vh; padding:1vh; float:left">
<object type="text/html"
data="animate_button_xber9.html"
width="100%"
height="100%">
</object>
</div>
float:left - I used this to have the buttons nicely side-by-side. Under normal conditions you won't need this.
I took the viewport width (vw) as the chief orientation and, knowing the size-ratio is 1:1, I assigned the same values and units to both: width and height. If for example you'd have a button with the size-ratio of 4:3 you should compose the first line like this (watch the new height):
<div style="background-color:green; position:relative; width:20vw; height:15vw; margin:1vh; padding:1vh; float:left">
... coming back to ClayUUID's imput, you can see that there are indeed issues with this method. I made a button which mimicks your round button and when you rapidly move the mouse in and out, the narrow object space around the interactive button let the cursor miss the mouseout and all buttons are blinking no matter if touched or not.
So, this was rather more about HTML and CSS than Animate
Klaus