problem between objects of class

well, I'm a huge refactoring ActionScript file and so tried to move some functions in their own classes.  Why does this work?  I have a function in my primary class:

// ...


private var testBlock:Sprite;


public Function testingINT() {}

testBlock = new Sprite();

var TB = new TAPATTesting();

testBlock = TB.makeTestBlock ();

TAPATContainer.addChild (testBlock);

}

... testingINT() is called away

and then, the class TAPATTesting is here:

package com.bpi.tapat

{

import flash.display. *;

import flash.text.TextField;

import flash.text.TextFieldAutoSize;

import flash.text.TextFormat;

public class TAPATTesting { }

          

public var testBlock:Sprite;

public var test1TXT:TextField;

public var test2TXT:TextField;

public var test3TXT:TextField;

public var test4TXT:TextField;

public var test5TXT:TextField;

public var test6TXT:TextField;

public var test7TXT:TextField;

          

public function TAPATTesting ():void {}

               

          }

          

public function makeTestBlock (): Sprite {}

               

var formatTest: TextFormat = new TextFormat();

formatTest.font = "Monaco";

formatTest.color = 0xCCCCCC;

formatTest.size = 10;

               

testBlock = new Sprite();

               //

               var textX = 50;

               var textY = 270;

test1TXT = new TextField();

test1TXT.autoSize = TextFieldAutoSize.LEFT;

test1TXT.defaultTextFormat = formatTest;

test1TXT.x = textX;

test1TXT.y = textY;

testBlock.addChild (test1TXT);

               //

test2TXT = new TextField();

test2TXT.autoSize = TextFieldAutoSize.LEFT;

test2TXT.defaultTextFormat = formatTest;

test2TXT.x = textX;

test2TXT.y = textY + 20;

testBlock.addChild (test2TXT);

               //

test3TXT = new TextField();

test3TXT.autoSize = TextFieldAutoSize.LEFT;

test3TXT.defaultTextFormat = formatTest;

test3TXT.x = textX;

test3TXT.y = textY + 40.

testBlock.addChild (test3TXT);

               //

test4TXT = new TextField();

test4TXT.autoSize = TextFieldAutoSize.LEFT;

test4TXT.defaultTextFormat = formatTest;

test4TXT.x = textX

test4TXT.y = textY + 60;

testBlock.addChild (test4TXT);

               //

test5TXT = new TextField();

test5TXT.autoSize = TextFieldAutoSize.LEFT;

test5TXT.defaultTextFormat = formatTest;

test5TXT.x = textX;

test5TXT.y = textY + 90;

testBlock.addChild (test5TXT);

               //

test6TXT = new TextField();

test6TXT.autoSize = TextFieldAutoSize.LEFT;

test6TXT.defaultTextFormat = formatTest;

test6TXT.x = textX;

test6TXT.y = textY + 110;

testBlock.addChild (test6TXT);

               //

test7TXT = new TextField();

test7TXT.autoSize = TextFieldAutoSize.LEFT;

test7TXT.defaultTextFormat = formatTest;

test7TXT.x = textX;

test7TXT.y = textY + 140;

testBlock.addChild (test7TXT);

               

               return testBlock;

          }

     }

}

So, therefore, I would that testBlock in the primary class would have the Sprite testBlock of the TAPATTesting passed to him.  The problem arises here in another function of the primary class:

private Function testReport() {}

                    

testBlock.test1TXT.text = ' # effect: " + currentStim + ' / ' + numberStims;"»

testBlock.test2TXT.text = ' stem length: " + stimDuration;"»

testBlock.test3TXT.text = ' inter-stim int: " + interStimInterval;"»

testBlock.test4TXT.text = "target freq:" + targetFrequency; "»

     //

testBlock.test5TXT.text = ' stem angle: " + stimAngle;"»

testBlock.test6TXT.text = ' stim dist: ' + stimDistance;

     //

testBlock.test7TXT.text = ' user evaluation: " + userResponseTime + "ms";". "

}

I get this same error on each of these lines:

Several markers to this line:

-1119: access to property may be undefined test7TXT through a reference with static type flash.display:Sprite.

Why can't I access the Sprite testBlock children?

That's because TestBlock is a Sprite, and a Sprite is not a property named "test7TXT".

You can still access them by doing something like the following:

-Give the textfield object a name

test7TXT = new TextField();

test7TXT.name = "test7TXT";

test7TXT.AutoSize = TextFieldAutoSize.LEFT;

