Axure RP 9 acquires verification code countdown

First, the page layout

Kula element from the left into a [rectangular] codes as button, text box [] as a message authentication code input box, as shown:

 

Step two:

Click [top menu bar] - "[Project] -" [globals], click on the pop in the "+" sign, add validation code [globals], here named: captcha; want to start with which digital countdown, the default value for this variable is about to set which number (in this case is 10)

 

 

Expected effect: When you click the button code, copy the verification code will be changed to "10 seconds to re-access", then changed to regain seconds after 9,8,7 ......

Implementation process as follows: Select Code rectangle, click on the right side of the interaction, click New interactive

 

 

 When selecting click, the text, the current tick [element] - "Set value of text is" [[captcha]] after the second re-access ";

 

Then click the plus sign, choose to wait, time is set to "1000" ms

 

 

 

 Plus click again, select the setting variable values, select captcha, set the value: [[captcha-1]]

 

 

 

 You need to click the button to trigger the first interactive event, make the text code changes, that becomes: "After nine seconds to reacquire"; and repeat the interaction. So, again, click the plus sign and select [trigger event] - "Check the [current element] -" check the time [click]

 

 

Under normal circumstances, it should be to stop the countdown timer to 0 seconds, the button text changes to "re-acquired." Click to reacquire, then re-execute the countdown effect.

Therefore, determination of the global variables, global variables when greater than or equal to 0, executes the interactive above. Otherwise (less than 0), directly to the text to "reacquire";

When global variables and let captcha [10] reset, so that re-click [code] button, because the global variable is greater than 0 [captcha] to be able to re-execute interactive event mouse clicks.

When you add a condition to the click event when the value of the variable [captcha]> = 0, the event

 

 

 

 

 

Click Enable Cases again, add a condition to less than 0

 

 Example 2 clicks with the plus sign, selecting the text, the current tick [element] - "value to set the text to" reacquire "

 

 Click the plus sign again, set the variable [value] - "check [captcha], set the value to: 10

 

 End of the countdown to reacquire the transmission codes setting is completed, the preview

 

Guess you like

Origin www.cnblogs.com/qinmei/p/11585109.html