Jump to content


Actionscripting help please ;]


  • You cannot reply to this topic
5 replies to this topic

#1 iCeWinD

    Young Padawan

  • Members
  • Pip
  • 18 posts

Posted 24 September 2005 - 05:31 PM

Hi guys, i wondered if anyone around here could help me with a small bit of action script for a space game i created so far through a tutorial, but there is this one line that keeps giving errors!

if (Key.isDown(Key.CONTROL) { laserCounter++;
_root.laser.duplicateMovieClip( "laser"+laserCounter, laserCounter );
_root["laser"+laserCounter]._visible=true;
}


it says this:
**Error** Scene=Scene 1, layer=Spaceship, frame=1:Line 31: ')' expected
if (Key.isDown(Key.CONTROL) { laserCounter++;

Total ActionScript Errors: 1 Reported Errors: 1

Could anyone help please?

#2 funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 24 September 2005 - 06:07 PM

the lasercounter++ should be on a new line

#3 iCeWinD

    Young Padawan

  • Members
  • Pip
  • 18 posts

Posted 24 September 2005 - 06:52 PM

Yeah, tried that but it doesn't change anything, still the same error:

**Error** Scene=Scene 1, layer=Spaceship, frame=1:Line 11: ')' expected
if (Key.isDown(Key.CONTROL) {

Total ActionScript Errors: 1 Reported Errors: 1

#4 funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 24 September 2005 - 07:01 PM

here the code :)

if (Key.isDown(Key.CONTROL)) { 
laserCounter++;
_root.laser.duplicateMovieClip( "laser"+laserCounter, laserCounter );
_root["laser"+laserCounter]._visible=true;
}

Edited by funkysoul, 24 September 2005 - 08:39 PM.


#5 iCeWinD

    Young Padawan

  • Members
  • Pip
  • 18 posts

Posted 25 September 2005 - 03:28 AM

thanks baby, you own! ;) it works now ;) i'll post the game once its finish ;].. only need to create the enemies and a few touch ups now ;]

#6 funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 25 September 2005 - 07:54 AM

cool :P
please do that.. I would also like to see it ;)





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users