Jump to content

Javascript vs Actionscript?


Liquid Fire

Recommended Posts

What are the differences from these 2 languages, i know the syntax is very similar.  I thought actionscript was geared more toward advance animation/images for the web and javascript was more for DOM access and simpler animation, is that wrong, does action script have access to the DOM and stuff like that?

Link to comment
Share on other sites

Javascript is a good way of getting complicated things done, personally I don't like it very much I think they should change the way it works. It's very buggy if you stop and consider it, maybe re-inventing Javascript would help it out.

 

Sawce

Link to comment
Share on other sites

Javascript is a good way of getting complicated things done, personally I don't like it very much I think they should change the way it works. It's very buggy if you stop and consider it, maybe re-inventing Javascript would help it out.

 

Sawce

 

Care to provide a concrete example?

Link to comment
Share on other sites

I don't really thing that is JavaScripts fault that it is buggy, I think that it is either a poor programmer programmed it, or the browser does a bad job parsing it, such as were IE and FF both have different JS parsers, so they work a little different, and for some things only FF supports and for some things only IE supports.

 

For action script, FF and IE support them both, since neither of them parse the swf files, that is done completely by the flash plug-in from Adobe.

Link to comment
Share on other sites

How is JavaScript buggy?  Every JavaScript program I've ever written has done exactly what it was supposed to do, every time without fail, and works in every mainstream browser.

 

I can only conclude that if you feel JavaScript is buggy then you do not have enough knowledge on how to use it properly.

Link to comment
Share on other sites

What I meant was, that IE can have support for one thing, and FF may not, and vise versa.

 

This is not a fault of JavaScript the language; this is the fault of Mozilla and Microsoft the companies.

 

The solution is quite simple anyways - Don't add functionality that only works in one browser and not the other.  For example, document.all is an IE-only so don't write any code that depends solely on it.

 

Things like XHR (or AJAX) are supported the same in all of the latest browsers and can still be accomplished in IE6 and lower with a proprietary method.  Since you should have a factory function that creates the XHR object for you, you can wrap up all the complexities (and they're not really that complex in the first place) inside this function; then your client code just asks for an XHR and doesn't care how it is created.

 

Taking things further, IE uses one event model while the other browsers use the DOM L2 model; this can make event handling a PITA.  I took the time, however, to learn the event models to some detail and wrote my own JavaScript Events interface that I use in my client applications.  My client code just says Events.addEvent( 'elementID', 'click', clickHandler ) and the interface hides all the complexities for me.

 

BTW, I used to be in the same camp as the JavaScript naysayers until I took the time to really learn the language.

Link to comment
Share on other sites

I've recently had some experience with ExtJS...

 

It awesome, but accomplishing simple tasks takes relatively complex operations. I've developed sort of a love/hate relation with it :P

 

On topic, the main thing I hate about JS is the different browser implementations. Actionscript doesn't have that problem. Luckily, ExtJS takes care of that (thank god).

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.