00:00
00:00
Minix07
what is goodie in da hoodie gangalang?

ima dude, dude

Human

Highland High School

was british land

Joined on 1/13/24

Level:
8
Exp Points:
666 / 710
Exp Rank:
> 100,000
Vote Power:
5.05 votes
Rank:
Police Sergeant
Global Rank:
7,675
Blams:
227
Saves:
984
B/P Bonus:
12%
Whistle:
Normal
Medals:
255
Supporter:
16d

Making a click n' point game using AS3 | Step 8. Dialog

Posted by Minix07 - 4 hours ago


Step 8. Dialog

In the first room, make the dialog into a symbol. 

AD_4nXexJnPOFFaaP2iANjp1i-gDiMKwH6R5KMA0RCxlObXJcloL8970CIdFFN0lFy4Lmz11WxqYD_ofuMPTKOLB_UxhPUAhAJ4Ne495QOkMmjXirLfQW8USzp9SJCgpMG_jwX0fVbF0?key=lYln-58pvChvGvHg5Z5QrA


Use this as the place to design your dialog box. Once you’re done with the design, exit out and turn it into a MovieClip symbol. This is where the animation will be added, of it popping up. Inside this symbol, animate it. I gave it a pop-up with a fade.


AD_4nXd3R2CrF2Ef_PfqcxSa-rP41xm7bJxTmn0EBNgKJFEG6RBy2NJAI1sbb7Qd9-W2Ayumkw6WOpIcn3Y7DY-b3ziQMVLnOYJS3yg6ScIvNPjgTK8p-sfYMEtQmIW5aBwZa5atT06fiw?key=lYln-58pvChvGvHg5Z5QrA

(Pro tip #5: Make sure the last frame has a stop(); to prevent it from looping forever)


For the last time, convert it into a symbol where it will be used to house all the text in the game.

AD_4nXc0jWml3APKaBzkUve2-5uZl1AZsAfSyxHtd61Q4umzMQQCbd9XY-eCu-PZYVZShQ5K1riE7YNkmRCGOSMgu_XHUn3SkJcWnmOgYkQyJM9YizJR2QhMwdCi6vEgaiyHfC5GsEztAw?key=lYln-58pvChvGvHg5Z5QrA


Inside this symbol, create 3 layers.

AD_4nXfqIW_dHurYq-YqtmusHUr0ufTHddA0fmbzPDfxkNewZL1Gjuf9GnrfiQEGPUcpStvIKcxpBcJUXHoSj1rprdWBWx9TP6CnRq1fUu2mFCRlNDcq5N0-Iyu5PzilxKBrVqGNDqx8?key=lYln-58pvChvGvHg5Z5QrA


Make the first frame empty, except for the dialog bubble. Make the second frame empty and make a third frame for your first dialogue. Add some text in the bubble layer. If you want to add more dialogue, then add more frames. Once the string of texts is done, make it empty.

AD_4nXcpx7UELsvmgGohFj8GD2y3DwYJXFVEs6Of2nmj9pXY4pwbZMcYtPXep-OrZxyn4AtDQkUg3ecZVDj0V0eWje8xTZqnnBS_FyD5CgQbrpDorjtEa-oKUHF1XMXWR-9XgvV7V1WE?key=lYln-58pvChvGvHg5Z5QrA


When I click on the cheese, it says two things, then ends. On the first frame in the action layer, add this.nextFrame(); So when the game starts, you won’t see an empty dialog box at all times. Now add a fourth layer for the labels.

AD_4nXcoIq29E1yPET1HZxSX3YnUp9Ru_DHyjdaZTPIT15Jx-hRXXEd2uXI-9TQa1rnLbodb11Thix82PwEXYcxuhsUvX5wqV5P1gy3GUYdJ7tfoqjlAdy403GCLDuNsx_d0YXlYJUmM?key=lYln-58pvChvGvHg5Z5QrA

On the empty frame inside the code layer, add a this.gotoAndStop(“nothing”);


Now, to make the dialog work. Exit the dialog and give it an instance name. Then, in the code in the room, make it so that when an object is clicked, it goes to that label.


this.cheezmc.addEventListener(MouseEvent.CLICK, cheezget);

function cheezget(event: MouseEvent): void {
	this.textboxmc.gotoAndStop("cheez");
	this.cheezmc.visible = false;
	Object(root).game.Inventory.Invbox3.Itemboxflash.gotoAndPlay(1);
	Object(root).game.Inventory.Invbox3.gotoAndStop("cheez");
}

Inside of dialog, make a large transparent white rectangle that covers the whole screen, convert that into a symbo,l and give it an instance name. This is needed so you can click anywhere to continue the text.


AD_4nXcG_3yzYXsFAlYcYymmNgPiLa62O6fN1ps-J6R1SlgjQjIFiF9SlF8rwg5QPKTmH48Rhp1EFwYN0lFq5ImRpn_tl0EyYroddPkmwSGSCb-Ezfayc0qIn-lcc6KCq751clYRB7NgBg?key=lYln-58pvChvGvHg5Z5QrA

AD_4nXd_jnVbsi1TICmXPs3eYF6xO6cl3r9MJJAwcDpjdGDpgew5hqcGLtkK8oAYlAgpQV1pukgKJFHC-EGq6a_4SwV5dRlU800FEmZxSAG1BPH_r2GgM8mNfMUoHb-XA32z9S6-nU1dvQ?key=lYln-58pvChvGvHg5Z5QrA


To make it so the dialog continues on click, give the textbox an eventListener

this.textboxmc.addEventListener(MouseEvent.CLICK, continuetextbox);

function continuetextboxmc(event: MouseEvent): void {

}


Make it so that on click, it goes to the next frame

this.textboxmc.addEventListener(MouseEvent.CLICK, continuetextbox);

function continuetextboxmc(event: MouseEvent): void {
	this.textboxmc.nextFrame();
}



Tags:

Comments

Comments ain't a thing here.