Warning Warning: I am able to write to the configuration file: /home/hikas0/public_html/websitetemplates/includes/configure.php. This is a potential security risk - please set the right user permissions on this file (read-only, CHMOD 644 or 444 are typical). You may need to use your webhost control panel/file-manager to change the permissions effectively. Contact your webhost for assistance.
Warning Warning: The downloadable products directory does not exist: /home/hikas0/public_html/websitetemplates/download/. Downloadable products will not work until this directory is valid.
Website TemplatesWebsite Templates

Joomla Templates | Drupal Themes | WordPress Themes | XOOPS Themes | Mambo Templates
Web Design Templates | Flash Templates | eCommerce Templates | CMS Templates | Open Source Templates | Shopping Cart Templates
VirtueMart Templates | PrestaShop Themes | osCommerce Templates | Zen Cart Templates | Magento Themes | TomatoCart Templates | Cre Loaded Templates


FRIDAY 25 MAY, 2007

Templates-Help. Control MovieClip from keyboard.

by Admin | post a comment

Control MovieClip from keyboard. Here simply and clearly explained how to control MovieClip from keyboard. It will be object which shows direction of its movement. Let's start. Draw in workspace any figue with pointer up (errow, line or something like this). This pointer will show direction of movement when object change direction. Pointer should be centered. Then select your figure and press F8 (convert object to symbol), choose "MovieClip" and and choose center in "Registration" (we need it for our MovieClip to rotate around its center). Then you should write script. Select created MovieClip, open pannel Actions (F9) and put there this script: onClipEvent (load) { speed = 7; } onClipEvent (enterFrame) { if (Key.isDown(Key.LEFT)) { _x -= speed; _rotation = 270; } if (Key.isDown(Key.RIGHT)) { _x += speed; _rotation = 90; } if (Key.isDown(Key.UP)) { _y -= speed; _rotation = 0; } if (Key.isDown(Key.DOWN)) { _y += speed; _rotation = 180; } if (Key.isDown(Key.LEFT) && Key.isDown(Key.UP)) {_rotation = 315;} if (Key.isDown(Key.LEFT) && Key.isDown(Key.DOWN)) {_rotation = 215;} if (Key.isDown(Key.RIGHT) && Key.isDown(Key.DOWN)) {_rotation = 135;} if (Key.isDown(Key.RIGHT) && Key.isDown(Key.UP)) {_rotation = 45;} } Then press Ctrl+Enter and operate it. You can use it in creating of some game.

News for Thursday 24 May, 2007

View all news for Thursday 24 May, 2007 on one page

Recent News

News archive

up spurl