Converting Actionscript to HTML5

New Here ,
Jul 14, 2020 Jul 14, 2020

Copy link to clipboard

Copied

Can anybody help me convert this Actionscript code to HTML5?

 

import flash.events.MouseEvent;
import flash.events.Event;
 
stage.addEventListener(Event.ENTER_FRAME, followMouse);
 
function followMouse(e:Event):void{
 
var xcoord = mcPolis.x - mouseX;
var ycoord = mcPolis.y - mouseY;
 
mcPolis.x = mcPolis.x - (xcoord / 10);
mcPolis.y = mcPolis.y - (ycoord / 10);
}

Views

39

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jul 14, 2020 Jul 14, 2020

Copy link to clipboard

Copied

LATEST

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines