Chapter 27. Communicating with the Host Application


graphics/chic01.gif

You've spent a lot of time looking at how to manipulate variables inside Flash. You've even pulled information from outside Flash, in the form of text files, into Flash to help you control your movie. But what if you want Flash to talk to your browser, or your browser to talk to Flash? What if you want to use JavaScript in the browser to control a Flash movie? Is it possible? Yes, it is. This chapter, along with Chapter 28, "Working with Middleware," gives a solid background in how you can communicate between Flash and other applications.

In this chapter, you'll look at these topics:

  • loadVariables() action. Use this to load variables from a text file or a server-side script behind the scenes.

  • getURL() action. Use this to load a new page and call JavaScript functions.

  • FSCommand() action. Use this to call functions and control the properties of the Standalone Player.

  • Flash methods of the OBJECT and EMBED tags. Use these to let the browser communicate with Flash.

  • Macromedia JavaScript Integration Kit. Use this with Flash and Dreamweaver.

Before getting into the specifics of how Flash communicates with other applications, however, take a moment to consider why you would want to communicate in the first place.



Inside Flash
Inside Flash MX (2nd Edition) (Inside (New Riders))
ISBN: 0735712549
EAN: 2147483647
Year: 2005
Pages: 257
Authors: Jody Keating

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