Hello,
I have a source from a pinball game in actionscript 1.
The game works fine until i publish in Flash 10 with actionscript 2.
In actionscript 2 after i press start, ball remains blocked.
I attached the source of game and below is code where I think there is something wrong.
If someone can help me I would be grateful
onClipEvent(load)
{
movy = -2;
movx = 1;
colid = false;
oldx, oldy = 0;
score = 0;
}
onClipEvent (mouseDown)
{
if (this.hitTest (_root._xmouse, _root._ymouse, true))
startDrag (this);
}
onClipEvent (mouseUp)
{
stopDrag ();
}
onClipEvent(enterFrame)
{
_root.text = score;
//–game over + sound
s = new Sound();
s.attachSound(“looserwav”);
if(this._y > 384)
{
s.start();
_root.gotoAndPlay (1);
}
//--add friction
var friction = 0.02;
if(Math.abs(movx))
{
movx -= movx * friction;
}
if(Math.abs(movy))
{
movy -= movy * friction;
}