Welcome to TalkGraphics.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2000
    Location
    Dallas, Tx
    Posts
    277

    Default

    I have a game that I'm working on and it sometimes acts screwy. It works 90% of the time but I would like it better if it worked all of the time. It's a question/answer game. There is a movie clip that contains the questions. Frame 1 is nothing more than a "stop" frameand the other 29 frames are the questions. The following is the code used to set the questions and tell Flash what the answer should be:

    Stop
    Set Variable: "/:Answer" = 1
    Set Variable: "/:AnswerA" = "Rabbit"
    Set Variable: "/:AnswerB" = "Dog"
    Set Variable: "/:AnswerC" = "Goat"
    Set Variable: "/:AnswerD" = "Elephant"
    Set Variable: "/:Screen" = "What animal's foot is said to be a good luck charm?"

    The variables "AnswerA" - "AnswerD" are nothing more than text variables that sit on top of the buttons to give 4 possible answers. If variable "Answer" is set to 1, the right answer will be "AnswerA". If "Answer is set to 2, the right answer will be "AnswerB" and so on.

    On the main stage, there are commands that tell the movie clip to go to the frames with the question. Here is the code used:

    Set Variable: "Pickframe" = Random (29)+2
    Begin Tell Target ("/Q1")
    Go to and Stop (/:Pickframe)
    End Tell Target

    The problem is that sometimes the variable "Pickframe" will be set but nothing ever appears from the movie clip. I've set up a text variable to display "Pickframe and a number does appear there but it's like it misses the Tell Target command completely. Like I said, it works most of the time, it's just every now and then it will blank out like that for seemingly no reason. If anyone knows why this might be occuring your input will be much appreciated.

    Thanks in advance,
    IP

  2. #2
    Join Date
    Aug 2000
    Location
    Dallas, Tx
    Posts
    277

    Default

    I have a game that I'm working on and it sometimes acts screwy. It works 90% of the time but I would like it better if it worked all of the time. It's a question/answer game. There is a movie clip that contains the questions. Frame 1 is nothing more than a "stop" frameand the other 29 frames are the questions. The following is the code used to set the questions and tell Flash what the answer should be:

    Stop
    Set Variable: "/:Answer" = 1
    Set Variable: "/:AnswerA" = "Rabbit"
    Set Variable: "/:AnswerB" = "Dog"
    Set Variable: "/:AnswerC" = "Goat"
    Set Variable: "/:AnswerD" = "Elephant"
    Set Variable: "/:Screen" = "What animal's foot is said to be a good luck charm?"

    The variables "AnswerA" - "AnswerD" are nothing more than text variables that sit on top of the buttons to give 4 possible answers. If variable "Answer" is set to 1, the right answer will be "AnswerA". If "Answer is set to 2, the right answer will be "AnswerB" and so on.

    On the main stage, there are commands that tell the movie clip to go to the frames with the question. Here is the code used:

    Set Variable: "Pickframe" = Random (29)+2
    Begin Tell Target ("/Q1")
    Go to and Stop (/:Pickframe)
    End Tell Target

    The problem is that sometimes the variable "Pickframe" will be set but nothing ever appears from the movie clip. I've set up a text variable to display "Pickframe and a number does appear there but it's like it misses the Tell Target command completely. Like I said, it works most of the time, it's just every now and then it will blank out like that for seemingly no reason. If anyone knows why this might be occuring your input will be much appreciated.

    Thanks in advance,
    IP

  3. #3
    Join Date
    Aug 2000
    Location
    Dallas, Tx
    Posts
    277

    Default

    I started this project in Flash 4 but have converted it to Flash 5 to see if it would help any. It didn't but here is the same code, only in Flash 5 format:

    stop ();
    /:Answer = 1;
    /:AnswerA = "Rabbit";
    /:AnswerB = "Dog";
    /:AnswerC = "Goat";
    /:AnswerD = "Elephant";
    /:Screen = "What animal's foot is said to be a good luck charm?";

    And

    Pickframe = Number(random(29))+2;
    tellTarget ("/Q1") {
    gotoAndStop (/:Pickframe);
    }
    IP

  4. #4
    Join Date
    Aug 2000
    Location
    Toronto, Ontario, Canada
    Posts
    432

    Default

    why do it like that? why not just have your questions and answers dynamically loaded from a text file, or from a movie clip? anyway, if you must go this route, the only thing i can really think of off the top of my head is to tell it to goto and play instead of stop. but it would probably be better if you just loaded your variables and didn't worry about all this jumping from frame to frame. a lot less chance of error that way...


    hth,
    Deep (just a guy)
    <font face="arial" size="2">
    Pradeep Kumar Nair, B.Math
    Senior Web Designer
    http://www.blab.com
    ICQ: 39102360
    </font>
    hth,
    Deep (just a guy)
    --
    Pradeep Kumar Nair, B.Math
    CTO
    9 Story Entertainment
    http://www.9story.com
    IP

  5. #5
    Join Date
    Aug 2000
    Location
    Dallas, Tx
    Posts
    277

    Default

    Hi Deep,

    I had to do it in this way because it is intended for an EXE file to be sent in emails and on CDs. From the CD, I could make it pull from text files or databases but my client wasn't willing to pay for any further work than was needed to make the EXE.

    Anyway, thanks for your help on everything you've helped me with. I really appreciate it.

    Thanks,

    Stinger
    IP

  6. #6
    Join Date
    Aug 2000
    Location
    Toronto, Ontario, Canada
    Posts
    432

    Default

    no worries - did you end up getting it to work?


    hth,
    Deep (just a guy)
    <font face="arial" size="2">
    Pradeep Kumar Nair, B.Math
    Senior Web Designer
    http://www.blab.com
    ICQ: 39102360
    </font>
    hth,
    Deep (just a guy)
    --
    Pradeep Kumar Nair, B.Math
    CTO
    9 Story Entertainment
    http://www.9story.com
    IP

  7. #7
    Join Date
    Aug 2000
    Location
    Dallas, Tx
    Posts
    277

    Default

    You can check out the end result at my web site (www.stingerweb.com) under the "Portfolio" section. It is the "Who Wants to be a Millionaire" game. I have it set up to where you can download the .exe or play on-line but since I have not altered the on-line version yet (to pull the questions from a database) it takes a while to load. Probably better off downloading the .exe because it only takes a few seconds longer to download and you never have to download it again.
    IP

 

 

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
  •