| |||||||||||
| |||||||||||
Actionscript / Flash / Flex (IAQ/FAQ)
An IAQ (Infrequently Answered Questions) document?
You may feel that some the basics about Actionscript, Flash and Flex are well known - but I didn't really understand some of it until recently and I've had one doooozie of a time trying to find the wood from the trees. So I think there's a need for some questions to be answered. * What are the components of a Flash / Flex / Actionscript System? * How do they work together? From Adobe, you have the Flash Player - a piece of software that's a free download to run within your web site visitor's browser. And you have a product for the developer to use which is used to produce the Flash movie in some way. In this setup, nothing which Adobe supply is directly loaded on the server; it's only the developer (and then if he chooses the full Flash development environment) who has to pay license fees. The Developer uses either the Adobe development environment or their no charge command line based tools to convert files such as .as file (actionscript) and .mxml files (xxxx) into flash movies in .swf files. These files are then loaded onto the client's web as a part of the web site. This web site will also include a .html file that refers to the .swf file, and may also call up all the other "usual suspects" for a web page, such as .jpg .gif, .js, .css and so on. The development of these files is unrelated to Flash. When the visitor to the web site calls up a Flash movie / Flash content, he loads first the HTML page by browsing to its URL. The HTML then calls up the ancilliary files it needs, such as the .swf file containing the flash movie, and style sheets, images, etc. Javascript may be used to check whether or not the visitor has an appropriate version of the Flash player, and so take alternative action (such as providing an alternative or suggesting a download) if necessary. During the playing of the Flash movie, and user interaction with it, server data may be required and the Flash can make further requests back to the server - submitting information and receiving data back from (example) a database, which in turn can be displayed within the continuing movie. I've uses PHP as an example of this in the following diagram, although in practise you could user .net, PHP, Perl, Java / Servlets / JSPs or more or less any other technology you wanted. Here's a diagram ... click on the diagram to open a larger version in another window. ![]() * What is Actionscript Action script is an Object Oriented programming language with a similar look and feel to Java and Javascript, but with major improvements / enhancements to handle the development, animation and interaction with Graphics, Images and Graphic User Interfaces within Flash movies. As it looks so similar to those other languages, many of the standard programming methods and techniques used in Java / Javascript coding can be applied to ActionScript, but there are extra considerations as well. It's not trivial to learn the techniques, but it's great fun. * What are the flash., fl. and ml. imports Standard componets are in packages / classes just as they are in Java. The flash. classes are part of the basics, fl. classes come with the commercial Flash CS3 from Adobe, and the ml. classes are broadly the equivalent of the fl. classes for use with the flex compiler. * How do I get a piece of action scripts to interact with data held on the server? Best way to show you that is to do a little demo. It's at http://www.wellho.net/ascript/button.html The HTML page that we used to load the Flash movie is here. The main ActionScript code here, and the button interaction class here. Finally, our token PHP script is here. The demo changes the colour of the button (to represent a local state change) when you press it, and tells the server if the button is now black or white. The server responds by echoing a "1" or "0" for the current state, and also telling the Flash movie the IP address of the machine the browser is running on. This information, which is just a hint at what the server could do, is echoed back onto a label. * How do I tell whether a user's browser has action script loaded? See an earlier article I wrote; includes source code links, etc. (written 2007-09-15 23:09:26) Associated topics are indexed under W611 - Web and Intranet - Actionscript
Some other Articles
Crystal Ball - How long do I need to be online?.php or .html extension? Morally Static Pages Match the Bedroom to the Hotel Mood shots Actionscript / Flash / Flex (IAQ/FAQ) Compressing web pages sent out from server. Is it worth it? FSB (Federation of Small Businesses) Western Region Cash is not an acceptable way of paying Screw it or Glue it? Access to Object variables - a warning Wireless Internet Access at hotels - an update and some pitfalls 1690 posts, page by page
Link to page ... 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34 at 50 posts per pageThis is a page archived from The Horse's Mouth at http://www.wellho.net/horse/ - the diary and writings of Graham Ellis. Every attempt was made to provide current information at the time the page was written, but things do move forward in our business - new software releases, price changes, new techniques. Please check back via our main site for current courses, prices, versions, etc - any mention of a price in "The Horse's Mouth" cannot be taken as an offer to supply at that price. Link to Ezine home page (for reading). Link to Blogging home page (to add comments). |
| ||||||||||
PH: 01144 1225 708225 • FAX: 01144 1225 707126 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho | |||||||||||