Highlighted

Get the user name from input text in scene 1 and make it appears on scene 2

New Here ,
Jul 10, 2020

Copy link to clipboard

Copied

Hi, I'm totally had no idea how to retrieve the user name from scene 1 and display it on the other pages in animate CC. I work with scenes, pls help me with the coding. Thanks in advance 🙂

Adobe Community Professional
Correct answer by JoãoCésar | Adobe Community Professional

Hi.

 

If you're using scenes, I'm gonna assume you're using an AS3 document.

 

A possible solution could be:

 

AS3 (Scene 1)

import flash.events.MouseEvent;

var userText:String = "";

function clickHandler(e:MouseEvent):void
{
	userText = yourInputTextField.text;
	nextScene();
}

stop();
yourNavButton.addEventListener(MouseEvent.CLICK, clickHandler);

 

AS3 (Scene 2)

stop();
yourResultTextField.text = userText;

 

I hope this helps.

 

 

Regards,

JC

TOPICS
Code, How to

Views

52

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Get the user name from input text in scene 1 and make it appears on scene 2

New Here ,
Jul 10, 2020

Copy link to clipboard

Copied

Hi, I'm totally had no idea how to retrieve the user name from scene 1 and display it on the other pages in animate CC. I work with scenes, pls help me with the coding. Thanks in advance 🙂

Adobe Community Professional
Correct answer by JoãoCésar | Adobe Community Professional

Hi.

 

If you're using scenes, I'm gonna assume you're using an AS3 document.

 

A possible solution could be:

 

AS3 (Scene 1)

import flash.events.MouseEvent;

var userText:String = "";

function clickHandler(e:MouseEvent):void
{
	userText = yourInputTextField.text;
	nextScene();
}

stop();
yourNavButton.addEventListener(MouseEvent.CLICK, clickHandler);

 

AS3 (Scene 2)

stop();
yourResultTextField.text = userText;

 

I hope this helps.

 

 

Regards,

JC

TOPICS
Code, How to

Views

53

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jul 10, 2020 1
Adobe Community Professional ,
Jul 10, 2020

Copy link to clipboard

Copied

Hi.

 

If you're using scenes, I'm gonna assume you're using an AS3 document.

 

A possible solution could be:

 

AS3 (Scene 1)

import flash.events.MouseEvent;

var userText:String = "";

function clickHandler(e:MouseEvent):void
{
	userText = yourInputTextField.text;
	nextScene();
}

stop();
yourNavButton.addEventListener(MouseEvent.CLICK, clickHandler);

 

AS3 (Scene 2)

stop();
yourResultTextField.text = userText;

 

I hope this helps.

 

 

Regards,

JC

__________________________________________
HTML5, JSFL, and AS3 samples: http://bit.ly/2mJgDoG

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 10, 2020 2
New Here ,
Jul 10, 2020

Copy link to clipboard

Copied

Wow, you are amazing JoaoCesar!

It worked perfectly on my project. Thanks for your help, really aprreciate it 🙂

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 10, 2020 0