# The flash equivilent of a VB Timer? + image array?

**URL:** <https://forum.kirupa.com/t/the-flash-equivilent-of-a-vb-timer-image-array/279620>\
**Category:** Uncategorized\
**Created:** [January 16, 2009, 5:02pm UTC](https://forum.kirupa.com/t/the-flash-equivilent-of-a-vb-timer-image-array/279620 "2009-01-16T17:02:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ImOnCloudNine69](https://avatars.discourse-cdn.com/v4/letter/i/ecccb3/32.png) [@ImOnCloudNine69](https://forum.kirupa.com/u/ImOnCloudNine69)\
**Post date:** [January 16, 2009, 5:02pm UTC](https://forum.kirupa.com/t/the-flash-equivilent-of-a-vb-timer-image-array/279620/1 "2009-01-16T17:02:30Z")

</div>

Okay so I’m very used to Visual Basic, and I got to the point where VB just couldnt handle the game requirements I was searching for. So I set out on a new goal, to learn flash. As my first task I am atempting to make an offshoot a Raiden X. sounds difficult, but one step at a time. I finally figured out how to make the ship follow my mouse, and have my “Laser” appear where it should. the next step is to make it move untill it reaches the top of the screen then I guess it should unload from the array. I am trying to put a laser image into an Array (if necissary for what im trying to do, you tell me), as to have multiple on the screen at the same time.Try the EXE I included.

In VB it would be a little like.

\*while in a timer that would go through this at a set interval"

the position of the lasers are already set on a mouse down basis. or rather as long as the mouse is held down, it will continually shoot every 250/1000 of a second or so,

Private Sub Shooting\_Timer()  
Dim Num As Integer

'LASER MOVE  
For Num = 1 To shpLaser.UBound  
If shpLaser.UBound \>= 1 Then  
shpLaser(Num).Top = shpLaser(Num).Top - 200  
End If  
Next Num

'LASER UNLOAD  
For Num = 1 To shpLaser.UBound  
If shpLaser(Num).Top \<= 0 Then  
shpLaser(Num).Left = shpLaser(shpLaser.UBound).Left  
shpLaser(Num).Top = shpLaser(shpLaser.UBound).Top  
Unload shpLaser(shpLaser.UBound)  
Exit For  
End If  
Next Num

End Sub

attached is what i did in VB \*\* as you can see it gets quite laggy when you have the upgrade set 3 and missles on\* keep in mind i coded this in about an hour or so, with an extra 30 mins or so in photoshop. you will notice the flashing and other irritating things about VB im trying to get away from.
