Skip navigation
Currently Being Moderated

Converting Flash/SWF to HTML5

May 17, 2012 5:37 AM

I.

Following Ned's advice I'm posting this message on Dreamweaver's forum (after posting it in the Flash/Actionscript 3 forum).

 

I'm not a programmer, so this question might sound a bit noobish.

I have this flash project with an advanced button - here's the code:

 

portfolio.addEventListener(MouseEvent.ROLL_OVER,btnOver);
portfolio.addEventListener(MouseEvent.ROLL_OUT,btnOut);
portfolio.addEventListener(MouseEvent.CLICK,clickPortfolioToGoToWebPage);

function btnOver(event:MouseEvent)
{
    event.currentTarget.gotoAndPlay("Rollover");
}

function btnOut(event:MouseEvent)
{
    event.currentTarget.gotoAndPlay("Rollout");
}

function clickPortfolioToGoToWebPage(event:MouseEvent):void
{
    event.currentTarget.gotoAndPlay("ClickPortfolio");
    navigateToURL(new URLRequest("http://www.fudzilla.com/"), "_blank");
}

 

In order to comply with the HTML5/CSS3 "new standards", I converted the swf file to HTML5 with Google Swiffy. The problem was that it doesn't support Actionscript 3, so it was converted as a looping movie. Question: Is it even possible to retain the Mouse events? Or do I have to make a HTML5 for the Rollover, another one for the Rollout and one for the Click? Again, I'm not a programmer.

Forgive my noobish remarks...

 

***** UPDATE: I got the code and downgraded to Actionscript 2.0 and it worked. *****

One question though: is this good practice? Creating my animations in Flash AS2 and then converting the SWF file to HTML5 using a SWF/HTML5 converter? Will I have any problems? I suppose it's not an elegant way of doing it...

 
Replies
  • Currently Being Moderated
    Jul 23, 2012 10:22 PM   in reply to pmfr01

    Hi

     

    If you want your animations to work on HTML5 devices including mobile devices, one solution is to convert the flash content to video and use the HTML5 <video> tag to embed the video on a webpage.

     

    Of course this works only if your content is non-interactive.

     

    FLABACO (www.Flash-Banner-Converter.com) is a Free, online tool which converts Flash (SWF) to video.  It generates excellent quality video which can be used with HTML5 to work on all HTML5 devices / mobile devices.

     

    Kayo

    Flabaco

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 9, 2012 1:01 AM   in reply to kayumarz

    Lynda.com has a course on HTML5 for Flash developers. I just went through it last night.... It's about 3 hours long, and really helpful for learning how to do some of the most common tasks we're used to doing in AS with Javascript and HTML5.. I think you'll do better to take a few hours to learn how to create these basic interactions right in your code

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points