AJAX Home
AJAX-TipsRemember These: Flash and JavaScript
Author: admin |
Published: 12th Jan 2008 |
Read: 183 times |
Add CommentFiled in: AJAX Tips
Long before Ajax has become what it is today, Flash has been thought to be the UI that could provide better interaction with the users. As long as flash is installed in the user’s computer, the interaction is very easy and the feel is even better. Java may easily compete with flash but it has gone a long way as Flash based games and mini-toons are still flourishing online. Flash developers could be considered a special breed as these developers combine skills they know in web development and art.
Mixing Flash with Ajax is actually a challenge. These two giants in UI could actually be integrated. Ajax is already a combination of two functions: JavaScript and XML so adding another language makes it even complicated. So before you venture into Flash and Ajax integration, these are the things you have to remember.
- Forget about XML and concentrate in JavaScript – the good thing about any integration is that XML could actually be left behind in terms of communicating with the server. XML is just used as a response to the server. Flash works both ways – from the command to response. So instead of having XML, you have to get flash as a response. Of course XML will be used but your JavaScript will basically work with Flash all the time.
- Use a Tool if Possible – as far as I know, there are two tools that you can use for Flash and JavaScript integration: the Flash JavaScript Integration Kit by Mozilla and Flash/JavaScript Integration Kit released by Adobe. These tools make sure everything is rendered just fine. If you’re smart enough, you should be able to render everything on your own but that will take up time especially when you’re doing it yourself. So tools could ease up and speed up things really fast.
- JavaScript to Flash and Vice-Versa – Since JavaScript and Flash will be communicating constantly, you have to consider how JavaScript and Flash communicates. The amount of data that could be sent when you’re from JavaScript to Flash is different when you consider Flash to JavaScript. This happens a lot in your program. Usually, JavaScript to Flash is only at 40K but for Flash to JavaScript could easily be optimized into an unlimited amount. But you have to be aware that Flash to JavaScript is quiet different and could be a little bit tricky if you’re not sure on what to do.
Always be smart when you’re dealing with Flash in Ajax. Developers who are in a rocket science level could render these but not all of us are very smart about this so we have to use tools. XML on this part could be disregarded a little bit but you still have to encounter lots of XML coding. They work independently with Flash but they are still part of Ajax so you’ll have to work with XML a lot. When properly rendered, Flash with Ajax is very powerful software or program that could entertain and inform your users.