hello,
I am creating an application where VB and Flash are interfaced,
I am able to set textboxes in flash from visual basic using the following command
Call flashtest.SetVariable("_root.textbox.text", "lets try this")
but when i try to set a variable in flash using vb, it just dosent work
Call flashtest.SetVariable("_global.t2", "lets try this")
where t2 is my global variable in flash.
Can some one please tell me, how to set these variables in flash using VB
setting variables in flash using visual basic 6
Started by pitchfork_it, Mar 26 2008 04:45 PM
10 replies to this topic
#1
Posted 26 March 2008 - 04:45 PM
|
|
|
#2
Posted 27 March 2008 - 03:20 AM
I think that, that method only works for variables starting _root
#3
Posted 27 March 2008 - 10:29 AM
i tried that too, but didnt work, how does flash know that vb is sending some data
#4
Posted 27 March 2008 - 11:08 AM
It doesn't know that VB is sending it data lol. Vb just modifies the values, it's like using TSearch to 'hack' games... (if you ever used that)
#5
Posted 27 March 2008 - 12:17 PM
apparently, it did not modify the value, i might be doing something significantly wrong on the flash side, cos from the way you are explaining it, it sounds simple, and i m not that naive of a programmer
#6
Posted 27 March 2008 - 12:52 PM
Well i have no idea on how flash programming works, but for sure flash does not know that Vb is sending anything. I mean, you are using the flash control, not actual VB
#7
Posted 27 March 2008 - 01:14 PM
Got it working, thank you for your help :)
#8
Posted 27 March 2008 - 02:13 PM
mind sharing the code/method that you used?
#9
Posted 27 March 2008 - 02:22 PM
The following link has a very good tutorial that shows how it works,
Visual Basic Examples - Tutorial 7
The problem i was trying to solve was, I was in Frame 20 in flash and i needed vb to update the variables over there.
Apparently when you use setvariable function using vb, it updates the variable but it does that in Frame 0,
now both the frames in the movie are at "_root". And all the sites mentioned that vb will update variables only at _root and thats wht confused me, cos both my farme 20 and frame 0 is at _root, then why isnt vb updating the values?
Well as i mentioned above, vb will only update the variable and hold that value at _root. Frame 0 , So if i am in frame 20 and i need to access these values, i need to call a function which is sitting in frame 0 and which will access these variables and then return back to frame 20.
I hope i am making sense
:)
Visual Basic Examples - Tutorial 7
The problem i was trying to solve was, I was in Frame 20 in flash and i needed vb to update the variables over there.
Apparently when you use setvariable function using vb, it updates the variable but it does that in Frame 0,
now both the frames in the movie are at "_root". And all the sites mentioned that vb will update variables only at _root and thats wht confused me, cos both my farme 20 and frame 0 is at _root, then why isnt vb updating the values?
Well as i mentioned above, vb will only update the variable and hold that value at _root. Frame 0 , So if i am in frame 20 and i need to access these values, i need to call a function which is sitting in frame 0 and which will access these variables and then return back to frame 20.
I hope i am making sense
:)
#10
Posted 28 May 2008 - 02:18 AM
Hi,
I think the Flash/VB article on adobe.com/devnet/flash/articles/flash_vb.pdf may be helpful in this discussion.
This popular white paper is written by some engineering folks from our organization Mindfire Solutions (mindfiresolutions.com).
I hope you find it useful!
Cheers,
Byapti
I think the Flash/VB article on adobe.com/devnet/flash/articles/flash_vb.pdf may be helpful in this discussion.
This popular white paper is written by some engineering folks from our organization Mindfire Solutions (mindfiresolutions.com).
I hope you find it useful!
Cheers,
Byapti


Sign In
Create Account

Back to top









