• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 20. Using the Built-in Movie Obj... > Flash at Work: Tic-Tac-Totally Autom...

Flash at Work: Tic-Tac-Totally Automatic with LocalConnection

The “local connection” feature, discussed in this chapter, allows two separate SWFs to communicate with one another. This opens up the possibility of writing separate programs that interact. For instance, two different programmers could create separate software “robots” to play a game. The robot whose ActionScript code implements the best strategy would tend to win.


Sample movies tictactoe_lc.fla and player_lc.fla in this chapter show how a tic-tac-toe game can be played between two SWFs over a local connection. Both movies are based on sample movie tictactoe.fla (discussed in the “Flash at Work” section of Chapter 13, “Using Operators”), which is a tic-tac-toe game played automatically within a single SWF, but still with two virtual “players,” one making “x” moves and one making “o” moves. Sample movies tictactoe_lc.fla and player_lc.fla in this chapter basically split the functionality of the two players into two separate SWFs.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint