Access input textfield from stage to my AS3 file

I have an input textfield on my stage.
I have created a AS3 Document as the Main Class for my work.
Now I need to access the user input in the textfield and work with it in my class.
What's the quickest way ?

When you do this:
private var prefiksi:String = prefix.text;
"prefix" is not yet accessible because your class is not yet added to the display list. Besides if it's an input text field no point in assigning to a var like that as the input field text will change as the user inputs his/her own text into it. You'd better assign it to a var when you need to process the input text.
Kenneth Kawamoto
http://www.materiaprima.co.uk/

Similar Messages

  • How to access or create a stage in a class file

    Hello Flash Actionscript writers,
    I have recently discovered that I cannot use the "stage" in a
    class file. I had a regular fla file that had actionscript
    in my "actions" layer. Of course, the fla has a stage object.
    I decided it might be nice to use the actionscript
    I wrote (copied, stole, etc) in as a class, so I could use it
    in different places, etc. I am still a neophyte in this area.
    My new class file consists of a button and a textfield. I
    created small classes for each of these items as an exercise for
    myself on creating a simple class, etc.
    I also have a URLLoader, and use an xmllist to do a sort of
    mini-slide show. The idea is to show a button and the textfield.
    When the user clicks the button the slide show starts. I would like
    to be able to center the images loaded on the stage, along with the
    buttons, etc. Right now I am cheating - since I decided the stage
    is 500 px wide, etc. I can use 500 - myButton.width, etc to center
    items. The fla where the class is called has a stage that wide,
    etc. The swf created from the class file WeeklySlideShow.swf is
    created from a fla with the DocumentClass set to my class
    WeeklySlideShow.as.
    I then have yet another fla file, and load my
    WeeklySlideShow.swf into that file, and play it, etc. But my
    buttons and images are not centered. Or should I just put my
    actionscript class back into the calling fla as an actions layer,
    thus having a stage where I can center everything. I probably have
    a flaw in the items in my class file and am really miss-using the
    class concept, etc.
    Any tips will help.
    Thanks,
    eholz1

    A little more text explaining where you get stuck might help (tell us which wires you can figure out, and which ones you can't).
    Anyway, if you never want this VI to give you a dialog, simply wire a FALSE constant to 'Advisory dialog?'.
    If you wire TRUE to it, or leave it unwired, LV will give you a dialog if you want to open a file (specified by 'file path') and it does NOT exist, or if you want to create/replace a file and it DOES exist.
    The file you actually want to open/create/replace is specified by the 'file path' input. If this is empty, LV will also show a dialog.
    I am not sure what happens if you leave the 'file path' empty, and wire FALSE to 'Advisory dialog?', but that's easy to test.
    In your case, to avoid a dialog always, make sure the 'file path' is
    never empty and the 'Advisory dialog?' is wired to a FALSE constant.

  • Access object on the stage using an as3 widget

    I am trying to use a FlashPro as3 widget and Captivate 6, to toggle an image on the Captivate stage (hide/show) and can't find enough information on how to access the stage objects.
    I can use 
    var numKids:int = parent.parent.parent.numChildren() 
    to see the number of children (of the stage object?) , but can't seem to figure out how to hide or show the child objects (image, button or anything).
    My image names in my Captivate Project are Img_Einstein1 and Img_Einstein2.  They reside on a blank slide along with two buttons and another widget.
    I have looked at Tristen's web site and found a lot of useful information, but I guess I am just not putting it all together.  Because I am a contractor I can't use the Widget Factory or purchase outside widgets.
    Any help will be greatly appreciated!

    On 6 you don't have shared actions yet. I don't understand the explanation with 20 and 10. There are several examples of toggle buttons on my blog. For showing/hiding here a simple one:
    http://blog.lilybiri.com/blog-after-posterous-clickclick

  • Accessing input field from the JSP in dynpage

    HI all,
          I am trying to access the input field of the jsp page in my JSPDynpage but it is always return null.My Input is a normal HTML element not a HTMLB element
    JSP File :
         <hbj:content id="myContext" >
      <hbj:page title="PageTitle">
      <hbj:form id="myFormId" >
         <div class="content">
            <table cellpadding="2" cellspacing="2">
                        <tr>
                               <td>
                                  <label for="name"><strong>UserName:</strong></label><span id="info_name">(This field is required)</span><br />                           
                                     <input name="name" id="name" size="10" maxlength="10" type="text" />
                               </td>
                        </tr>
                        <tr>
                             <td>
                                  <label for="email"><strong>EmailID:</strong></label><span id="info_email">(This field is required)</span><br />                           
                                     <input name="email" id="email" size="20" maxlength="20" type="text" /></td>
                        </tr>\
    </Table>
    JSPDynpage:
           InputField myInputField = (InputField) getComponentByName("name");
         if (myInputField != null) {
          name = myInputField.getValueAsDataType().toString();
                   InputField myInputField1 = (InputField) getComponentByName("email");
         if (myInputField1 != null) {
          name = myInputField1.getValueAsDataType().toString();
    In both the cases myInputField and myInputField1 are null . My Question is what should be the parameter that i need to pass for getComponentByName method.
    Regards,
    Raj.

    hi,
    The way you are trying to get the input field value works good with hbj type elements.
    either you change your input field to an hbj one or use java script inside your jsp page to catch the value
    like
    for HTML:
    [HTML Input Field|http://www.w3schools.com/HTMLDOM/met_doc_getelementbyid.asp]
    and for HTMLB
    refer this link:
    [SAP HTMLB GuideLines|http://www.sapdesignguild.org/resources/htmlb_guidance/index.html]
    Regards,
    Srinu

  • Access to MessageSize from Mapping? (not for File Adapter)

    Dear Experts,
    is there any way to access the <SAP:MessageSizeTotal> values from the SOAPHeader/Runtime part (see SXMB_MONI) ?
    In case of File/FTP Sender Adapter, there is a simple possibility to use the DynamicConfiguration and the SourceFileSize attribute.
    But how we can have the message size information in case of SOAP sender adapter?
    Thank you in advance for the valuable replies!
    Best regards,
    Andras

    Hi,
    To transfer further header fields, set the relevant indicator. You can then store the following attributes and their values in the XI message header:
             Name                   Technical Name
            Variable Header        XHeaderName1
            Variable Header           XHeaderName2
            Variable Header          XHeaderName3

  • ClassNotFound Error while accessing Shared Libarary from Web Service WAR

    Hi All,
    I have developed a JAX-WS based Web Service(WAR file) using Jdeveloper 11g and deployed it to Web Logic 10.3.4 server. My web service requires access to a shared library(a JAR file ) which is already deployed on the server. So, I had modified the MANIFEST.MF file to have the reference to shared library as a
    optional package(since my web service is WAR) as below.
    Manifest-Version: 1.0
    Extension-List: bizlib
    bizlib-Extension-Name: biz_lib
    bizlib-Implementation-Version: Oracle Version 1.1
    The biz_lib is the Name of the library as seen in the Deployments section of the Web Logic Admin Console. Since there is no extension name given explicitly in the MANIFEST file of shared library, I have mentioned the name as seen in the deployments for the library. After deploying my WAR, when I go into the details of the Shared Library - biz_lib, the Admin console shows my web Service as part of - "Applications that reference this Library" section. So, I presume that my Manifest is correct. But when I test my web service from Admin Console, I face - java.lang.NoClassDefFoundError. The class that is pointed out as part of the error is part of the referenced Shared Library - biz_lib ( part of a JAR file that is listed in the Class-Path: section of shared library’s MANIFEST file). My Web Application is unable to find the class files in the shared library. Please help me. Please let me know any further information is required.
    Regards,
    Ram

              I am not sure if this helps. I encountered a similar problem and
              finally resolved it. Initially I got the error 500 - Internal
              Server error, and was not able to access my servlet which I deployed
              using .war file.
              We should make sure that the directory structure under
              WEB-INF/classes directory should reflect the package that
              your servlet belongs to. I had a HelloWorld servlet with
              the statement "package examples.servlets;" on the first line.
              So after compiling this servlet, the HelloWorld.class file
              should be copied into WEB-INF/classes/examples/servlets directory
              and not into WEB-INF/classes directory. After making this change,
              I made a new .war file and that fixed the problem.
              -Balaji.
              "san" <[email protected]> wrote:
              >
              >Hi,
              >
              > i depolyed a WAR file into WL 5.1 as a unzipped file,
              >and when i tried to access sevlet it din't come up, i got a error
              >"404 file not found,"
              >
              >my servlet classes are in WEB_INF/classes directory and i have register
              >the servlet
              >in WEB.xml file
              >
              >but still i couldn't access any servlet from my webApp ie WAR file ,
              >
              >can anyone help me out, Thanks in advance
              

  • Accessing buttons on main stage from inside of a movie clip

    Greetings...
          here is the scenario:
                 - I have buttons on main stage, and a swf file which is loaded to scene using a LOADER in AS3
                 - this is a website, so the problem rises when user moves its cursor around the page and now  buttons in main stage,
                    are still active since they are behind the loaded swf file.
                 - i would like to learn, how can i CODE inside the loaded SWF file, to either remove the buttons in main page, or remove
                    the event listeners. not sure if my case has anything to do with .Parent or .roo, (I want to access those main stage
                    buttons from the SWF file which is loaded)
                 - The general case is, i have SWF files loading inside another SWF files, is it possible to access items on each stage from
                    inside of loaded SWF files on that specific stage. Similarly i would be interested to learn about accessing main stage from inside
                    of movieclips running on stage. how can i access something not in present FLA file yet, in FLA file that is loading the page as SWF.
                    Thanks.

    If you load an swf into another using the Loader class, then the Loader itself is the parent of the loaded swf., so MovieClip(parent.parent) might help you to target the timeline that the Loader was born from.  The more proper way to have a loaded file talk to a parent file is thru dispatching events that the parent assigns listeners for after the file has loaded.  Here's a link to a posting that might help explain how to implement this.
    http://forums.adobe.com/thread/470135?tstart=120
    As for the buttons that you want to disable, you could either use the removeEventListener() method to remove the listeners you have assigned, or you could set their mouseEnabled property to false, or you could set their visible property to false.

  • Remove Input TextField dynamically from UI in adf

    How to remove input textfield dynamically from a web-page in adf??

    Well, if you'd read the information I gave you about adding components, you'd be able to extrapolate the same technique to remove them.
    You could also set the rendered property of the component to false

  • Accessing input/ouyput field from report

    Hi All,
    I have one input/output field in the Screen painter.
    But when i am accessing the field from the PAI i am getting a syntax error saying that the field is unknown .
    Please give your help regarding this.
    Thanks in Advance.

    Hi Mayank Verma,
    You should declare the variable with the same name as it's in Screen Painter for that Input/Output field with the associated Dictionary type..
    Once you will declare it the screen will pass the data you entered in screen to the varible you declared in your program..
    Hope it will solve your problem..
    Thanks & Regards
    ilesh 24x7
    ilesh Nandaniya

  • Accessing Input Text in AS3? (input text is on keyframe 1, access required on keyframe 2)

    This has been driving me nuts for a week... It seems like such a simple issue! Please help.....
    I have 2 keyframes on my timeline.
    The first keyframe has an input text field (instance name: inputTxt) and a button (instance name: btnTester).
    When the user clicks the button it takes them to the second keyframe where their text should be displayed in a dynamic text box (instance name: txtBox).
    I get a null value in keyframe 2. What am I missing?
    Thanks,
    rustyCane54
    Keyframe 1 Code
    stop();
    function fun(event:MouseEvent):void {
         gotoAndStop(2);
    btnTester.addEventListener(MouseEvent.CLICK, fun);
    Keyframe 2 Code
    txtBox.text = inputTxt.text;

    your input textfield probably doesn't exist in frame 2.
    to remedy, use:
    Keyframe 1 Code
    stop();
    var textVar:String;
    function fun(event:MouseEvent):void {
    textVar=inputTxt.text
         gotoAndStop(2);
    btnTester.addEventListener(MouseEvent.CLICK, fun);
    Keyframe 2 Code
    txtBox.text = textVar;

  • Calling a variable from inside a movieclip AS3 in Flash CS4

    I am trying to trace a variable string from inside a movieclip which is inside another movieclip on the main timeline using:
    trace(VariableString);
    and also
    trace(stage.VariableString);
    Neither work
    The variable is an input textfield and traces fine when it is on the main timeline but will not work from inside the movieclip. I am using Actionscript 3 in Flash CS4.
    I appreciate this has probably been discussed previously on this forum but I cannot find a difinitve answer that seems to work.
    Thanks

    Thanks for the reply. However this did not seem to work.
    I think I had better explain a little better.
    On Keyfrme1 I have a MovieClip1 containing a text input component. I have created a variable on keyframe 1 using:
    var VariableString1:String = new String();
    When clicking on a seperate button this happens:
    VariableString1 = MovieClip1.text;
    I can trace this correctly on the main timeline using:
    trace(VariableString1);
    However, if I try to trace this from  another keyframe inside a movieclip2 which is inside another movieclip3 using:
    trace(MovieClip1(root).VariableString1);
    I just get the error 1180 call to a possibly undefined method MovieClip1
    Sorry if this is not very clear but I am getting very confused with this.
    Thanks again

  • How do I pass input values from a html page to a jsf page

    hi,
    In my project,for front view we have used html pages.how can I get input values from that html page into my jsf page.for back end purpose we have used EJB3.0
    how can I write jsf managed bean for accessing these entities.we have used session facade design pattern and the IDE is netbeans5.5.
    pls,help me,very urgent
    thanx in advance

    Simplest way is to rewrite html page into jsf page.
    You can use session bean in your managed bean like this:
    import javax.naming.Context;
    import javax.naming.InitialContext;
    public class ManagedBean {
    private Context  ctx;
    private Object res;
    // session bean interface
    private Service service;
              public ManagedBean() {
                try{
                     ctx = new InitialContext();
                     res = ctx.lookup("Service");
                     service = (Service) res;
               catch(Exeption e){
    }Message was edited by:
    m00dy

  • Input Textfields not working in fullscreen mode

    Input Textfields not working in fullscreen mode any one help me.

    Quotes from Adobe:
    "Users cannot enter text in text input fields while in full-screen mode. All keyboard input and key-related ActionScript is disabled while in full-screen mode, with the exception of the keyboard shortcuts that take the viewer out of full-screen mode."
    Check with this article to know more: http://www.adobe.com/devnet/flashplayer/articles/full_screen_mode.html

  • Setting the background color of the selection when text selected (input TextField)

    My input TextField has a black background. The problem is,
    when some text is enter and then selected, the selection background
    color remains black and the selected text remains white. Because of
    this it's imposible to tell that the text has been selected. Is
    there a way to change the selection background color, or do I
    really have to write a custom textfield? :(

    Yes, I do have an additional attribute called "identity" which is set to the original table where it came from. The problem is that I do not know how to check for it in my renderer. I will post my renderer code here
    public class myTableRenderer extends DefaultTableCellRenderer{
    public Component getTableCellRendererComponent( JTable table,Object value,boolean isSelected,boolean hasFocus,int row,int column) {
    final Component component = super.getTableCellRendererComponent(table, value,isSelected,hasFocus, row, column);
    if ( value != null ) {
    if ( value instanceof String ) {
    String val = value.toString();
    if ( val.compareTo("DisplayKnown") == 0 ) {
    component.setBackground(Color.CYAN);
    else
    component.setBackground(Color.LIGHT_GRAY);
    } // end if value not null
    return component;
    } // end mytablerenderer
    What happens here, is that only the column with the identity value "DisplayKnown" gets the color blue. I would like to color the whole row with that column value to be Blue.
    Does this make sense??
    Thanks,
    npatel

  • Why can't I access my VM from home?

    I dropped my phone yesterday while working and had to get a replacement phone.  I'm using my wife's Samsung at the moment, but have been trying to access my VM from home, why won't it work? I dial my cell # and the recording goes on and on even with using *86, pound, or anything so I can input my password, and nothing works, it wants me to leave a message.  I'm frustrated. Any help is appreciated.

    Thanks for the info but I've tried it probably a dozen times so far and it won't do it.  Not sure why and it's annoying.  Even my wife's tried it from her cell phone and it doesn't work.  At this point and time, I'm ready to say forget it and when my replacement phone finally comes in, my wife can access the VM for me.

Maybe you are looking for

  • MSS Reports

    Hi Experts, This query is regarding MSS reports. Initially we did not want all standard functionalities, so we deleted all iviews, worksets and assignment to roles. Now we are implementing Report launchpad. I wanted to know if we have to reinstall Bu

  • Releasing SPDD/SPAU Transport manually

    Hello All, Is there any diference between Selecting "select for transport" in SPAU/SPDD (this will update the umodauto.st file) and then Releasing Manually And Selecting "select for transport" in SPAU/SPDD and then Releasing through the Upgrade Tool?

  • Sharing with Latest iTunes

    Anyone else having problems sharing/playing playlists between two computers with the latest iTunes. I use to be able to see my laptop's and desktop's playlists. But now, for some unknown reason, the two computers can't "see" each other's playlists fr

  • PO not transferred to backend

    Hi! I have a shopping cart which was approved but stayed on the 'Approved' status without the PO being created. I have run CLEAN_REQREQ_UP and BBP_GET_STATUS_2 and have checked RZ20 but couldn't fix it. There is no entry in RZ20. We are still on SRM

  • Had to re-install 1.1.3, do I have to re-purchase apps?

    I've upgraded to 1.1.3 and purchased the apps on Tuesday night. (I love them, good job Apple and Google.) But this morning on my way to work, the iPod wouldn't come out of stand-by. The screen wouldn't turn on, or anything. So I plugged it into my co