Closed Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: setting variables in flash using visual basic 6

  1. #1
    pitchfork_it is offline Newbie
    Join Date
    Mar 2008
    Posts
    7
    Rep Power
    0

    setting variables in flash using visual basic 6

    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

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Join Date
    Aug 2006
    Posts
    11,209
    Blog Entries
    6
    Rep Power
    101

    Re: setting variables in flash using visual basic 6

    I think that, that method only works for variables starting _root

  4. #3
    pitchfork_it is offline Newbie
    Join Date
    Mar 2008
    Posts
    7
    Rep Power
    0

    Re: setting variables in flash using visual basic 6

    i tried that too, but didnt work, how does flash know that vb is sending some data

  5. #4
    Join Date
    Aug 2006
    Posts
    11,209
    Blog Entries
    6
    Rep Power
    101

    Re: setting variables in flash using visual basic 6

    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)

  6. #5
    pitchfork_it is offline Newbie
    Join Date
    Mar 2008
    Posts
    7
    Rep Power
    0

    Re: setting variables in flash using visual basic 6

    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

  7. #6
    Join Date
    Aug 2006
    Posts
    11,209
    Blog Entries
    6
    Rep Power
    101

    Re: setting variables in flash using visual basic 6

    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

  8. #7
    pitchfork_it is offline Newbie
    Join Date
    Mar 2008
    Posts
    7
    Rep Power
    0

    Re: setting variables in flash using visual basic 6

    Got it working, thank you for your help

  9. #8
    Join Date
    Aug 2006
    Posts
    11,209
    Blog Entries
    6
    Rep Power
    101

    Re: setting variables in flash using visual basic 6

    mind sharing the code/method that you used?

  10. #9
    pitchfork_it is offline Newbie
    Join Date
    Mar 2008
    Posts
    7
    Rep Power
    0

    Re: setting variables in flash using visual basic 6

    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


  11. #10
    Byapti is offline Newbie
    Join Date
    May 2008
    Posts
    1
    Rep Power
    0

    Re: setting variables in flash using visual basic 6

    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

Closed Thread
Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Visual Basic Assighment Help. (Translating pseudocode to visual basic)
    By Adolf B in forum Visual Basic Programming
    Replies: 1
    Last Post: 03-18-2011, 09:16 PM
  2. Visual Basic 2008 vs. Visual Basic 2005 - Compatibility
    By cande_300 in forum Visual Basic Programming
    Replies: 1
    Last Post: 01-23-2010, 09:00 AM
  3. Flash Variables and Operators
    By chili5 in forum Tutorials
    Replies: 2
    Last Post: 09-01-2009, 01:59 PM
  4. Variables in Visual Basic
    By AlanQ in forum Visual Basic Programming
    Replies: 1
    Last Post: 04-20-2009, 12:29 PM
  5. Creating a Class in Visual Studios.Net (Visual Basic Section)
    By dream in forum Visual Basic Programming
    Replies: 11
    Last Post: 05-12-2008, 12:47 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts