| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
Registered User
Join Date: Oct 2005
Posts: 5
|
Yesterday I have tried 100 times to insert script to move, lets say to move one circle, I have named circle "Hero". This is the script for Flash 8:
Code:
_root.onEnterFrame = function ()
{
moveHero(5);
}
function moveHero(speed)
{
//check if key is down
if( Key.isDown(Key.UP))
{
_root.hero._y -=speed;
}
else if( Key.isDown(Key.LEFT))
{
_root.hero._x -=speed;
}
else if( Key.isDown(Key.DOWN))
{
_root.hero._y +=speed;
}
else if( Key.isDown(Key.RIGHT))
{
_root.hero._x +=speed;
}
}
Thanks in advance |
|
|
|
|
|
#2 |
|
Registered User
Join Date: Dec 2005
Posts: 5
|
you are using the wrong code for Flash Lite ( i believe). You need to check your codes with this link to make it work. Also, left doesnt work unless its "soft Key"
http://www.scottjanousek.com/downloa...l_onesheet.pdf |
|
|
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Optimizing Flash Web Sites for Search Engines | rockcoastmedia | General Chat | 20 | 03-29-2009 10:31 PM |
| Review: Book - Flash Applications for Mobile Devices | nathanpdaniel | Product Review Requests | 3 | 06-12-2007 01:52 PM |
| A rollupwindow for flash lite 2.1 | kribba | FlashLite / Portable Devices Development | 0 | 04-06-2007 02:40 PM |
| Some Flash Video Converter Tools Compare | terry117 | Detention | 7 | 05-18-2006 03:08 AM |
| [Q] Do we need those forums??? | CyanBlue | General Chat | 59 | 07-27-2004 12:13 PM |