Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Actionscript to Javascript

Community Beginner ,
Jun 06, 2018 Jun 06, 2018

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();

990
Translate
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

correct answers 1 Correct answer

Community Expert , Jun 06, 2018 Jun 06, 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();

Translate
Community Expert ,
Jun 06, 2018 Jun 06, 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();

Translate
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
Community Beginner ,
Jun 06, 2018 Jun 06, 2018

I am getting property not defined error for exportRoot..

Translate
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
Community Expert ,
Jun 06, 2018 Jun 06, 2018

are you publishing an html5/canvas document?

Translate
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
Community Beginner ,
Jun 06, 2018 Jun 06, 2018

yes, the error is like 1120:Access of undefined property error   that one.

Translate
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
Community Expert ,
Jun 06, 2018 Jun 06, 2018

that error only exists for as3 projects.

attach a screenshot of the error message.

Translate
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
Community Beginner ,
Jun 06, 2018 Jun 06, 2018

This would be a sample file. compartido foro adobe

it was done with actionscript and now i´d like to convert it to a html5/js responsive format.

So I need to have that pan and zoom efect like in the original. I guess that I have to figure out how was it originally structured so that I can rewrite it and use it for the web.

Thanks.

Translate
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
Community Expert ,
Jun 06, 2018 Jun 06, 2018
LATEST

i only download and correct files if i'm hired.

free help i only offer via the adobe forums.

Translate
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