Skip to main content
franciscog47374926
Known Participant
June 6, 2018
Answered

Actionscript to Javascript

  • June 6, 2018
  • 1 reply
  • 1103 views

Hello,

I´ve got the following code on Actionscript that I would like to write in Javascript. I´ll write my guess on what I think this code does.

// The first to lines set the element "mapa" on the specified  x and y coordinates

_root.mapa_mc.mapa._x = -450;

_root.mapa_mc.mapa._y = -250;

//The next four lines create four variables and initialize them.

_global.medidaX= 0;

_global.medidaY= 0;

_global.medidaXX= -450;

_global.medidaYY= -452;

//These two lines scale  the element  mapa as specified.

this.mapa._xscale=70;

this.mapa._yscale=70;

//This is to stop the timeline.

stop();

This topic has been closed for replies.
Correct answer kglad

start with:

exportRoot.mapa_mc.mapa.x=-450;

exportRoot.mapa_mc.mapa.y=-250;

exportRoot.medidaX=0;

etc

this.mapa.scaleX=7;

this.mapa.scaleY=7;

this.stop();

1 reply

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
June 6, 2018

start with:

exportRoot.mapa_mc.mapa.x=-450;

exportRoot.mapa_mc.mapa.y=-250;

exportRoot.medidaX=0;

etc

this.mapa.scaleX=7;

this.mapa.scaleY=7;

this.stop();

franciscog47374926
Known Participant
June 6, 2018

I am getting property not defined error for exportRoot..

kglad
Community Expert
Community Expert
June 6, 2018

are you publishing an html5/canvas document?