| View previous topic :: View next topic |
| Author |
Message |
Spider_Games Advanced Cheater
Reputation: 0
Joined: 28 May 2008 Posts: 79
|
Posted: Sat Aug 02, 2008 5:01 pm Post subject: Visual Basic Comand List??? |
|
|
Hey I use visual basics for trainers. Im working on another one and I have a gero grav comand
"
Private Sub Command4_Click()
Call ShockwaveFlash1.SetVariable("_root.GRAVITY", 0)
End Sub
"
is there a way to have a button or checkbox to toogle between 1 and 0?
and is there a place where I can see all comands???
THx
|
|
| Back to top |
|
 |
Winner-XXL Cheater
Reputation: 0
Joined: 08 Jul 2008 Posts: 33 Location: Outer Space
|
Posted: Sun Aug 03, 2008 2:48 am Post subject: |
|
|
For VB 2008 (Also works in VB6 - with some changes):
---- Tutorial for Chack Box to change Value + Tutorial for Button to change Value between 2 values ----
If you want a CheckBox Togle to the Toolbox and drag the box into your Form.
Now klick at "Items" in the Properties.
Now you can add the Text you want for both Values.
I called them "Gravity=0" and "Gravity=1".
Now klick at the CheckBox and enter
| Code: | If CheckBox1.Text = "Gravity=0" Then
AxShockwaveFlash1.SetVariable("_root.GRAVITY", 0)
End If
If CheckBox1.Text = "Gravity=1" then
AxShockwaveFlash1.SetVariable("_root.GRAVITY", 1)
End If |
Think this Code should work^^.
For VB6:
Klick at List to add the two Values to choose ("Gravity=0" and "Gravity=1") in the Box^^.
| Code: | If Combo1.Text = "Gravity=0" Then
Call ShockwaveFlash1.SetVariable("_root.GRAVITY", 0)
End If
If Combo.Text = "Gravity=1" then
Call ShockwaveFlash1.SetVariable("_root.GRAVITY", 1)
End If |
-------------------------------------------------------------------------------------
If you want to do it with a normal Button then use the following code:
(Code for VB 2008 - I am not sure if it also works for VB6)
Set Button Text to "Value = 1"
It should change to "Value = 0" if you klick it once and Value should be 0
When klicking it again it should change to "Value = 1" and the vlaue is 1 again.
| Code: | If Form1.AxShockwaveFlash1.GetVariable("_root.GRAVITY") = 1 Then
Form1.AxShockwaveFlash1.SetVariable("_rootGRAVITY", 0)
Button1.Text = "Value = 0"
Else
If Form1.AxShockwaveFlash1.GetVariable("_root.GRAVITY") = 0 Then
Form1.AxShockwaveFlash1.SetVariable("_GRAVITY", 1)
Button1.Text = "Value = 1"
End If
End If |
If the Standart Value of the Gravity is 1 this Code should be OK
If the Standart Value of the Gravity is 0 change all Zeroes in the code to ones and all ones to Zeroes.
Hope i could help you^^.
Like my explanation?? Then rep+
PS: Admins - Put this into Flash Selection. Think he should get more help there^^.
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Sun Aug 03, 2008 3:04 am Post subject: |
|
|
Why are you checking the checkbox text? Check if it's checked.
Might be smarter to use the indexes of items instead of text.
|
|
| Back to top |
|
 |
Winner-XXL Cheater
Reputation: 0
Joined: 08 Jul 2008 Posts: 33 Location: Outer Space
|
Posted: Sun Aug 03, 2008 3:29 am Post subject: |
|
|
oh yeah i understand^^ oops^^
Next time i will use indexes - but i think with text it's easier to understand for noobs^^
|
|
| Back to top |
|
 |
Spider_Games Advanced Cheater
Reputation: 0
Joined: 28 May 2008 Posts: 79
|
Posted: Sun Aug 03, 2008 6:00 am Post subject: |
|
|
| it is and it worked. Whats an index?
|
|
| Back to top |
|
 |
Winner-XXL Cheater
Reputation: 0
Joined: 08 Jul 2008 Posts: 33 Location: Outer Space
|
Posted: Sun Aug 03, 2008 6:26 am Post subject: |
|
|
If you make a commandBox
(you can also call it DropDownBox)
you can write different Values you can choose into the Box.
an Index is a value that accords to what is written in the Box.
The first thing you can choose has the Index of 0
The second thing hast the index of 1
3rd: INdex = 2
.
.
.
Hope you understand it now^^
|
|
| Back to top |
|
 |
Spider_Games Advanced Cheater
Reputation: 0
Joined: 28 May 2008 Posts: 79
|
Posted: Sun Aug 03, 2008 7:04 am Post subject: |
|
|
| ok thx
|
|
| Back to top |
|
 |
|