iceProjector / icePlayer > Sample 3. Fullscreen Sprite
Sample & Tutorial
 

Fundamental
- iceProjector Help
FLA Samples
- 1. Window and Text box
- 2. Right mouse menu item
- 3. Sprite bound
- 4. System tray icon
- 5. Remote file download

Resources
- FAQ
- Support Forum
Submit yours
Submit your work. Chance to win free software from Flashants.

Contact
  Technical Support
  support@flashants.com
Marketing & Sales
  sales@flashants.com
Feedback & Suggestion
  feedback@flashants.com

Ladybug- download this sample files

This sample show how to use the command "fas.event.spriteBound" to precisely identify the repaint area to iceProjector program for improving the fullscreen movie's performance.

  1. In the frame 1, the movie clips "ladybugMC" animates the bug sprite and move itself to follow the mouse cursor. As iceProjector sends all mouse events from the desktop to flash movie (even when the cursor is outside the flash movie area), the bug will always follow the cursor everywhere on the desktop.

  2. And in the same frame (frame 1), we add the actionscripts as following. Please read the description for each command line below:

    var mySpriteBound;
    //Declare the variable for storing the repainting rectangle later.

    fscommand("fas.win.ClickToMove", "FALSE");
    fscommand("fullscreen", "TRUE");
    //Disable clicking-to-move flash window and set the movie to full screen mode.

    fscommand("fas.event.spritebound","_root.GetBoundFrame,_root.mySpriteBound");
    //Declare the frame labeled with "GetBoundFrame" to handle the spritebound event and set the "mySpriteBound" variable to store the repaint rectangle.
    In other words: The above fscommand tell iceProjector that whenever it need to repaint the movie:
    1. Go to the frame labeled with"GetBoundFrame" to execute the actionscripts in the frame.
    2. Get the repaint rectangle information from the object variable "mySpriteBound"

    stop();
    //Stop main timeline.

  3. In the frame 2, we label it as "GetBoundFrame". And add the command line below:

    mySpriteBound = ladybugMC.GetBounds(_root);
    // The command line above use the method "GetBounds" to get the rectangle area (the minimal and maximum x,y coordinate values) from the movie clip "ladybugMC". And store the information to the object variable "mySpriteBound":


  4. In this way, the iceProjector only repaints the area covering ladyBug animation instead of the whole 800*600 fullscreen area.