10 Replies Latest reply on Oct 6, 2006 7:52 AM by kglad

    Compare Variable

    mcafe
      Hi, sorry first if i post on wrong topic.

      I got some problem when compare Result from text. The text i put as Passing, when the end user click on button the Passing will assign as Passing. It Passing success, but on compare the result fail. Anyone know what happen?? I still newbie in flash.

      Thank you for speding time on this problem.

        • 1. Re: Compare Variable
          kglad Adobe Community Professional & MVP
          if Passing is a textfield variable, then it's a string. either use the Number() function to convert it to a number if you want to compare it with the number 1, or compare it with "1".
          • 2. Re: Compare Variable
            mcafe Level 1
            quote:

            Originally posted by: kglad
            if Passing is a textfield variable, then it's a string. either use the Number() function to convert it to a number if you want to compare it with the number 1, or compare it with "1".


            Hi, sorry today is 2nd day i using flash. Can you give me more example?

            Very sorry about this, i will catch up on learning.

            Thank you.
            • 3. Re: Compare Variable
              kglad Adobe Community Professional & MVP
              try:

              • 4. Re: Compare Variable
                mcafe Level 1
                Hi kglad,

                thank you for spending time on my problem.

                I try on your code, ya it success compare the result. Thank you for this problem. Now i got another problem, it fail to disable the lbl function/button function.

                lbl1._visible = false; <------ fail
                lbl2._visible = false; <------ fail
                lbl0._visible = true; <------ fail to make true
                Passing =0; <---- success assign

                can possible make this happen?? When make the value i would like to visible the lbl and button but it fail on this part.

                Thank you and very sorry for the noob problem.
                • 5. Re: Compare Variable
                  kglad Adobe Community Professional & MVP
                  you must have buttons or movieclips with instance names (click on your button/moviecilp and check the properties panel) of lbl1,lbl2,lbl0.
                  • 6. Re: Compare Variable
                    mcafe Level 1
                    quote:

                    Originally posted by: kglad
                    you must have buttons or movieclips with instance names (click on your button/moviecilp and check the properties panel) of lbl1,lbl2,lbl0.


                    Hi kglad , thank you again for reply.

                    Ya, if normal click on the button it success to take the action. If i using the script it fail to make the same thing happen.

                    All the label or button all already assign with name.

                    You got any yahoo messenger or msn?? can we chat at thr, i would like to chat at thr more easy.

                    Thank you again.

                    Regards,
                    Mc
                    • 7. Re: Compare Variable
                      kglad Adobe Community Professional & MVP
                      i have no chat clients. you can post a link to your fla if you want me to check it.
                      • 8. Compare Variable
                        mcafe Level 1
                        quote:

                        Originally posted by: kglad
                        i have no chat clients. you can post a link to your fla if you want me to check it.


                        Hi kglad ,
                        sorry for late reply, just back from outside.

                        this the link Sample

                        This suppose control with visual basic and flash, i giving the flash only.[sorry first, the visual basic need much file to communicate]

                        This some info. in the flash got

                        'Yes' and 'No' -> for the result and will pass back the result to visual basic.
                        'Next' and 'Cancel' -> for next/cancel to move forward/pervious

                        Timeout is for the showing this flash in between the period of time. This part is passing the result from vb to flash. and will update the Passing[text] from 0 to 1.

                        If the Passing =1, it suppose to do the result. When i testing on the flash it can correct and on vb part it can't. The passing result i using the same way on flash and vb.

                        If u don't understand i reply you on next post.

                        Thank you again. Can you reply asap, quite urgent.

                        Regards,
                        Mc
                        • 9. Re: Compare Variable
                          mcafe Level 1
                          Hi kglad,

                          I solve my problem aldready. The main problem handling the sript. thank you for time on my problem.

                          Regards,
                          Mc
                          • 10. Re: Compare Variable
                            kglad Adobe Community Professional & MVP
                            you're welcome.