I´m trying to rewrite some actionscript code to javascript and I´m stucked at this function right now:
function onRestart(){
MovieClip(this.parent).thisVideo.ControlVideoAction("rewindall");
}
function onRew(e:MouseEvent):void{
MovieClip(this.parent).thisVideo.ControlVideoAction("rewind");
}
How do i rewrite the MovieClip sentence to javascript correctly?
By just converting the AS source code into valid JS the task is far from done. F.I. the class MovieClip
does not exist in Javascript (Browsers) as well as the whole other Stuff you have in Action Script. There is no concept of a Stage
, Sprites
etc. The most promising solution for that might be the Apache Flex project. That is the open source successor of Adobe Flash/Flex, which offers the so called Falcon Compiler which should offer a way to compile for HTML and Javascript. I have never tried it, but searched for AS to JS conversion, once I was asked for. So maybe that can do what you are after.