Copy link to clipboard
Copied
I have some knowledge in javascript, but i don´t know if there is some difference in Flash´s javascript, like Unity 3D, it´s a little bit different.
Do you have some script examples that i can use as a guide for me?
Some basic questions:
. I don´t know how to create the header properly;
. Can i import things like: "import flash.events.MouseEvent;"? "import flash.events.*; " etc...
. Can i extends Movieclip?
. How i create variables? Is the same? "public var num:int;"?
. How i add listener, like: "bt_start.addEventListener(MouseEvent.CLICK, gameFunction);"?
That´s all i need at the moment.
Thanks
. Can i import things like: "import flash.events.MouseEvent;"? "import flash.events.*; " etc... (USING JAVASCRIPT)
Acrobat JavaScript doesn't support this.
. Can i extends Movieclip? (USING JAVASCRIPT)
Not possible with Acrobat JavaScript.
. How i create variables? Is the same? "public var num:int;"? (USING JAVASCRIPT)
Example: var i1;
. How i add listener, like: "bt_start.addEventListener(MouseEvent.CLICK, gameFunction);"? (USING JAVASCRIPT).
Not possible with Acrobat JavaScript.
Copy link to clipboard
Copied
Why do you post this in the forum for Acrobat JavaScript?
Copy link to clipboard
Copied
ActionScript and Acrobat JavaScript have a common history but that's about it. You can't import external libraries. You're going to need to rethink your solution.
Copy link to clipboard
Copied
Bernd,
Because i just didn´t find a properly location to ask this.
This forum is a little confusing.
Copy link to clipboard
Copied
A Google search for "Adobe forums as3" yielded this link as the first result.
Copy link to clipboard
Copied
Man,
You just don´t realize don´t you? Have you read my question? I ask about the Javascript language, AFTER converted as3 to javascript. So i think here is the more properly location to ask my question.
Pay attention to the questions, even if there is "As3" in the text, i don´t need help about As3, but yes about Javascript.
Again:
. I don´t know how to create the header (OF JAVASCRIPT) properly;
. Can i import things like: "import flash.events.MouseEvent;"? "import flash.events.*; " etc... (USING JAVASCRIPT)
. Can i extends Movieclip? (USING JAVASCRIPT)
. How i create variables? Is the same? "public var num:int;"? (USING JAVASCRIPT)
. How i add listener, like: "bt_start.addEventListener(MouseEvent.CLICK, gameFunction);"? (USING JAVASCRIPT).
Understand now Bernid, Joel??
If you don´t know the answer, please, let others answer, and avoid put some answer criticizing my post.
Thanks
Copy link to clipboard
Copied
. Can i import things like: "import flash.events.MouseEvent;"? "import flash.events.*; " etc... (USING JAVASCRIPT)
Acrobat JavaScript doesn't support this.
. Can i extends Movieclip? (USING JAVASCRIPT)
Not possible with Acrobat JavaScript.
. How i create variables? Is the same? "public var num:int;"? (USING JAVASCRIPT)
Example: var i1;
. How i add listener, like: "bt_start.addEventListener(MouseEvent.CLICK, gameFunction);"? (USING JAVASCRIPT).
Not possible with Acrobat JavaScript.
Copy link to clipboard
Copied
Thanks.
Do you know where i can find (i tried google it) an example of some scripts?
Copy link to clipboard
Copied
You should look for a forum about web browser JavaScript.
Copy link to clipboard
Copied
Understood.
Do you have a link?
If don´t, i´ll search it.
Copy link to clipboard
Copied
About: "if there is some difference in Flash´s javascript, like Unity 3D, it´s a little bit different..."
I found out.
There is no difference. But there is a FlashJavascript too, that is like javascript for Unity 3D in the calling of function and variables, something like that.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now