• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 784
  • Last Modified:

What is the difference between JavaScript and ActionScript?

I have a JavaScript script that displays a widget on my html site. I am going to flash for my new site and need to have that widget in the flash movie. Is there a way I can insert the script without having to re-write the whole thing? I know nothing about ActionScript but I hear JS and AS are very similar.

3 Solutions
JavaScript is built into most web browsers, and it is usually used to interact with the web page in which it lives. You don't write a web page in JavaScript. You write it in HTML or XHTML, and you use JavaScript to add functionality to it.

ActionScript is the programming language built into Flash. When you build an application in Flash, you can use ActionScript to bring the image to life much like JavaScript adds functionality to web pages.
DantechITAuthor Commented:
Thanks for the reply.

I know what they are but I don't know how close they are. For instance, will my JS script work in a flash movie if I put it where the actionscript goes? Do they have different libraries?
I'm a Telecomm guy that knows a bit of JS and I want to see if it is worth my time to try to figure out how to get this to work with my new site or if I should just pay someone to do it.
Michel PlungjanIT ExpertCommented:
You can likely use the algorithms. It is the DOM that is different (not an answer, just a comment)

More here http://www.google.com/search?q=javascript+versus+actionscript
If you are simply asking if your JS will work as is inside Flash, no it will never work.  Like mplungjan mentioned, the way you access elements are totally different.  An extreme example would be something like this.  You do not know how to drive a motocycle automatically just because you know how to ride a bicycle.  I am not saying one is better than another, but it's that much of difference if you ask me.


Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now