Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Problem with createTextfield scope

Posted on 2003-11-05
2
Medium Priority
?
226 Views
Last Modified: 2012-05-04
I'm having major problems controlling textFields (F7  publishing for F6 using AS1). The code below sits in a movie that is loaded (via loadMovieNum("IDInfo.swf", 111);). A button click from _level0 calls this function:
[code]
function ShowIdentityInfo(){
  this.createTextField("showText", ++depthCounter, 0, 0, 0, 0);      
  this.attachMovie("enterButton", "myError", ++depthCounter);
  trace("this from main = " + this); //returns _level111

  this.attachMovie("enterButton", "myError", ++depthCounter);

  myError.onRelease = function(){
  trace("this from main = " + this); //returns _level111.myError

   trace(_root.showText.htmlText);//returns the correct text.
   removeTextField(_root.showText);
   _root.removeTextField(showText);
   trace(_root.showText.htmlText);//still returns the correct text
//but why?
}
[/code]
The whole point here is to allow a button click to control the text field. The traces show that I'm scoping it correctly, doesn't it?
0
Comment
Question by:juststeve
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 

Author Comment

by:juststeve
ID: 9690654
I should have made it clear that the 'removeTextfield' statement does _not_ remove the textfield.
0
 
LVL 27

Accepted Solution

by:
negatyve earned 1000 total points
ID: 9691311
this, is the correct sintax...

_root.showText.removeTextField();
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question