• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Passing values from one scene to another

Explorer ,
Jan 03, 2013 Jan 03, 2013

Copy link to clipboard

Copied

good day, how can i pass a value coming from a textbox in scene1 to another textbox which is in scene2?

TOPICS
ActionScript

Views

4.4K

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
community guidelines

correct answers 1 Correct answer

LEGEND , Jan 03, 2013 Jan 03, 2013

In scene 1 you could have...

var str:String = t1.text;

and in scene 2 you could have...

t2.text = str;

Votes

Translate

Translate
LEGEND ,
Jan 03, 2013 Jan 03, 2013

Copy link to clipboard

Copied

In scene 1 you could have...

var str:String = t1.text;

and in scene 2 you could have...

t2.text = str;

Votes

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
community guidelines
Explorer ,
Jan 04, 2013 Jan 04, 2013

Copy link to clipboard

Copied

Hello Ned. If I am an external actionscript file, will the code still be the same?

Votes

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
community guidelines
LEGEND ,
Jan 04, 2013 Jan 04, 2013

Copy link to clipboard

Copied

Most likely.  If you have an external Actionscript file then all of the code would be in that same file.

One thing I will suggest if you have never heard it before... don't use scenes.  Use one timeline and divide it into sections, or use movieclips in a single frame and control their visibility, or mix the two.  Scenes are things of the past that should remain there... they can often be problematic to implenet a design, especially when navigation is involved.

Votes

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
community guidelines
Explorer ,
Jan 05, 2013 Jan 05, 2013

Copy link to clipboard

Copied

LATEST

It is working now! Thank you very much.

Yes. I realized that too. Whenever I use scenes I am having a hard time calling it with the gotoAndStop and gotoAndPlay function and I ended up repeating my work and using other approach like loading external swfs etc.

Votes

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
community guidelines