Fortune Telling Collection - Comprehensive fortune-telling - How to play the lottery game?

How to play the lottery game?

Using tools: interactive master?

Operation duration: about 2 hours.

Operational preparation: register an account with Interactive Master to learn about the basic operation of the tool.

There are three main pages: name input page, achievement display page and circle of friends sharing page.

Let's look at the composition of the object tree in the ih5 editor. In this example, there are ***9 pages, including 1 name input pages and 8 result pages. The name variable is placed on the stage and used to be called in the result page and the WeChat sharing title.

Let's talk about the specific production first:

First, the stage setting:

1. Create a new project and set the stage size to 640x 1008 (the size can be customized, and the suggested stage size is 640* 1008).

2. Click the toolbar variable icon? Add variable objects on the stage. Select the variable object in the object tree, and right-click it to rename it "Name Variable" for easy identification. In the property setting of the name variable, set the variable name to "a", which will be used in future variable calls.

Second, the name input page settings:

1. Right-click to add a page in the object tree, rename it "Name Input", and add background map+input box+transparent button. For simplicity, the basemap is a complete picture.

2. When setting the input box, check the transparent background, and the prompt text is "Please enter your name or WeChat official account". In addition, the name variable on the stage is bound in the binding object settings, so that the input value is passed to the variable A.

3. Add a transparent button "Get 10w+ Cheats" above the graph and rename it "Get Cheats". Later, you need to add an event to the button to jump to the results page.

Third, the result input page settings:

1, like the template of the result input page, add a template page on the stage, add a background image+two text boxes+a transparent button, and use a whole picture as the base map here.

2. One text box is empty, just call the value of the name variable directly, and the other text box is the user-defined result text.

3. Add a transparent button above the "Notify Friends in Friends Circle" graphic and rename it "Share Friends Circle". Click this button to trigger an event and guide sharing.

At this point, all the objects needed by the page are here. The following are the settings for action events.

Fourth, get the event settings of the cheats button.

Event 1: Click the button to call the name variable in the name text box of the result page.

Event 2: Click the button and the page will jump to the random results page.

Because the button to get the cheats triggers multiple identical events at the same time, you can directly add an event group to the object, and the trigger condition is "light touch".

Verb (abbreviation of verb) calls name event: the target action set for the name text box is "Set Text" and the value is "$a" (remember to add dollar sign when calling variables).

Event of intransitive verb jumping result: Set the target action of the stage as "jumping page" and the page as "random page", and of course exclude the name input page, that is, set it as 1.

Seven, share the event settings of the circle of friends button

What I'm mainly talking about here is how to customize the sharing title in WeChat and add the trigger condition of "finger pressing" in the "Share Friends Circle" button.

The target object is "stage" and the target action is "WeChat setting title". If you want to get the name, you need to call the name variable A, and remember to prefix the variable call with the dollar sign $.

Different results pages have different titles. After setting a result page, you can copy and paste other result pages, and then modify the local text.

Eight. Event setting of input box

To be more logical, you need to add an event to the input box. When the input is not empty, you can click the Get Cheats button.

This is the end of the tutorial.