Solved

Problem with createTextfield scope

Posted on 2003-11-05
2
214 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

685 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