0

I've checked on the web for this answer quite deeply with no success. I have flash professional cs5.5 and I've created an animation. I would like that my SWF exported is embedded within to a html of my new website. That is easy configuring publish settings and Flash will create the html for you. Ok, easy...

In these options there is no controller options. The option "paused at start" doesnt autoplay the file on load, which is very useful to know. But there is no button for the user to click and play. So... how can I add controllers for this?

I've spent too long with this easy step... please help!

Rex Logan
  • 26,248
  • 10
  • 35
  • 48
Daniel Ramirez-Escudero
  • 3,877
  • 13
  • 43
  • 80

1 Answers1

0

You can add the controller inside flash. Add a mouse click event to trigger the animation, or a mouseover event, either way.

In actionscript, you can do this by adding the button and a handler:

myButton.addEventListener(MouseEvent.CLICK, myButtonClick);

function myButtonClick(ev:MouseEvent):void
{
     trace("myButton has been clicked.");
}

Examples from : http://experts.ninjacamp.com/2009/01/coding-button-in-actionscript-3.html

or directly in flash as shown here:

http://help.adobe.com/en_US/as3/components/WS5b3ccc516d4fbf351e63e3d118a9c65b32-7fe5.html

nycynik
  • 7,371
  • 8
  • 62
  • 87
  • How can this be done? I mean the mouse click event? This has to be done in the panel of actions? I dont know too much of actionscript... I would also wish to have also an image as a preview, how is that done? thanks – Daniel Ramirez-Escudero Sep 30 '12 at 09:28