Solved

Problem with createTextfield scope

Posted on 2003-11-05
2
193 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
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 250 total points
ID: 9691311
this, is the correct sintax...

_root.showText.removeTextField();
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
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 which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

863 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now