Exploring Companion Technologies


Now that you have a clear understanding of how Flash fits into the current World Wide Web, we can begin to discuss the technologies that contribute to Flash's well-being. In today's world of the Web developer, you not only need to know how to create your Flash movies, but also how to implement Flash into existing environments, such as a Web browser or your business client's Web-ready (or not-so-Web-ready) application servers and related data sources.

HTML is Here to Stay

HTML is not going anywhere, regardless of the prolific nature of Flash on the Web. Using HTML to your advantage is very important because it is undeniably the best solution for certain forms of Web deployment. In addition, sites constructed entirely in Flash often require HTML to function properly. Here's how HTML works with Flash:

  • Displaying and formatting the movie on a Web page requires HTML. It isn't always easy to hand-code HTML to work with ActiveX for Internet Explorer and the plug-in for Mozilla-compatible browsers at the same time.

  • Placing some content within a Flash movie is not possible, so you will sometimes need to link it from your movie to an HTML page. For instance, some PDF files cannot be imported into a Flash 8 document and will need to be linked from the Flash movie to be viewed separately with Acrobat Reader. Or, you may need to access video files created for the RealOne Player or Windows Media Player. You can place links to these source files, or link to an HTML document that embeds the source file.

    Tip 

    If you want to integrate PDF documents with Flash movies, you might want to explore Macromedia FlashPaper. FlashPaper is a Flash movie file (.swf) that contains a document viewer and the document itself, enabling you to embed large print-ready documents on the Web or even within your own Flash movies. For more information on FlashPaper, see theFlashPaper section at www.flashsupport.com/links.

  • If your end-user is not willing or able to view your Flash content, HTML enables you to provide an alternative version of your Web site. Despite the addition of accessibility options into Flash Players 6 and 7, which enable screen-reader interaction, not all screen readers are currently able to access this feature. An HTML version of your content is sure to reach most of this potential audience.

Many people find learning, and perhaps even using, HTML to be painful and tedious. Accommodating the differences among browsers can sometimes be time-consuming and dry work. However, knowing some HTML is highly recommended and well worth the effort. HTML should be understood by any Web professional. If you are uncomfortable with the code, using Macromedia Dreamweaver will help your transition into the HTML world.

Client-Side Scripting Using JavaScript

ActionScript and JavaScript are similar beasts, especially since Flash 5 and Flash MX. Flash MX 2004 and Flash 8 have increased the similarity between the two languages, so by learning one language, you will be able to translate this knowledge with relative ease. Already knowing some JavaScript when entering the Flash realm definitely puts you at a strong advantage. However, JavaScript itself is frequently used in conjunction with Flash, as follows:

  • With JavaScript, you can create customized browser pop-up windows that open from Flash movies. By "customized," we mean browser windows that don't have any scroll bars, button bars, or menu items across the top of the browser window.

  • JavaScript can pass data into the Flash movie when the Web page containing the movie loads. Some browsers enable you to continually pass data back and forth between Flash and JavaScript. Also, you are able to dynamically pass variables from JavaScript right into the Flash movie.

  • JavaScript can be used to detect the presence or absence of the Flash Player plug-in in the user's Web browser. Likewise, you can use VBScript on Internet Explorer for Windows to detect the Flash Player ActiveX control. JavaScript (or VBScript) can redirect the Web browser to alternative content if the player is not installed.

  • Flash movie properties such as width and height can be written on the fly using JavaScript. You can also detect various system properties (which is also possible using ActionScript) in JavaScript code, and pass this information into Flash.

New Feature 

Flash Player 8 introduces the new ExternalInterface API, which enables you to more easily pass parameters between a Flash movie and JavaScript. For more information on this new functionality, read Chapter 22, "Integrating Flash Content with Web Pages."

The World of Web Services

If you are using Flash Pro 8, you can tap an emerging new world of data transfer directly to your Flash movies. If you've stayed in the loop of Web technologies, you've likely heard of Web Services, which is a generic term to describe a standardized approach to transfer data from one Web application to another. Web Services use a format known as Web Services Description Language (WSDL), which uses a type of XML formatting called Simple Object Access Protocol (SOAP). It's not really important to know these acronyms as much as it is to understand what they do. WSDLs (pronounced "whiz-duhls") enable you to share complex data structures in a uniform, standardized manner. As long as a technology such as Flash Player 7 and higher or ColdFusion MX can interpret a Web Service, it can utilize its data. And because all WSDLs use the same formatting, your Flash movie can easily access data from public services offered by various companies on the Web. Some of these services are free, such as those found at www.capescience.com. Others are more restricted, such as Amazon.com's Web Service program, which is only available to registered associates. You can create your own Web Services with application servers such as Macromedia ColdFusion MX as well. Web Services simply provide a gateway from which your Flash movie can access data over the Internet.

Web Resource 

Just about anyone can become an Amazon.com associate. See http://associates.amazon.com for more details about enrolling in Amazon's developer program for Web Services. You don't have to use Amazon.com's Web Service, but it's a fun source of information to keep you engaged while you're learning how to use Web Services with your Flash content.

Note 

Don't forget Flash Remoting! Flash Player 6 and higher can send and receive data using Flash Remoting gateways, which can be installed on a variety of application servers. Flash Remoting is built into ColdFusion MX and provides a faster and more efficient means of transferring data between a Flash movie and an application server than Web Services can accomplish.

Macromedia Server Technologies

Nowadays, it's always helpful to have more than just client-side Flash development skills. With the release of Flash Communication Server MX, Flash Remoting MX, and more recently, Macromedia Flex, more and more business clients are looking for experienced Flash designers and developers to add real-time interactivity to their company's Web sites or Internetaware applications. Applications created for Flash Communication Server MX use server-side ActionScript (ASC files) to describe and control the interactivity between a Flash movie and the server's resources, including real-time streaming audio/video media and synchronized data updates between multiple Flash clients and the application.




Macromedia Flash 8 Bible
Macromedia Flash8 Bible
ISBN: 0471746762
EAN: 2147483647
Year: 2006
Pages: 395

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net