|
-
Jul 19th, 2000, 10:09 AM
#1
Thread Starter
Frenzied Member
please help, what I"m trying to do is have the object labeled Flash1 to go diagonal down the current coordinates of it is -5000(left) & -5240(top)
Code:
Dim intflashL As Single
Dim intflashT As Single
__________________________________________
Private Sub Timer2_Timer()
If Flash1.Left = 0 Then
Else:
intflashL = intflashL + 1000
intflashT = intflashT + 1000
intflashL = Flash1.Left
intflashT = Flash1.Top
End If
End Sub
OH YEA.... I forgot to tell you my problem its:
when ever I start it it doesn't start at -5000,-5240
it just styarts in the middle of the screen, and goes dianolly down
thanks in advance
NXSupport - Your one-stop source for computer help
-
Jul 19th, 2000, 10:26 AM
#2
Addicted Member
Spot the difference
Code:
Dim intflashL As Single
Dim intflashT As Single
Private Sub Timer2_Timer()
If Flash1.Left = 0 Then
Else:
intflashL = intflashL + 1000
intflashT = intflashT + 1000
Flash1.Left = intflashL
Flash1.Top = intflashT
End If
End Sub
I'm not sure what all that 'Else:' business is about...
Visual Basic 6 Enterprise Edition + SP4
-
Jul 19th, 2000, 10:29 AM
#3
Thread Starter
Frenzied Member
Re: Spot the difference
thank you, but when I click "play" it goes diananol, but it starts in the middle of the form, not at -5000,-5240
NXSupport - Your one-stop source for computer help
-
Jul 19th, 2000, 10:32 AM
#4
I need more data, whats are all the Scale* settings for your
form (.left .top. width. .height)
Also give initial top and left setting of flash1
You're welcome to rate this post!
If your problem is solved, please use the Mark thread as resolved button
Wait, I'm too old to hurry!
-
Jul 19th, 2000, 10:34 AM
#5
Addicted Member
Hmmm
Looks like I misunderstood your predicament. From a first look at the code you posted, I wouldn't expect the object to move at all.
Anyway, perhaps you can explain what kind of object 'Flash1' is, and also, what exactly you are trying to achieve with it? You really didn't give much away before...
Visual Basic 6 Enterprise Edition + SP4
-
Jul 19th, 2000, 10:36 AM
#6
Thread Starter
Frenzied Member
Re: Hmmm
what I'm trying to do is move the flash moive from -5000(left, where it is right now), and -5240(top, where it is right now).
to:
0 left, and 240 top
now do you know what I mean?
NXSupport - Your one-stop source for computer help
-
Jul 19th, 2000, 10:38 AM
#7
Thread Starter
Frenzied Member
Re: Re: Hmmm
oh yea, the width and height are: 7455, and 3255
NXSupport - Your one-stop source for computer help
-
Jul 19th, 2000, 10:44 AM
#8
Try this
code:
Private Sub Timer2_Timer()
If not Flash1.Left <=1000 Then
Flash1.Left=Flash1.Left+1000
Flash1.Top=Flash1.Top+1000
Else
Flash1.Left=0
Flesh1.Top=240
End If
End Sub
You're welcome to rate this post!
If your problem is solved, please use the Mark thread as resolved button
Wait, I'm too old to hurry!
-
Jul 19th, 2000, 10:46 AM
#9
Sorry, I tried to use the Code Format, but may I'm just to st....
You're welcome to rate this post!
If your problem is solved, please use the Mark thread as resolved button
Wait, I'm too old to hurry!
-
Jul 19th, 2000, 11:04 AM
#10
_______
<?>
Code:
'if I use -5000 and -5240 then the object is not on the
'form and just appears at 0 - 240 top left...
'if i set it to the bottom right hand corner of the form
'and apply this it goes diagonally from bottom right to top left.
Private Sub Form_Load()
Flash1.Left = 5000
Flash1.Top = 5240
End Sub
Private Sub Timer2_Timer()
Call MoveFlash
End Sub
Public Sub MoveFlash()
Dim intflashL As Single
Dim intflashT As Single
If Flash1.Left = 0 Then
Else:
intflashL = intflashL + 1
intflashT = intflashT + 1
Flash1.Left = intflashL
Flash1.Top = intflashT
End If
End Sub
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Jul 19th, 2000, 11:12 AM
#11
_______
<?>
opus
to use code format.
SquareBracketcodeSquareBracket
bla bla code
bla bla code
SquareBrakcet/codeSquareBracket
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Jul 19th, 2000, 11:19 AM
#12
Thread Starter
Frenzied Member
ok, thanks to ALL for you HELP!!!!!!
NXSupport - Your one-stop source for computer help
-
Jul 19th, 2000, 11:19 AM
#13
Thanks Joe
I come to think Dimava uses something like [code]
Form.ScaleTop=-8000
Form.Scaleleft=-8000
[code]
??
You're welcome to rate this post!
If your problem is solved, please use the Mark thread as resolved button
Wait, I'm too old to hurry!
-
Jul 19th, 2000, 11:22 AM
#14
Thread Starter
Frenzied Member
you used this: (*s dont count)
[*code*]
then to close it
[*code*]
you should use this:
[*code*]
then to close it:
[*/*code*]
NXSupport - Your one-stop source for computer help
-
Jul 19th, 2000, 09:38 PM
#15
New Member
Well this is what i came up with...
Private sub Form_Activate()
'Set the image's location at the bottom left hand corner of the screen.
Image.left = Form1.left
Image.Top = Form1.ScaleHeight - Image.Height
End Sub
Private Sub Timer1_Timer()
Image.Left = Image.Left + 30
Image.Top = Image.Top - 30
End Sub
Just set your timer interval to 400.
Next time don't think so hard..
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|