D
D
Daniyar2019-10-04 16:08:54
JavaScript
Daniyar, 2019-10-04 16:08:54

How to convert flash file with scripts to html5 format?

Good afternoon, I received the following task:
it is necessary to convert the flash file to html5 format so that it can be played normally on mobile devices
ActionScript is embedded inside the document

import scripts.functions;
import flash.utils.Timer;
import flash.events.TimerEvent;

var f:functions = new functions();
var kol:int = 2;
var id:int = 0;

function anim()
{
  if(id == kol) 
  {
    f.tweenfunc(this["f" + id], "alpha", 0, 1, 1);
    _timer.start();
  }
  else f.tweenfunc(this["f" + id], "alpha", 0, 1, 1, anim, false);
  id++;
}

anim();

when converting to html5 canvas and publishing, the following error occurs
Uncaught SyntaxError: Cannot use import statement outside a module Generated
script source code: https://controlc.com/06a35a6d
How can I solve this problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Daniyar, 2019-10-04
@kzpromo

found a solution https://github.com/mozilla/shumway

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question