test7TXT.defaultTextFormat = formatTest;

test7TXT.x = textX;

test7TXT.y = textY + 140;

testBlock.addChild (test7TXT);

-Access to the textfield object using its name

TextField (TestBlock.getChildByName ('test7TXT')) .text = "assessment of users...". » ;

Note that getChildByName returns the object as a DisplayObject, you will need to cast to a TextField.

I hope this helps.

Tags: Adobe Animate

Similar Questions

  • Captivate 8 - small gaps between objects and the end of the slide?

    Hello

    I have a selection of objects on a slide and have noticed that there is a very small gap (less than 0.1 seconds) between some of them and the end of the slide.  This applies only to certain objects. All objects are set to falter (via the timing tab) and the deficiencies mean they fade sometimes slightly different, which is really irritating.  This seems to happen even if I manually set the timings of the object (again via the timing tab) so that each object must be on the slide for exactly the right amount of time.

    Has anyone seen this problem before?  If so, is there a way to bypass?

    Thank you!

    Gaps.png

    Gaps2.png

    I figured out, and now I feel very stupid!

    The problem with objects is not the tail was because I changed the zoom on the timeline, from 100 to about 80%.  Return to 100% causes the objects to align again.

    The problem with the objects fading out at the wrong time was not related and because I had accidentally changed the duration of the effect of 0.5 second to 0.1.

    Thanks for your help anyway!

  • gap between objects

    I know there are several discussions about this, but I have not found a decent answer. I have a logo that I work with shapes that overlap, races, etc. Everything seems fine in Illustrator, but when I export the file to show the customer, be it a .png, .pdf, .jpg, untied gap between objects. Is this only a problem of screen or print the gap of the root of the hair?

    illustrator.jpg

    It is a screen problem. As long as the paths match it will print correctly. HAVE strives to "smoothing" 2 forms that have the same color with the background color "bleeding" through to result. A test, if you put a blue shape behind the part of the designated area, that would eliminate the root of white hair. It will also disappear if you disable 'anti-aliasing work' in the preferences (but you might not like the side effects of raster edges it produces).

  • kb2596615 causes ade to failure, error was 459: object or class does not support the set of events

    A couple of my users started getting our application error messages ade grown after you apply this update. Everything is well after its withdrawal. First mistake was 459: object or class does not support the set of events. Basically, no event has worked. Why is this update break my application? It should be removed from the queue of the update.

    Okay, I've worked on it with Microsoft, and the actual cause turns out to be:

    MS12-060 security update affects the functionality of Access database
    http://support.Microsoft.com/kb/2748410

    This article updated fingers MS12-060, specifically KB 2687441, as the culprit.

    It turned out that ActiveX controls on the form (specifically the Microsoft Common Controls 6.0 Toolbar), caused the failure.

    The solution was simple: on a patched machine, open each form with an ActiveX control in design mode, compile and save it. It worked for me. Ignore the details of the solution that I wrote in the previous post!

    You may need to resave MSCOMCTL. OCX, as suggested in the article, to get your databases to work.

    -Ken

  • Problem between CTS/CUBE/VCS

    We have a topology that looks like this:

    CTS-> CUCM-> CUBE-> VCS-> telepresence server.

    CTS-3000 s can make calls to the telepresence server, but the other way for a TC-3000 calls fail, with VCS search history gives a too small "Session Timer" error

    I must point out that demand for CTS-1000 units works very well in both directions.

    On the telepresence server, it seems to connect for a second before dropping.  The TP server logs indicate that the CTS-300 has negotiated OK TIP/SIP-MUX, then it disconnects immediately.

    I read documentationon 'Timer Session small' problem between VCS and CUCM and have made the appropriate changes, however I do not know how having a CUBE in the middle would be afefct this

    CUCM version: 8.6

    VCS: 5.1.1

    TP server: 2.2 (1.48)

    CUBE: IOS 15.1

    Hi Nick,

    I'm the engineer who worked on this through your ticket of TAC.  I know that you now have the fix, but I thought that I have would be the bases here in case others come across this thread with a similar problem.

    In this case, the error "Session Timer too small" came from the CUBE itself.  As you mentioned that you have the VCS and the CUCM set to 500, those who are OK.  However, the CUBE was always the default value of 1800 so he sent this error.  The fix for this is to change this value with the following commands:

    voip phone service

    SIP

    min - to 500-500 expires

    However in the end, wasn't the cause of the failure of the actual call.  Changing the value of the cube fixed 'too small logoff' mistakes, but always calls disconnected right after login.  The fix for this turned out be a CUCM configuration change, which I won't go into here.

  • Problem between C40 and Panasonic AW-HE50HE camera

    Hi all

    We have identified a problem between C40 and Panasonic AW-HE50HE camera with HDMI connection.

    The Panasonic camera is configured with the 720 p output, and it can display on a LCD monitor.

    However, we have connected the camera C40 and Panasonic AW-HE50HE with HDMI connection, the C40 show black screen.

    The codec C40 is confirmed as well function and its specification declared support,

    1280 x [email protected]/ * /, 59,94 Hz (720 p 60)

    1280 x [email protected]/ * / Hz (720p50)

    Anyone can provide help for me, thank you,

    Ben Lai

    Hello

    Can you telnet to the codec with the camera connected and check if the codec no video camera and what is the detected resolution.

    Teck Chye

  • create a form with Adobe Acrobat Standard XI: problem - interactive objects

    try to create a form with Adobe Acrobat Standard XI: problem - interactive objects-> activate: hide the form text field-> work-> first it s didn t hide but if you continue to fulfill other things it shows the field hide; What wrong? answer also in German as possible Thx Sascha

    In the boxes use the "Mouse Up" with the action "run a JavaScript.

    Example for the "Ergebnisvergleich", you can use JavaScript the suite:

    field var = this.getField ("Verdeckung Ergebnisvergleich");

    If (event.target.isBoxChecked (0)) {}

    Field.Display = display.hidden;

    } else {}

    Field.Display = display.visible;

    }

  • Automatically manage the gap between objects after resizing

    Is there a way to anchor objects together in InDesign as you anchor an image to a text? I am trying to find a way to maintain a consistent between objects space after resizing occurs.

    Maybe someone will come up with something that would work universally or automatically, but in my way of thinking, the size of a gap between the objects are resized is entirely dependent on the re-sizing methods and sequence applied.

    Maintenance deliberate gap distance can be done easily by the re-sizing digitally through transformation or scaling tool Panel, after choosing the appropriate point of reference to pin the adjacent side away from each object. Most of the other methods (i.e., drag), run a higher risk of tweak away.

  • What is the difference between objects and units in coherence?

    What is the difference between objects and units in coherence?
    For example, < high-units >

    The units are the number of entries of data stored in the coherence of caches.
    The high-units element corresponds to the maximum number of 'units' (entered data, including units in order to backup, not even with objects) allowing to store in a particular JVM for a specific cache coherence. In addition, this number should be the same on all nodes (i.e. use the same cache on all nodes configuration file).
    The objects are the number of entries of data stored in cache coherence excluding the entries for other purposes (for example, backup).

    RE: To get Coherence to report object sizes you need to set the unit-caculator to binary.
    

    If you don caculator-unit set, consistency can use the default setting (set) to the report.

  • MView delta deploy problem between SDDM schema and db (Swap models target dictionary import) - overview of the DDL generation

    Hello

    I'm having a hard time to reverse the difference between my role model and my fusion database schema.

    The initial goal is simple:

    1 / detect differences in metadata

    2 / I SDDM to generate the DDL change code

    (if possible, if not, recreate, reload: powerful existing featured BTW)

    3 / deploy

    4 / check/confirm that no more delta existing

    I do this:

    * menu file > import > dictionary

    * Select connection

    * Select the db schema

    * check the "Swap target model.

    * Select MY_MVIEW > next (TABLE 1 DB object to import) > finish (work "Generate Design")

    * in the model comparison window, I have to deselect everything, less table MY_MVIEW AND also MY_VIEW Materialized View

    (as they appear as 2 SDDM objects)

    DOF Preview button

    I see:

    -comments created in first place (whereas the MVIEW should be recreated)

    which is smaller but still blurs the legibility

    -MY_MVIEW is systematically recreated

    (how many times already I deploy)

    I figured out:

    . SDDM objects tables (disorders, implemented in the MVIEW form) and host MVIEW (Physics) the query independently

    . even if I sync them manually (copy - paste), DDL deployed code is not strictly identical to

    So it may have to do with a dysfunction compare?

    SDDM is full of options to desensitize compares (physical exclusion, storage, etc.), but I found no way to simply compare and align MVIEWs

    (and the documentation is rare on the subject)

    Any clue?

    THX

    Interesting.  Looks like you're it's partitioning that is causing the problem.

    In a model, partitioning information can be held on the objects of physical model for Tables and materialized views.

    In the case where a Table and materialized views are linked together (by the implementation as a Materialized View on physical model Table property), it is information of partitioning that is held on the Table which is relevant.  The information on the Table is used when generating DDL.  And in an import or synchronize, partitioning information are added to the Table object.

    I think that what is happening in your case probably is your model includes some details of partitioning maintained on the Materialized View object.

    Synchronization is combining the details of your database partition to the Table in the model.

    As it does not associate the details of partition of your database with the materialized view in the model object, the comparison shows a difference for the materialized view:-not partitioned in database, but partitioned in your model.  And this difference is causing the drop and re-create the view materialized in the DDL.

    There are various options to work around this:

    1. you can remove details unnecessary partitioning and maintained on the view materialized in your model object.

    2. you can clear the check box for the entry for materialized views in the tree in the dialog box models to compare before making the DOF preview.  (But it also means that no DDL will be generated for all other differences in these materialized views).

    3. you can use the filter properties to filter the relevant properties (e.g., partitioned, partitioning columns and Subpart columns for Materialized View objects), and then select the button refresh trees before performing the DOF preview.  (See the screenshot below).

    David

  • Passing an object of class SolidColor()

    Hello! I want to move an object in the SolidColor class in a single sentence (object), but I get an error: object expected.

    I think I'm passing an object... but I don't know what the problem is: S

    as:

    var color = new SolidColor()

    Color.RGB = {'red': 255, 'green': 255, 'blue': 255}; < -.

    app.backgroundColor = color;

    Instead of:

    var color = new SolidColor()

    Color.RGB.Red = 255;

    Color.RGB.Green = 255;

    Color.RGB.Blue = 255;

    app.backgroundColor = color;

    Thank you!!!

    The only way to do it in one line is:

    app.backgroundColor.rgb.hexValue = "FFFFFF";

  • How to I get rid of the low gap between objects that overlap

    Hello

    I can't get rid of a small gap/line between 2 objects, on that I've used the form generator tool.

    I do the following:

    1. I have 2 objects overlapping

    2. I remove the red section, so I find myself with a pink circle and a red object inside, using the tool shape

    3 if I place an object below the 2 objects, in the same color as the Red object, I get a small line between the 2 red colors. It almost seems like the pink circle and the small red object is not aligned, but they are.

    Skærmbillede 2014-10-28 kl. 13.46.32.png

    I tried to disable Anti aliasing and line up on the grid of pixels, but nothing seems to work.

    There is no way to have 2 objects on top of the other, without going through the bottom, we do a small line/gap?

    Hope you can help me.

    Thanks in advance!

    Actually nothing to do with the form generator tool. The same thing will happen if you built this same object using pathfinder functions.

    It's a problem of screen refresh. It happens because the circle in the background is still there and gets returned due to anti-aliasing.

  • Hypertexe Instance Graph - meaning of the red arrow between objects

    Hello, I use 64-bit JRockit Mission Control hypertexe 4.1.0

    I poured on the docs and can't seem to find the meaning of an arrow red (instead of a black arrow) between two objects in the graph of the instance. The Inspector of the instance also shows a small letter "S" above the icon sqaure for the field in the container class that represents the arrow in the diagram. Also, I can't find any help docuementation or Google seraches which explain the "S".

    Can someone point me to a resource that explains the different icons and encodings in the interface hypertexe color?

    Thank you!

    ~ Brad

    The red color means that it is (probably) a static field reference. For now, the real state is that the source node is an object of java.lang.Class according to the conceptual model of Java, as JVMTI. The "S" also means static field, that I can remember.

  • Problem on hitTestObject within Classes.

    Hello

    I was struggling with the function hitTestObject inside Flash AS 3.0.

    I'm not very experienced with ActionScript 3.0, but I tried to find an answer to this on the internet for a long time.

    The problem is that it gives me either a null reference or 'the enemy' / 'The enemy' is not defined.

    This is the "main.as" file which I cleaned up a bit.

    package {}

    import flash.display. *;

    import flash.ui.Mouse;

    import flash.events. *;

    Game/public class extends MovieClip {}

    public var enemy: enemy = new Foe (internship);

    public var Combo: Number = 0;

    var stageRef:MovieClip;

    public void Game() {}

    stage.addChild (foe);

    stage.addEventListener (Event.ENTER_FRAME, hitTest);

    stage.addEventListener (MouseEvent.CLICK, spawn);

    }

    public void spawn(e:MouseEvent) {}

    trace (MouseX);

    trace (MouseY);

    If (Combo == 0) {}

    Combo = Combo + 1;

    stage.addChild (new Boom (internship));

    }

    ElseIf (Combo == 1) {}

    Combo = Combo + 1;

    stage.addChild (new Boom1 (internship));

    }

    ElseIf (Combo == 2) {}

    Combo = Combo - 2;

    stage.addChild (new Boom2 (internship));

    }

    }

    public void hitTest (internship) {}

    }

    }

    }

    And that is the "Boom" with the hitTestObject.

    package {}

    import flash.utils. *;

    import flash.display.MovieClip;

    import flash.events. *;

    import flash.display.Stage;

    SerializableAttribute public class Boom extends MovieClip {}

    public var stageRef:MovieClip;

    public void Boom (internship) {}

    stageRef = MovieClip (this.root);

    this.addEventListener (Event.ENTER_FRAME, initMovement);

    addEventListener (Event.ENTER_FRAME, hitTest);

    this.stageRef = stageRef; clarify stageRef for instances of the enemy

    This.x = mouseX;

    This.y = mouseY;

    this.scaleX = 0.2;

    this.scaleY = 0.2;

    }

    public void hitTest(e:Event) {}

    If (hitTestObject (stageRef.foe)) {}

    trace ("OI");

    removeEventListener (Event.ENTER_FRAME, hitTest);

    }

    If (hitTestObject (stageRef.Foe)) {}

    trace ("OI");

    removeEventListener (Event.ENTER_FRAME, hitTest);

    //          }

    }

    public void initMovement(evt:Event) {}

    this.scaleX += 0.2;

    this.scaleY += 0.2;

    This.Alpha-= 0.1;

    If (this.alpha < 0) {}

    stage.removeChild (this);

    this.removeEventListener (Event.ENTER_FRAME, initMovement);

    }

    }

    }

    }

    You'll want to probably assign an instance name of your enemy or the enemy objects and use getChildByName:

    stageRef.getChildByName ("foe_name");

  • problem of object

    Hi how are you guys? I hope you all well...

    here...

    IAM having a problem with the object, I want to make the object tables of properties...

    will explain the code that will be better

    first I want to create the object

    a: Object = new Object()

    a.ItemName = itemnamevar

    a.itemprice = itempricevar

    This object and the itemnamevar and the itempricevar are also object (2 text boxes) if the contents of variables

    item.text = itemnamevar

    itempricevar = int (price.text)

    then when I enter the name and price for customers, it will be only one place

    and it will change every time

    for (i: string in a) {}

    ...

    trace() / / here they're going to change every time, I mean after another price and name personal

    }

    so... I need to put these in the table, but I really don't know how this in the object class

    Thank you

    The table will contain every object you create.  As, you will each property of each object dressers vi the object in the table.

    If I missed your intentions, which is quite possible, and your quest for a table is to have tables for properties, which means that you have a single object, but it should have arrays of the same properties, then you would use something like...

    var a: Object = new Object();

    a.ItemName = new Array();

    a.itemprice = new Array();

    a.ItemName.push (itemnamevar);

    a.itemprice.push (itempricevar)

