Beginners problem with textfield

In the following pdf document, I made (as in the video) a field with a dropdownlist control and a second field with a textfield.

as in the video that I wrote the syntax of the textfield (of course in javascript). When you change the values in the drop-down list the same value must exist in the textfield object - but nothing happens ist.

I can't finde any error?

Hi jm29468764,

"this.rawValue" in the Section of the switch does not work (I guess...), as the value of the field address (Textfeld1) is always empty - if no switch is triggered.

If possible (I use ES 4) use them (in German) "Aktionsgenerator" (generative action) to perform this task. I did it and copy the following code appears:

Formular1. #subform [0]. DropdownListe1::change - (JavaScript, client)

this.resolveNode("Textfeld1").rawValue = $.boundItem (xfa.event.newText);

I hope this helps.

Regadrs

Dietmar

Tags: Adobe LiveCycle

Similar Questions

  • Problem with Textfield autocomplete--> only use the INSTR function

    Hello team dev,

    I use the new "textfield autocomplete" item type APEX and you have a crazy problem with it.

    I have a table with an index on the same column I want to search with AutoComplete field.

    Index:
    CREATE BITMAP INDEX TEST.GEO_DATA_IDX1 ON TEST.GEO_DATA (postcode)
    NOLOGGING TABLESPACE TS_INDEX;
    Select which is automatically generated by APEX 4:
    SELECT   a.*
      FROM   (  SELECT   DISTINCT postcode AS RV
                  FROM   TEST.GEO_DATA
                 WHERE   country_id = :P1_COUNTRY
              ORDER BY   1) a
     WHERE   INSTR ("RV", :p$_search_string) > 0 AND ROWNUM <= :p$_max_rows;
    
    -- plan
    Plan
    SELECT STATEMENT  ALL_ROWSCost: 4,308  Bytes: 45,31  Cardinality: 1,97            
         2 SORT UNIQUE  Cost: 4,307  Bytes: 45,31  Cardinality: 1,97       
              1 TABLE ACCESS FULL TABLE #TABLE# Cost: 4,306  Bytes: 47,311  Cardinality: 2,057  
    The APEX 3, I used the addon of Tyler Muth with my own Select:
    SELECT   DISTINCT
                postcode AS DV,
                postcode AS RV
         FROM   TEST.GEO_DATA
         WHERE   country_id = L_COUNTRY
         AND    postcode like l_search||'%'
         ORDER BY 1
    
    -- Plan
    SELECT STATEMENT  ALL_ROWSCost: 840  Bytes: 152,867  Cardinality: 13,897                                
         8 SORT ORDER BY  Cost: 840  Bytes: 152,867  Cardinality: 13,897                           
              7 HASH UNIQUE  Cost: 838  Bytes: 152,867  Cardinality: 13,897                      
                   6 VIEW VIEW index$_join$_001 Cost: 836  Bytes: 232,111  Cardinality: 21,101                 
                        5 HASH JOIN            
                             2 BITMAP CONVERSION TO ROWIDS  Cost: 31  Bytes: 232,111  Cardinality: 21,101       
                                  1 BITMAP INDEX RANGE SCAN INDEX (BITMAP) #INDEX#
                             4 BITMAP CONVERSION TO ROWIDS  Cost: 45  Bytes: 232,111  Cardinality: 21,101       
                                  3 BITMAP INDEX SINGLE VALUE INDEX (BITMAP) #INDEX#
    Is there a chance to get my INDEX used by the new element of the APEX? I do not. But I still want to ask before I just rebuild. :)

    Best regards

    Tobias

    Hi Tobias,.

    I guess that you are currently using "contains and case sensitivity ' to the attribute of"search ". Have you ever tried out "Exact and case sensitivity? Because that internally uses the LIKE operator as does your original query and the % is at the end, she must allow the use of an index. But it might still work, because ORDER BY can be run at a different time in your original example, but it's worth a try.

    Concerning
    Patrick
    -----------
    My Blog: http://www.inside-oracle-apex.com
    APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • Problem with TextField

    Hello

    I try to use TextField. I have windows 7.i have jdk 8u45. I try to use multiple text boxes. I wrote the following code:

    Javax.swing import. *;

    import java.awt.*. *;

    Class Avg5Nums {}

    int num1, num2, num3, num4 num5.

    Double Avg;

    Avg5Nums (int val1, val2, val3, val4, val5 int int int, int) {}

    NUM1 = val1;

    num2 = val2;

    NUM3 = val3;

    NUM4 = val4;

    NUM5 = val5;

    }

    Double getAvg() {}

    int sum = num1, num2, num3 + num4 + num5;

    Mean = sum/5;

    return Avg;

    }

    }

    class useAvg5Nums extends JFrame {}

    Public Shared Sub man (String [] args) {}

    TextField field1 = new JTextField();

    TextField Field2 = new JTextField();

    Field3 TextField = new JTextField();

    TextField field4 = new JTextField();

    TextField sphere5 = new JTextField();

    Message to object [] = {}

    "Enter the value 1: ', Field1,.

    "Enter the value 2:", Field2,.

    "Enter the value 3:", field3.

    "Entry of value 4: ', field4,.

    "Enter the value 5: ', sphere5.

    };

    int val1, val2, val3, val4, val5.

    val1 = 0; val2 = 0; val3 = 0; Val4 = 0; Val5 = 0;

    int option = JOptionPane.showConfirmDialog (null, null, 'Enter your values', JOptionPane.OK_CANCEL_OPTION);

    If (option is JOptionPane.OK_OPTION)

    {

    String value1 = field1.getText ();

    String value2 = field2.getText ();

    String value3 = field3.getText ();

    String value4 = field4.getText ();

    Value5 string = field5.getText ();

    val1 = Integer.parseInt (value1);

    val2 = Integer.parseInt (value2);

    val3 = Integer.parseInt (value3);

    Val4 = Integer.parseInt (value4);

    Val5 = Integer.parseInt (value5);

    }

    Avg5Nums obj = new Avg5Nums (val1, val2, val3, val4, val5);

    Double Avg = obj.getAvg ();

    JOptionPane.showMessageDialog (null, "average is" + Avg, 'results', JOptionPane.PLAIN_MESSAGE);

    System.Exit (0);

    }

    }

    I am getting following error:

    G:\Zulfi\java prog\2015\joptionPane > java useAvg5Nums

    Error: Main method not found in the useAvg5Nums class, please set the main method

    as:

    Public Shared Sub main (String [] args)

    or a JavaFX application class must extend to javafx.application.Application

    G:\Zulfi\java prog\2015\joptionPane >

    can some body please guide me.

    Zulfi.

    The error message is a missleading bit because you extended JFrame instead of just using it (which is a bad practice, but unfortunately many tutorials are...)

    The error you get should be

    "parent could not be resolved."

    You did not declare a variable named "parent".

    The good news is that you don't need.

    If you had looked in the documentation of the API you would have read that you can safely pass null as parent. Although this has some drawbacks you should do for now until you better understand differences of classes and objects.

    Good bye

    DPT

  • Problem with touch in a focus Manager

    I searched the threads on this topic but impossible to find a solution.

    Here's the thing: I have a screen, to which I add a custom handler that I add other components such as buttons, textfields, other managers and so on.

    One of the components of this is a focus Manager, I did work as a button, because he was too customized to be a button, with two blocks of text and a bitmap.

    In a trackball device it works fine, when I ride down he's focused and I can select normally, but when I use a camera touch (9550) touchs are ignored.

    I had other problems with Tush, I used a VerticalManager for the front screen and no matter where I hit, the only button I could choose was the last. Then I changed VerticalManager to the Manager and it worked, but the focus Manager I mentioned previously still did not work.

    Any ideas?

    Thanks in advance.

    Kind regards

    Dan

    It seems that the Manager cannot be selected unless there is an active field inside so you need to touch this area.

    So, the solution is to add a new field to the handler, like this:

    add(managerFocusButton = new Field() {
        protected void paint(Graphics graphics) {
        }
        protected void layout(int width, int height) {
            setExtent(width, height);
        }
        public boolean isFocusable() {
            return true;
        }
        protected void drawFocus(Graphics graphics, boolean on) {
        }
    });
    

    And then this kid with the width and height of his Manager.

    The field is not visible and the Manager won't entirely.

    Thank you.

  • Problems with the NVARCHAR2 fields

    I use ROracle to query a database with a field of type NVARCHAR2. When I access the database directly or through RJDBC, I have no problem with that. However, if I do something like

    res = dbSendQuery(conn, qry)
    dbColumnInfo(res)
    
    
    

    He told me that the 'type' is VARCHAR2. So when I use fetch (res), it's not back up the data correctly (it gives? instead). Is there anyway so that it can detect the NVARCHAR fields, properly or even manually it say when a field must be NVARCHAR?

    Edit: Try explicitly casting in my query (e.g. qry = "select cast (textfield you mvarchar2 (100)) from myTable ') and which did not help.

    Edit2: It turns out that this problem persists even with fields containing unicode VARCHAR2.

    Post edited by: 88dc10cb-b8b0-44c7-acff-5d6dc55a69dc

    I had to exportNLS_LANG=AMERICAN_AMERICA.AL32UTF8 and then load the package

    Sys.setenv(NLS_LANG = 'AMERICAN_AMERICA. AL32UTF8")

    library(ROracle)

  • Someone has problems with the visible property of the fields of dynamic text in html5 canvas?

    Hi, I have problems with text fields dynamic that I placed the Framework 1. I wanted to have a visible property false until after the click of a button. So, I placed a line of code on the layer actions of frame 1 as:

    This.Sum.Visible = false; sum is the dynamic text field

    Even with 5 other text fields.

    Some of the fields appear when I test the movie and others not, but no suppose to appear. The console.log shows no error, and when I investigated console.log as: 'console.log (this.sum.visible)', I get 'false '.

    Any ideas?

    Thank you for your time.

    Yes, the link displays multiple textfields whose visible property works without problems in an animated project of html5.

  • ODI 12 - problem with LKM SQL for Oracle

    Hi again,

    Three days ago, that I asked about the problem with the data types of data warehouses in models that were missing. After you apply the ideas suggested by Rita (thank you very much ) I got from their work.

    But after that, we came across a new problem. When you run a mapping (Oracle for Oracle databases), it failed on the second stage - ' "work table create. "When we checked the generated code was something like this: '(" CREATE TABLE < work_table_name >). None of the names of columns or data types have been described in parentheses and as expected, the ODI execution error was "invalid identifier". It seems that API odiRef.getColList(params)%> does not work. I tried loading using LKM Oracle Oracle (DB LINK) but once again the columns are missing in the generated script.

    I have to mention the master and work repositories are different databases from Oracle and ODI Agent is not installed because of some problems.

    We are still beginners of ODI and would appreciate any help from more experienced guy (or other beginners).

    Thank you in advance.

    Just by chance, we found the soluton today!

    The reason of missing generated code was that the description of the types of data was not entirely cofigured.

    We found that the fields "create table syntax" and "'syntax of data accessible in writing' in each type of data in the topology definition were empty." After filling them, the generation of the script is running properly.

    Before that we had problems with missing data types in models and we realized the reverse engineering of the types of data, but obviously it is insufficient.

    Thanks to all those who participated in the discussion and tried to help us!

  • Problem with text!

    I need your help. I have problems with the text. When I taper type text, and then try to resize the box, the text is that in a straight line (it does not resize). By default, the behavior is set on "Multiline no film." That's the problem, and if so, how to change that? The other options on the 'Behavior' tab are grayed out. Thank you all. I have no probably explains this very well, but I hope someone knows what I'm trying to say.

    You don't say what kind of paper you use. The two Flash mode and standard canvas are supported multiline and automatic text wrapping. Try double-clicking the box at the bottom right of the textfield object while you edit.

  • Problem with the clone stamp and Healing brush, as soon as I use them I get a second image duplicated on top that move with the tool

    Problem with the clone stamp and Healing brush, as soon as I use them I get a second image duplicated on top that move with the tool

    You're apparently talking about Photoshop, so I'll pass this on Photoshop beginners forum.

  • AS2 - problem with inserting of partition/name of the database/mysql

    Hello

    First of all... Sorry that I havn't put the ACE in a box, do not know how to do it on this forum!

    Okay, so here's my problem:

    I want to submit my score and the name in my database.

    This is the script I've tried Flash.

    Stop();

    create objects loadVars

    playerx = new LoadVars();

    playerRegistered = new LoadVars();

    playerRegistered.onLoad = showResult;

    create the button handler code to call the function that sends & load php

    _root.submitt.onRelease = submitScore;

    function submitScore (): Void {}

    playerx. Name = name_txt.text;

    playerx.score = score_txt.text;

    playerx.sendAndLoad ("register.php", playerRegistered);

    }

    This is the PHP script:

    <? PHP

    $connect = mysql_connect('x.com.mysql','x','password');

    @mysql_select_db ('x', $connect);

    $sql = "INSERT INTO high_scores_avoidthecars (name, score) VALUES ("'. ")" $_POST ['name']. '"," '. $_POST ['score'].'") ';"

    ? >

    Nothing is posted to the database, no errors etc... any ideas?

    If you went thru the link I provided you should see where you need to change the code that you did to get the Flash to work code.  Here is a link to an example of work that takes into account the second part of the code in this link that involves sending data (from line 28) with your textfields, etc.

    http://www.nedwebs.com/Flash/register.html

    The main problem with your AS2 code involves the following line...

    playerx.sendAndLoad ("register.php");

    It should be...

    playerx.sendAndLoad ("register.php", playerx. 'POST');

    Here's the code I used for the example files, I did...

    AS2 CODE

    playerx = new LoadVars();

    _root.submitt.onRelease = submitScore;

    function submitScore (): Void {}

    Response.Text = "clicked\n";

    playerx. Name = name_txt.text;

    playerx.score = score_txt.text;

    playerx.sendAndLoad ("register.php", playerx, "POST");

    }

    playerx.onLoad = onLoadCallBack;

    function onLoadCallBack (success)
    {
    Response.Text += "onLoad Processed\n";

    {if (success)}
    Response.Text += "Success\n;
    Response.Text += this.lVar1 + "\n";
    Response.Text += this.lVar2;
    } else {}
    Response.Text = "load error".
    }
    }

    PHP CODE

    <>
    read the variables
    $var1 = $_POST ['name'];
    $var2 = $_POST ['mark'];

    Send variables
    echo "& lVar1 = $var1 return &";.
    echo "& lVar2 = $var2 returned as well &";.
    ?>

  • Problem with xfa.event.change in 3.3 XFA

    Hi all

    I found a problem with the way in which that XFA 3.3 treats the script below on a change event when a user more than 1 character in a textfield dough.

    sChange var = xfa.event.change;

    If ((sChange.length>1)) {}

    App.Alert ("Bad User\nCopy and paste has been disabled for this field");

    throw change

    XFA. Event.change = "";

    }

    XFA 3.0 the alert is sent, the change is eliminated, XFA 3.3, the alert is sent and persists the change.

    Any ideas?

    Yes, unfortunately, this is a known bug in Acrobat X and XFA forms.  He is currently in the study...  If you are targeting Acrobat or Reader 9.1 or later (not 10.0 or later), and then it works fine.

    Mark

  • problem with if statement

    I have problem with this code haven. It shows error illigical use of the else statement. I checked the syntax is at but I don't where is my problem

    I have a drop drop list box. If the user selects objects in textfields txt_contract1 & txt_contract2 of named values has the new change.iam of java script. is it possible to programmetically edit from vb.net. IAM familiar with it.

    DataRoot. Transmittal_pdf. DropDownList1::click - (JavaScript, client)

    If

    (xfa.event.newText == 'Strategic') { }

    XFA. Form.DataRoot._Transmittal_pdf.

    DataRoot._Transmittal_pdf. Table5.row2.txt_contract1. Value

    = "Blueprint of strategic roads."

    DataRoot._Transmittal_pdf. Table5.row2.txt_contract2. Value

    = "These immediate plans."

    }

    on the other

    {

    DataRoot._Transmittal_pdf. Table5.row2.txt_contract1. Value

    = "Held consultation projects;

    DataRoot._Transmittal_pdf. Table5.row2.txt_contract2. Value

    = "";

    }

    Hi Prasad,

    'V' should be in the rawValue capital 'V' instead of small "v". So, it should be rather than rawvalue rawValue.

    Thank you

    Sidonie.

  • Weird problem with dynamic text

    Hello

    I created a dynamic text field - mediaImportName001 (created and it contains the name of a file that I have chosen to import them using a browser (as3 and AIR) button.)

    It works very well - I can import the file, and the name appears in the field.

    I would now like to pass the content of the text field to another text field.  But I'm not content. If I try to find the contents of the textField trace("mediaImportName"+thisNum).text - Flash returns "undefined" (even though I'm him asking to draw once the field has been filled).

    I use the following code to check that the material is really there and named correctly (the code returns the children):

    for (var i: uint = 0; i < this.numChildren; i ++) {}
    trace (this.getChildAt (i) .name + "\t type:" + typeof (this.getChildAt (i)) + "\t" + this.getChildAt (i));
    }

    It returns:

    object: type instance370 [object, form]
    object: type mediaImportName001 [TextField object]
    object: type mediaFiletype001 [TextField object]

    How can I get Flash to give me the text in mediaImportName001?

    It's weird - this.getChildAt (i) .name

    from above gives me...

    mediaImportName001,

    yet

    trace (['mediaImportName' + thisNum] .name);

    returns undefined (thisNum represents an increment I used to name several clips and text fields and in this case trace (thisNum); return 001)

    Any ideas why this happens?

    Thank you

    Shaun

    No logic problem, just a problem with describing the problem (as far as the fix goes) and using the property name (as far as the issue goes).  There is a difference between the creation of a dynamic textfield (a type of textfield) and dynamically a textfield (using code to create).

    In AS3, the name property is a property and it is not the same as the name of the instance that you can assign to an object on the stage.  To target an object using its name property, you must use the getChildByName() method, or alternatively, you can use the variable you used to create it.  You may need to cast as a TextField object as well as to operate...

    trace (TextField (this.getChildByName ("mediaImportName" + thisNum)). (Text);

    which would produce the same result as the use of...

    trace (mediaImportName.Text);

    I don't know how the numbering disperses on "001", but you might find it easier to work with by storing just the instances of an Array by using the media_file_num to set the index where they get.  Then, you would be able to target the textfield to help...

    trace (tfArray [thisNum]. (Text);

  • Problems with the buttons (on the area of State/Hit)

    The site I'm getting is:

    http://www.RelicRockBand.com

    If you go to the "Biography" section, you'll see four links that work as buttons of reversal.  Now, if you go to the 'Media' section, you will see 6 links that do not appear to react correctly as buttons of reversal.  They fulfill their function, but it is difficult to get the button to appear in its "underline" in the State.  I don't know if it is a problem with the over State, the status of success or another problem with how I built the site.  If you want to take a look at this, go to:

    http://www.uvm.edu/~nmphilli/Relic_Website/Flash/Relic_Webpage.fla

    to get the FLA for the site.  The concerned items are nested as follows: in scene 1, on the content layer, label image 'Media' (frames, 16-21), you will find Media_Fader, where is Media_Content, in which are several buttons, each with getURL actions that are applied to them.  Any help would be fantastic!  Thank you!

    -Nic

    The question always involves using the textfield links.  Remove the textfields in all settings inside the buttons and your problems should go away.

  • Problem with removeEventListener

    Hello

    I have a code:

    package 
    {
         import adobe.utils.CustomActions;
         import flash.display.MovieClip;
         import flash.events.MouseEvent;
         import flash.text.TextField;
         import flash.events.*;
         import flash.utils.getTimer;
    
    
         public class MyMatching extends MovieClip
         {
              public var play_btn:MyButton = new MyButton();//creating new object play_btn
              public var xIconsContainer=100;//all icons start to draw from this x
              public var yIconsContainer=100;//all icons start to draw from this y
              
              private var iconsVertical=2;//icons columns
              private var iconsHorizontal=2;//icons rows
              
              private var firstIcon;//player click to first icon
              private var secondIcon;//player click to second icon
              
              private var deletedIcons;//if firstIcon==secondIcon we will delete 2 icons
              
              //private var myTimer:MyTimer;
              public var startTime:int = getTimer();
              public var timeString:String;
              
              private var playerScoreSum:int;//sum of all players points
              private var playerScorePreview:TextField;//showing players points to the window
              private var matchPoints:int = 20;//if player match 2 icons we add 20 points to his playerScoreSum
              private var missPoints:int = 1;//if miss we delete 1 points from playerScoreSum
              
              //constructor
              public function MyMatching():void
              {
                   welcomeScreen();
                   deletedIcons = 0;
                   playerScoreSum = 0;
              }
              
              public function welcomeScreen():void
              {
                   gotoAndStop('WelcomeScreen');
                   play_btn.x=210;
                   play_btn.y=300;
                   play_btn.visible=true;
                   addChild(play_btn);//draw play_btn object
                   play_btn.addEventListener(MouseEvent.CLICK, goToLevel_1);//added event for the play_btn object
              }
              
              
              public function startingStopwatch():void
              {
                   addEventListener(Event.ENTER_FRAME, stopwatch);
              }
              
              public function stopingStopwatch():void
              {
                   removeEventListener(Event.ENTER_FRAME, stopwatch);
              }
              
              public function stopwatch(event:Event) 
              {
                   var timePassed:int = getTimer()-startTime;
                   var seconds:int = Math.floor(timePassed/1000);
                   var minutes:int = Math.floor(seconds/60);
                   seconds -= minutes*60;
                   timeString = minutes + ":" + String(seconds + 100).substr(1, 2);
                   stopwatch_txt.text = timeString;
              }
              
              
              public function goToLevel_1(event:MouseEvent)
              {
                   play_btn.visible=false;
                   gotoAndStop('Level_1');
                   
                   startingStopwatch();
                   
                   var iconsArray:Array = new Array();//creating new object iconsArray
                   for (var i:int; i < iconsVertical*iconsHorizontal/2; i++)
                   {
                        iconsArray.push(i);
                        iconsArray.push(i);
                   }
                   trace(iconsArray);
                   
                   //added timer to the screen
                   //myTimer = new MyTimer();
                   //addChild(myTimer);
                   
                   
                   
                   //added score to the sceen
                   playerScorePreview = new TextField();
                   playerScorePreview.text = String(playerScoreSum);
                   playerScorePreview.x=200;
                   playerScorePreview.y=0;
                   addChild(playerScorePreview);
                   
                   for (var x:int = 0; x < iconsVertical; x++)
                   {
                        for (var y:int = 0; y < iconsHorizontal; y++)
                        {
                             var iconsList:Icon = new Icon();
                             addChild(iconsList);
                             iconsList.stop();
                             iconsList.x=x*51+xIconsContainer;
                             iconsList.y=y*51+yIconsContainer;
                             var myRandom:int=Math.floor(Math.random()*iconsArray.length);//creates a random number that will be related to an index of the array named "iconsArray"
                             //var showIcon;//cast as whatever type of element the array is holding
                             iconsList.showIcon=iconsArray[myRandom];//assigns the randomly selected element of iconsArray to the variable showIcon
                             iconsArray.splice(myRandom,1);//removes the randomly selected element (now showIcon) from the array (not the last one, the random one) //we use the splice command to remove number from the array so that it won’t be used again
                             //iconsList.gotoAndStop(iconsList.showIcon+2);//showIcon+2 would be the next frame in the timeline after the frame for the random item deleted, so that code is essentially moving in the timeline to the frame just after the frame for the item that was removed from the array
                             trace(myRandom);
                             iconsList.addEventListener(MouseEvent.CLICK, clickToIcon);
                             deletedIcons++;//when we draw icons we every time add +2 icons to our deletedIcons variable, in future we will deleted 2 icons from this variable if firstIcon==secondIcon
                        }
                   }
                   trace("*************************random finished ******************************");
              }
              
              
              
              
              public function clickToIcon(event:MouseEvent)
              {
                   var thisIcon:Icon = (event.currentTarget as Icon);//what icon player clicked...
                   trace(thisIcon.showIcon);//trace clicked icon to the output pannel
                   if (firstIcon==null)
                   {
                        firstIcon=thisIcon;
                        firstIcon.gotoAndStop(thisIcon.showIcon + 2);
                   } 
                   else if (firstIcon == thisIcon)
                   {
                        firstIcon.gotoAndStop(1);
                        firstIcon=null;
                   } 
                   else if (secondIcon==null)
                   {
                        secondIcon=thisIcon;
                        secondIcon.gotoAndStop(thisIcon.showIcon + 2);
                        
                        if (firstIcon.showIcon==secondIcon.showIcon)
                        {
                             playerScoreSum += matchPoints;// +20 points for playerScoreSum
                             playerScorePreview.text = String(playerScoreSum);
                             
                             removeChild(firstIcon);
                             removeChild(secondIcon);
                             deletedIcons -= 2;
                             if (deletedIcons == 0)
                             {
                                  //myTimer.Stop();//stoping timer, so now we know how time player spend to playing the level 1
                                  stopingStopwatch();
                                  stopwatch_txt.text = timeString;//why i don't see time?
                                  gotoAndStop('GameoverScreen');//if player match all icons we go to GameoverScreen                              
                             }
                        }
                        else
                        {
                             playerScoreSum -= missPoints;// -1 point from playerScoreSum
                             playerScorePreview.text = String(playerScoreSum);
                        }
                   }
                   else
                   {
                        firstIcon.gotoAndStop(1);
                        secondIcon.gotoAndStop(1);
                        firstIcon = null;
                        secondIcon = null;
                   }
              }
              
         }
    
    }
    

    There is problem with my clock.

    Code for timer:

    public var startTime:int = getTimer();
              public var timeString:String;
    

    public function startingStopwatch():void
              {
                   addEventListener(Event.ENTER_FRAME, stopwatch);
              }
              
              public function stopingStopwatch():void
              {
                   removeEventListener(Event.ENTER_FRAME, stopwatch);
              }
              
              public function stopwatch(event:Event) 
              {
                   var timePassed:int = getTimer()-startTime;
                   var seconds:int = Math.floor(timePassed/1000);
                   var minutes:int = Math.floor(seconds/60);
                   seconds -= minutes*60;
                   timeString = minutes + ":" + String(seconds + 100).substr(1, 2);
                   stopwatch_txt.text = timeString;
              }
    

    When I come to the 'goToLevel_1' function I start funciton "startingStopwatch()";

    So all work I see my stopwatching... time goes...

    Then when I go to a gameover screen I don't see a timer:

    if (deletedIcons == 0)
                             {
                                  //myTimer.Stop();//stoping timer, so now we know how time player spend to playing the level 1
                                  stopingStopwatch();
                                  stopwatch_txt.text = timeString;//why i don't see time?
                                  gotoAndStop('GameoverScreen');//if player match all icons we go to GameoverScreen                              
                             }
    

    Why his arrival?

    And another question:

    When I click to play_btn I see error in the output window:

    TypeError: Error #1009: cannot access a property or method of a null object reference.
    to MyMatching / stopwatch)

    How can I solve this problem?

    Thank you.

    1009 error indicates that one of the objects targeted by your code is out of reach, and I suspect that this means your textfield stopwatch_txt.  This may mean that the object...

    n ' is not in the display list
    n ' is not have an instance name (or the name of the instance is misspelled)
    n ' is not in the frame where this code tries to talk to her
    -is animated in place, but is not assigned the name of the instances of each keyframe for her
    -is one of the two or more keyframes consecutive same objects with different names assigned.

    If you go to your section to publish the Flash settings and select permit debugging option, your error message should have a suite of line number the number of the frame that will help you to isolate the object that is involved.

Maybe you are looking for