Recent posts by AllisonS13 on Kongregate

Flag Post

Topic: Kongregate Labs / Help with creating a start screen

I’ve been going through the Shootorials for Actionscript 3 and am stuck on how to integrate a start screen. I’ve looked at the source code from the #8 shootorial and just can’t put two and two together about how to do it. I’ve also scoured the internet trying to find help but I definitely started to realize most other ways of adding a start screen don’t mesh with how the shootorial sets things up.

Can anyone help point me in the right direction with adding a start screen? All I want it to do is just be an initial point that you can click through to get to the actual game.

 
Flag Post

Topic: Game Programming / Help with Issue on Shootorial #5

I cannot get my enemy ships to disappear when they come in contact with the ship. Currently my ship and enemy ship have different names than their AS Linkage, but the AS linkage names are ship and enemyship. Originally I was having difficulty with the AS working so the names are in all lower case throughout the files. As for the ActionScript pages themselves..

 
class enemyship extends MovieClip
{
var speed;

function onLoad()
{
_x = 650;
_y = Math.random()250 + 50;
speed = Math.random()
5 + 5;
}

function onEnterFrame()
{
x -= speed;
if(
x < -100)
{
this.removeMovieClip();
}

if(this.hitTest(_root.ship))
{
explode();
}

function explode()
{
this.removeMovieClip();
}
}
}

and the ship’s

 
class ship extends MovieClip
{
var velocity;
var shootLimiter;
var enemyTimer;

function onLoad()
{
velocity = 10;
shootLimiter = 0;
enemyTimer = 0;
}

function onEnterFrame()
{
shootLimiter += 1;

if( Key.isDown(Key.RIGHT) )
{ _x = _x + velocity; }
if( Key.isDown(Key.LEFT) )
{ _x = _x – velocity; }
if( Key.isDown(Key.UP) )
{ _y = _y – velocity; }
if( Key.isDown(Key.DOWN) )
{ _y = _y + velocity; }

if( Key.isDown(Key.SPACE) && shootLimiter > 8)
{
shootLimiter = 0;
var missile = _root.attachMovie( “missile” , “missile” + _root.getNextHighestDepth() , root.getNextHighestDepth() );
missile.
x = x + 100;
missile.
y = _y -102;
}

enemyTimer += 1;

if(enemyTimer > 80)
{
enemyTimer = 0;
root.attachMovie(“enemyship”, “enemyship” +root.getNextHighestDepth(), _root.getNextHighestDepth());
}
}
}

Help would really be appreciated!