A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Flash cant wait!

  1. #1
    Junior Member
    Join Date
    Jun 2001
    Posts
    3
    I made a quizshow program with flash5 as front end and VB6 as back end. Flash saves a request variable to a txt file and calls my VB program. My VB program processes the request and outputs to a txt file. Flash then reads output file and refreshes the screen. The problem is: Flash doesn't wait for VB to finish and looks for the output file before VB even writes it. Cant Flash wait until the file is available or VB if finished before it continues processing?? HELP!!

  2. #2
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766
    After calling the FScommand you have to wait for Flash to pick up the change. It won't happen in the same frame. This is the only way I know of to wait..

    frame1:

    var testvar = "";
    fscommand("callvb", "");

    // assume this command sets or creates a
    // variable called "testvar"

    frame2:

    // empty frame where we'll loop and wait

    frame3:

    if (testvar == "") {
    gotoAndPlay(_currentFrame-1);
    }

    frame4:

    // now you can use "testvar"


  3. #3
    Junior Member
    Join Date
    Jun 2001
    Posts
    3

    Smile

    hey it worked! it made my animation a bit slower but at least it does what it's supposed to.

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center