Maybe you are looking for

  • Portege R500 - utility of fingerprint stopped working

    I have a laptop Portege R500. The utility of fingerprint stopped working. First (perhaps after an update of the real Suite Acess Manager was installed a few months ago) it did not work when connecting, but worked for the other passwords. Now it doesn

  • Interface Web links do not always work properly (check the updates, install app)

    OS 6.4.1, RN10200. I have 2 servers ReadyNAS (2 x RN10200). On one, when I click on for example, "check for updates", a pop-up window opens and he tells me that my OS is up to date. When I click on the link even on the other, the arrow device turns i

  • How to keep the RS232 connection

    Hello everyone. I have a problem with the RS232 communication. To activate the connection, I need to send the string "RS232", then the keep alive I send every second CR, but in the meantime, I have to be able to send any other strings without delay o

  • STOP: 0x0000007B error in windows xp so that startup

    Hello! My computer is Windows XP Pro wSP3. When I turn it on, the splashscreen will light up for less than half a second and then the following message appears: A problem has been detected and Windows has shut down to prevent damage to your computer.

  • Add an AudioFileListener to the media application internal bb

    Hi all is it possible to register an AudioFileListener to the media application internal bb? My problem is that the can't do the Application of internal media application object to call Audio.addListener (Application listener). All I have is the Appl