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

(help) how to extend textbox from stage to oop method

Explorer ,
Apr 22, 2012 Apr 22, 2012

Copy link to clipboard

Copied

hello guys, I would like to something about textbox in oop method.

the scenario is: I have a textbox inside the stage. I'm just wondering how will I control and access it using oop methodology.

Thank you in advance guys.

TOPICS
ActionScript

Views

1.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
Community Expert ,
Apr 22, 2012 Apr 22, 2012

Copy link to clipboard

Copied

assign an instance name in the properties panel and use it to reference that textfield.

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 ,
Apr 22, 2012 Apr 22, 2012

Copy link to clipboard

Copied

yes that is the method that I'm using when I'm doing a timeline base flash project. I'm just wondering how will I going to use it using class file.

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
Community Expert ,
Apr 23, 2012 Apr 23, 2012

Copy link to clipboard

Copied

are you asking how to create a textfield from a class file?  if yes, use the following from a display list class

var tf:TextField = new TextField();

addChild(tf);

if you're asking how to reference an already created textfield from the parent display list class, assign an instance name in the properties panel and use it to reference that textfield.

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 ,
Apr 23, 2012 Apr 23, 2012

Copy link to clipboard

Copied

what i'm trying to do is to reference a textfield from stage. I already tried to use instance name but it doesn't work

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
Guest
Apr 23, 2012 Apr 23, 2012

Copy link to clipboard

Copied

It depends on the scope of this class file.

If it's the Document Class, (set in the properties pane), or a classed linked through AS Linkage, then it's just a matter of referencing as kglad noted.

Otherwise, it will have to referenced via another method depending on the class.

How is this class being created?

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
Community Expert ,
Apr 23, 2012 Apr 23, 2012

Copy link to clipboard

Copied

LATEST

again, if you're asking how to reference an already created textfield from the parent display list class, assign an instance name in the properties panel and use it to reference that textfield.

if you're trying to reference from some other class, you'll need to use the correct reference which depends on the relationship between your class'es scope and the textifield's parent movieclip.

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