ROTATING FLASH CONTENT FOR THE POCKET PC


There are many existing applications for the Pocket PC that do not need to be modified at all to play on the Pocket PC. By loading the Flash movie into a movie clip on the stage and rotating the content with ActionScript, you can play Flash content on the Pocket PC in "Landscape" mode, or to put it another way, take advantage of the vertical screen size.

Place an empty movie clip on the stage and give it an instance name of "loader." In the first frame of the movie clip place the following action in the frame actions (Window, Actions):

 loadMovie ("rotate.swf", "loader"); 

This loads the movie into the target movie clip on the main timeline.

Place the movie clip on 240 x coordinate. This places the content in the proper area. We've already created a movie called rotate.swf and it is in the same directory as our HTML and Flash (SWF) files.

In frame 1 on the main timeline, add the following frame action (Window, Actions):

 loader._rotation = 90;  loader._xscale = 50;  loader._yscale = 50; 

Here is a simple function that you can use to automate this process:

 function ppcRotate(mc)  {  mc._rotation = 90;  mc._xscale = 50;  mc._yscale = 50;  } 

Assuming that the loaded movie is loaded into a movie clip called "loader," you would use the function like this:

 loadMovie ("rotate.swf", "loader");  ppcRotate(loader); 

We've included a sample on the Flashenabled.com/mobile. Be sure to review the source files if your results are not as expected.

Most Pocket PCs were designed to work in portrait mode so be aware that there are many disadvantages and caveats. Also, be sure to check out the "Playing Flash Full Screen" section later in this chapter.

graphics/01icon13.gif

In general, HTML frames do not add any value in a Flash application for Pocket PC. Not only do frames take up precious pixels (you cannot turn off the borders) but also they can be resized by the user causing more pixels to be lost to scroll bars. If frames are going to be used, try to avoid more than two panes of HTML.




Macromedia Flash Enabled. Flash Design and Development for Devices
Macromedia Flash Enabled. Flash Design and Development for Devices
ISBN: 735711771
EAN: N/A
Year: 2002
Pages: 178

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