Accessing value in document class

hello i am trying to acces a value in the document class. but i can't get it to work.
what i have is:
can someone tell me how i should access the myArray value?
bomberman.as:
package  {
          import flash.display.MovieClip;
          public class bomberman extends MovieClip {
        public var myArray:Array=[]; //trying to access this value
                    public function bomberman() {
                              init();
                              //trace(document.docClass);
                    private function init() {
                    var square:Array=[];
                              for (var i:Number=0;i<11;i++) {
                                        for (var j:Number=0;j<11;j++) {
                                                  var temp:grassSquare;
                                                  if (i==0||i==10) {
                                                            temp=new grassSquare(i*50,j*40);
                                                            addChild(temp);
                                                            square.push(temp);
                                                  } else if (i%2!=0) {
                                                            if (j==0||j==10) {
                                                                      temp=new grassSquare(i*50,j*40);
                                                                      addChild(temp);
                                                                      square.push(temp);
                                                                      myArray.push(false);
                                                            } else {
                                                                      myArray.push(true);
                                                  } else {
                                                            if (j%2==0) {
                                                                      temp=new grassSquare(i*50,j*40);
                                                                      addChild(temp);
                                                                      square.push(temp);
                                                                      myArray.push(false);
                                                            } else {
                                                                      myArray.push(true);
bomberman.fla:
import flash.events.KeyboardEvent
          var User1:Player1=new Player1;
          stage.addEventListener(KeyboardEvent.KEY_DOWN, User1.fl_SetKeyPressed);
          User1.x=75;
          User1.y=60;
          addChild(User1);
Player1.as:
package  {
          import flash.display.MovieClip;
          import flash.events.Event;
          import flash.events.KeyboardEvent
          import flash.ui.Keyboard
          public class Player1 extends MovieClip {
          private var upPressed:Boolean = false;
          private var downPressed:Boolean = false;
          private var leftPressed:Boolean = false;
          private var rightPressed:Boolean = false;
          private var currentSquare:uint=12;
                    public function Player1() {
                              this.addEventListener(Event.ENTER_FRAME, fl_MoveInDirectionOfKey);
                              //stage.addEventListener(KeyboardEvent.KEY_DOWN, fl_SetKeyPressed);
                    public function fl_MoveInDirectionOfKey(event:Event)
                                        if (upPressed && this.y>=100 /*&&document.myArray[currentSquare-1]*/)
                                                  this.y -= 40;
                                                  upPressed = false;
                                                  currentSquare-=1;
                                        if (downPressed && this.y<=340 /*&& this.myArray[currentSquare+1]*/)
                                                  this.y += 40;
                                                  downPressed = false;
                                                  currentSquare+=1;
                                        if (leftPressed && this.x>=125 /*&& /*this.myArray[currentSquare-11]*/)
                                                  this.x -= 50;
                                                  leftPressed = false;
                                                  currentSquare-=11;
                                        if (rightPressed && this.x<=425 /* && /*this.myArray[currentSquare+11]*/)
                                                  this.x += 50;
                                                  rightPressed = false;
                                                  currentSquare+=11;
                                        trace(currentSquare);
                              public function fl_SetKeyPressed(event:KeyboardEvent):void
                                        switch (event.keyCode)
                                                  case Keyboard.UP:
                                                            upPressed = true;
                                                            break;
                                                  case Keyboard.DOWN:
                                                            downPressed = true;
                                                            break;
                                                  case Keyboard.LEFT:
                                                            leftPressed = true;
                                                            break;
                                                  case Keyboard.RIGHT:
                                                            rightPressed = true;
                                                            break;

i have this code now and it gives me a bunch of errors. could someone tell me what's going wrong ?
errors are in the red code.
C:\Users\Jannes\Desktop\dev\Player1.as, Line 25
1093: Syntax error.
C:\Users\Jannes\Desktop\dev\Player1.as, Line 27
1084: Syntax error: expecting identifier before this.
C:\Users\Jannes\Desktop\dev\Player1.as, Line 27
1084: Syntax error: expecting colon before minusassign.
C:\Users\Jannes\Desktop\dev\Player1.as, Line 28
1084: Syntax error: expecting rightbrace before semicolon.
C:\Users\Jannes\Desktop\dev\Player1.as, Line 31
1084: Syntax error: expecting rightparen before if.
C:\Users\Jannes\Desktop\dev\Player1.as, Line 31
1084: Syntax error: expecting identifier before dot.
C:\Users\Jannes\Desktop\dev\Player1.as, Line 31
1093: Syntax error.
C:\Users\Jannes\Desktop\dev\Player1.as, Line 33
1084: Syntax error: expecting identifier before this.
C:\Users\Jannes\Desktop\dev\Player1.as, Line 33
1084: Syntax error: expecting colon before plusassign.
C:\Users\Jannes\Desktop\dev\Player1.as, Line 34
1084: Syntax error: expecting rightbrace before semicolon.
C:\Users\Jannes\Desktop\dev\Player1.as, Line 37
1093: Syntax error.
C:\Users\Jannes\Desktop\dev\Player1.as, Line 39
1084: Syntax error: expecting identifier before this.
C:\Users\Jannes\Desktop\dev\Player1.as, Line 39
1084: Syntax error: expecting colon before minusassign.
C:\Users\Jannes\Desktop\dev\Player1.as, Line 40
1084: Syntax error: expecting rightbrace before semicolon.
C:\Users\Jannes\Desktop\dev\Player1.as, Line 43
1084: Syntax error: expecting rightparen before if.
C:\Users\Jannes\Desktop\dev\Player1.as, Line 43
1084: Syntax error: expecting identifier before dot.
C:\Users\Jannes\Desktop\dev\Player1.as, Line 43
1093: Syntax error.
C:\Users\Jannes\Desktop\dev\Player1.as, Line 45
1084: Syntax error: expecting identifier before this.
C:\Users\Jannes\Desktop\dev\Player1.as, Line 45
1084: Syntax error: expecting colon before plusassign.
C:\Users\Jannes\Desktop\dev\Player1.as, Line 46
1084: Syntax error: expecting rightbrace before semicolon.
package  {
          import flash.display.MovieClip;
          import flash.events.Event;
          import flash.events.KeyboardEvent
          import flash.ui.Keyboard
          public class Player1 extends MovieClip {
          private var upPressed:Boolean = false;
          private var downPressed:Boolean = false;
          private var leftPressed:Boolean = false;
          private var rightPressed:Boolean = false;
          private var currentSquare:uint=12;
                    public function Player1() {
                              this.addEventListener(Event.ENTER_FRAME, fl_MoveInDirectionOfKey);
                              //stage.addEventListener(KeyboardEvent.KEY_DOWN, fl_SetKeyPressed);
                    public function fl_MoveInDirectionOfKey(event:Event)
                                        if (upPressed && this.y>=100 && MovieClip(root).myArray[currentSquare-1]*/)
                                                  this.y -= 40;
                                                  upPressed = false;
                                                  currentSquare-=1;
                                        if (downPressed && this.y<=340 && MovieClip(root).myArray[currentSquare+1]*/)
                                                  this.y += 40;
                                                  downPressed = false;
                                                  currentSquare+=1;
                                        if (leftPressed && this.x>=125 && MovieClip(root).myArray[currentSquare-11]*/)
                                                  this.x -= 50;
                                                  leftPressed = false;
                                                  currentSquare-=11;
                                        if (rightPressed && this.x<=425 && MovieClip(root).myArray[currentSquare+11]*/)
                                                  this.x += 50;
                                                  rightPressed = false;
                                                  currentSquare+=11;
                                        trace(currentSquare);
                              public function fl_SetKeyPressed(event:KeyboardEvent):void
                                        switch (event.keyCode)
                                                  case Keyboard.UP:
                                                            upPressed = true;
                                                            break;
                                                  case Keyboard.DOWN:
                                                            downPressed = true;
                                                            break;
                                                  case Keyboard.LEFT:
                                                            leftPressed = true;
                                                            break;
                                                  case Keyboard.RIGHT:
                                                            rightPressed = true;
                                                            break;

Similar Messages

  • Read Document Class Characteristics Values (Class Type 017)

    Hi Gurus,
    I want to read values of Document Class Characteristics (Class Type 017).
    Is there any Functional Module available for this?
    Best regards,
    Abir.

    Hi ,
    Use this BAPI   BAPI_DOCUMENT_GETDETAIL2 to get the details of class and char values for particular documents.
    kindly enter the data about the DIR and mark the ent
    DOCUMENTTYPE                  DRW
    DOCUMENTNUMBER            2000
    DOCUMENTPART                 000
    DOCUMENTVERSION            00
    GETOBJECTLINKS                       X
    GETCOMPONENTS
    GETSTATUSLOG
    GETLONGTEXTS                          X
    GETACTIVEFILES
    GETDOCDESCRIPTIONS               X
    GETDOCFILES                             X
    GETCLASSIFICATION                    X
    GETSTRUCTURE
    GETWHEREUSED
    HOSTNAME
    INHERITED
    Here whatever marked as a 'X' BAPI will return the values for particular DIR.
    Use TCODE SE37 for executing this BAPI or get the help of your technical person.
    Regards
    Abhiji A. Pachgade

  • Access a mc or textfeild from a non document class.

    Hey all.
    This use to be simple in as2, but seems to allude me from as3.  It used to be simple to access an object you put on the stage like a mc or dynamic text field by simply using _root.instanceName ect.  Now I see references to making references to the Stage and such like:
    private var stage:Stage;
    stage = stageRef;
    and I am still confused.
    What I have going on is, I have placed a movieclip on the stage in Flash and gave it an instance name of Cell_mc.
    I have a cusom class that extends MovieClip with the following imports
    import flash.display.MovieClip;
    import flash.events.Event;
    import flash.events.EventDispatcher;
    import flash.events.MouseEvent;
    import flash.events.TimerEvent;
    import flash.utils.Timer;
    This Class is tied to a set of MovieClips in my Library.
    I have a listener: this.addEventListener(MouseEvent.MOUSE_DOWN,pickUp);
    And a function:
    private function pickUp(event:MouseEvent):void
                      this.startDrag();
                      _interval = new Timer(100);
                      _interval.addEventListener(TimerEvent.TIMER,onInterval);
                      _interval.start();
    And
    private function onInterval(event:TimerEvent):void
                      //Set up hit test
                      this.hitArea(Cell_mc)
                            trace("hit");
    I get the following error whenever I try to access an object I placed on the stage from anywhere other than the document class:
    1120: Access of undefined property Cell_mc.
    How do I access the cell_mc that is already on the stage from this non-document class?
    Thanks guys.

    try:
    private var stage:Stage;
    stage = stageRef;
    and I am still confused.
    What I have going on is, I have placed a movieclip on the stage in Flash and gave it an instance name of Cell_mc.
    I have a cusom class that extends MovieClip with the following imports
    import flash.display.MovieClip;
    import flash.events.Event;
    import flash.events.EventDispatcher;
    import flash.events.MouseEvent;
    import flash.events.TimerEvent;
    import flash.utils.Timer;
    This Class is tied to a set of MovieClips in my Library.
    I have a listener: this.addEventListener(MouseEvent.MOUSE_DOWN,pickUp);
    And a function:
    private function pickUp(event:MouseEvent):void
                      this.startDrag();
                      _interval = new Timer(100);
                      _interval.addEventListener(TimerEvent.TIMER,onInterval);
                      _interval.start();
    And
    private function onInterval(event:TimerEvent):void
                      //Set up hit test
                      this.hitArea(MovieClip(root).Cell_mc)
                            trace("hit");
    I get the following error whenever I try to access an object I placed on the stage from anywhere other than the document class:
    1120: Access of undefined property Cell_mc.
    How do I access the cell_mc that is already on the stage from this non-document class?
    Thanks guys.

  • Accessing document class function within timeline

    Hi have a very simple question,
    (Bear with me I'm still quite new to as3 and some of my terminology may not be solid)
    I want to access a function that is within my document class when a movie clip on the timeline has played to a specific point (being the end).
    I have already been able to call another function from the document class at the top/root level (it is called to initialize all clips and buttons when you click on the "enter" button on the splash screen.
    Problem is that I cannot call another function (in the document class) from a movie clip within a movie clip on the timeline. Is there an easy way to do this? I have considered writing a separate class for the movie clip and then adding it onto the movie clip (using the property panel). I don't really want to do it this way because I am already using a base class on that movie clip and 3 others that use a set of generic functions.

    >>I want to access a function that is within my document class when a  movie clip on the timeline has played to a specific point (being the  end).
    Your document class should add a listener to the clip and the clip should dispatch an event when it's complete. You could dispatch your own event or use one of Flash's like Event.COMPLETE. Something like:
    in clip
    dispatchEvent(new Event(Event.COMPLETE));
    and in your doc class
    clipOnTimeline.addEventListener(Event.COMPLETE, classMethod);
    >>I have already been able to call another function  from the document class at the top/root level (it is called to  initialize all clips and buttons when you click on the "enter" button on  the splash screen.
    You really should avoid mixing timeline and document class code. Better would be for your doc class to add a listener to the button and call a method within the class when it's clicked.

  • Problem accessing function within my Document Class

    Hi there,
    I have a Document Class which dynamically adds a MovieClip to
    my FLA. The MovieClip is in the FLA library and has "Export for
    ActionScript" setup for it and this is how I'm accessing the
    MovieClip from my Document Class.
    The problem is that when the MovieClip is finished (it has a
    timeline animation and a stop() method applied to the last frame of
    the animation) I want it to call a function that is placed within
    my Document Class, but simply calling the function (e.g.
    displayEnterButton();) is displaying an error of....
    1180: Call to a possibly undefined method
    displayEnterButton.
    Can anyone help here, I'm sure it's a simple issue to
    resolve.
    Many thanks!
    Kind regards,
    M.

    Hi,
    I've managed a work around to this.
    Basically, in my Document Class after the code that adds the
    MovieClip to the Display List, I then setup a Timer that called a
    function every 100 milliseconds. This function would then check the
    current frame of the loaded MovieClip. If the current frame of the
    MovieClip was equal to the last frame of the MovieClip then I would
    know the animation had finished and would call the next function I
    needed.
    I've pasted the code below in case anyone was interested....

  • How can a textInput variable access a document Class?

    I have a document class which creates a body of text on-the-fly at runtime.  I am trying to figure out (though I haven't taken any steps to do so yet) how to use a textinput field on the stage of a Flash document that calls the Document Class "MyClass" (just for example's sake").  The class file is MyClass.as and is located in the same directory as the FLA and resultant SWF.  I would like that textInput.text value to change the body text of the MyClass text.  The reason I am using MyClass is because I am performing special visualizations with the text that are encapsulated in MyClass.
    Thanks in advance for any feedback.
    -markerline

    I hadn't realized that this import was what was necessary.  Thank you.  However now with the imported property and my EnterFrameEvent, the rendered text is still not updating.
    Here is my complete Document Class:
    package
        import away3d.containers.ObjectContainer3D;
        import away3d.extrusions.TextExtrusion;
        import away3d.primitives.TextField3D;
        import flash.events.Event;
        import flash.display.MovieClip;
        import wumedia.vector.VectorText;
        import flash.text.TextField;
        import flash.text.TextFieldType;
        public dynamic class FontExtrusionDemo extends Away3DTemplate
            [Embed(source="Fonts.swf", mimeType="application/octet-stream")]
            protected var Fonts:Class;
            protected var container:ObjectContainer3D;
            protected var extrusion:TextExtrusion;
            protected var text:TextField3D;
            public var txtFld:TextField;
            public var myString:String;
            public function FontExtrusionDemo()
                super();
            protected override function initEngine():void{
                super.initEngine();
                this.camera.z=0;
                VectorText.extractFont(new Fonts());
            public function setString():void{
                this.myString=myString;
                txtFld= new TextField();
                txtFld.x=txtFld.y=20;
                txtFld.width =100;
                txtFld.height=20;
                txtFld.border=txtFld.background=true;
                txtFld.type=TextFieldType.INPUT;
                addChild(txtFld);
                stage.focus=txtFld;
            protected override function initScene():void{
                super.initScene();
                myString="1";
                setString();
                text = new TextField3D("Vera Sans",{
                    text:myString,
                    align: VectorText.CENTER}
                extrusion = new TextExtrusion(text, {
                    depth: 10,
                    bothsides:true}
                container = new ObjectContainer3D(text, extrusion, { z:300 });
                scene.addChild(container);
            protected override function onEnterFrameEvent(event:Event):void{
                super.onEnterFrameEvent(event);
                text = new TextField3D("Vera Sans",{
                    text:String(txtFld.text),
                    align: VectorText.CENTER}
                extrusion = new TextExtrusion(text, {
                    depth: 10,
                    bothsides:true}
                //container = new ObjectContainer3D(text, extrusion, { z:300 });
                //scene.addChild(container);  // IF I UNCOMMENT THIS THEN A NEW CHILD WILL BE ADDED AT EVERY FRAME, which is not desired.
                container.rotationY=(container.rotationY+1)%360;
                if (container.rotationY>90&&container.rotationY<270){
                    text.screenZOffset=10;
                } else {
                    text.screenZOffset=-10;

  • Unable to access values from database in login page..

    Hey all,
    Friends I have a login.jsp page and I want if i enter username and password then it will be accessed from database and after verifying the details it will open main.jsp.I made a database as "abc" and created DSN as 1st_login having table 1st_login. But the problem is that I am unable to access values from database.
    So Please help me.
    Following is my code:
    <HTML>
    <body background="a.jpg">
    <marquee>
                        <CENTER><font size="5" face="times" color="#993300"><b>Welcome to the"<U><I>XYZ</I></U>" of ABC</font></b></CENTER></marquee>
              <br>
              <br>
              <br>
              <br><br>
              <br>
         <form name="login_form">
              <CENTER><font size="4" face="times new roman">
    Username          
              <input name="username" type="text" class="inputbox" alt="username" size="20"  />
              <br>
         <br>
              Password          
              <input type="password" name="pwd" class="inputbox" size="20" alt="password" />
              <br/>
              <input type="hidden" name="option" value="login" />
              <br>
              <input type="SUBMIT" name="SUBMIT" class="button" value="Submit" onClick="return check();"> </CENTER>
              </td>
         </tr>
         <tr>
              <td>
              </form>
              </table>
    <%
    try {
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection connection = DriverManager.getConnection("jdbc:odbc:1st_login");
    Statement statement = connection.createStatement();
    String query = "SELECT username, password FROM 1st_login WHERE username='";
    query += request.getParameter("username") + "' AND password='";
    query += request.getParameter("password") + "';";
    ResultSet resSum = statement.executeQuery(query);
    //change: you gotta move the pointer to the first row of the result set.
    resSum.next();
    if (request.getParameter("username").equalsIgnoreCase(resSum.getString("username")) && request.getParameter("password").equalsIgnoreCase(resSum.getString("password")))
    %>
    //now it must connected to next page..
    <%
    else
    %>
    <h2>You better check your username and password!</h2>
    <%
    }catch (SQLException ex ){
    System.err.println( ex);
    }catch (Exception er){
    er.printStackTrace();
    %>
    <input type="hidden" name="op2" value="login" />
         <input type="hidden" name="lang" value="english" />
         <input type="hidden" name="return" value="/" />
         <input type="hidden" name="message" value="0" />
         <br>
              <br><br>
              <br><br>
              <br><br><br><br><br>
              <font size="2" face="arial" color="#993300">
         <p align="center"> <B>ABC &copy; PQR</B>
    </BODY>
    </HTML>
    and in this code i am getting following error
    C:\Project\SRS\build\generated\src\org\apache\jsp\loginjsp.java:93: cannot find symbol_
    C:\Project\SRS\build\generated\src\org\apache\jsp\loginjsp.java:93: cannot find symbol_
    C:\Project\SRS\build\generated\src\org\apache\jsp\loginjsp.java:94: cannot find symbol_
    C:\Project\SRS\build\generated\src\org\apache\jsp\loginjsp.java:95: cannot find symbol_
    4 errors
    C:\Project\SRS\nbproject\build-impl.xml:360: The following error occurred while executing this line:
    C:\Project\SRS\nbproject\build-impl.xml:142: Compile failed; see the compiler error output for details.
    BUILD FAILED (total time: 6 seconds)

    As long as you're unable to compile Java code, please use the 'New to Java' forum. This is really trival.
    To ease writing, debugging and maintenance, I highly recommend you to write Java code in Java classes rather than JSP files. Start learning Servlets.

  • Document Class vs Timeline code differences...

    I'm trying to hunt down some kind of class conflict I seem to be having when using TweeLite easing and found out the same code that errors in a document class works fine if I place it in the timeline.
    Example - this works in frame one of the timeline:
    import com.greensock.TweenLite;
    import com.greensock.easing.*;
    TweenLite.to(obj, 1, { x:200, ease:Bounce.easeOut } );
    If however I make a very simple document class like so:
    package
          import com.greensock.TweenLite;
          import com.greensock.easing.*;
          import flash.display.MovieClip;
          public class Main extends MovieClip
               public function Main()
                    TweenLite.to(obj, 1, { x:200, ease:Bounce.easeOut } );
    I get an error when compiling:
    1119: Access of possibly undefined property easeOut through a reference with static type Class.
    So what's the differences between using a document class and timeline code?

    Odd... seems to have been a caching issue. I renamed the class, rebooted, and deleted ASO files and now it's working. Funny thing is that I never need to delete ASO files before... any thoughts on why this would stay cached?
    And, after rebooting I can make changes and don't need to delete ASO files either.
    Thanks!

  • Changing a document class to an imported class

    Hello everybody!
    My following document class is working fine. But, when I want to import it instead of using as a document class, it reports an error "1067: Implicit coercion of a value of type Class to an unrelated type flash.display:DisplayObject.". My class code is here:
    package
    import flash.display.Sprite;
    import flash.display.Shape;
    import flash.text.TextField;
    import flash.events.MouseEvent;
    public class Shapes extends Sprite
      var square: Sprite = new Sprite();
      var txt: TextField = new TextField();
      public function Shapes()
       square.graphics.lineStyle(4, 0xFF66CC);
       square.graphics.beginFill(0x990066);
       square.graphics.drawRect(250, 35, 175, 175);
       square.graphics.endFill();
       square.buttonMode = true;
       addChild(square);
       square.addEventListener(MouseEvent.CLICK, clickHandler);
       txt.text = "A Child of the Square";
       square.addChild(txt);
      function clickHandler(ev: MouseEvent): void
       if (square.numChildren > 0)
        square.removeChild(txt);
    My FLA file script is as below:
    import Shapes;
    addChild(Shapes);
    Seeking help, please!

    You need to create an instance of the class Shapes and tha add this isntance
    i.e. something like this
    var shapes: Shapes = new Shapes();
    addChild( shapes );

  • Please help with an error "could not write value key \Software\classes\iTune.wav.....

    I have windows 7 with plenty of memory and storage capacity. When accessing iTunes I had an error message to uninstall and reinstall. I have uninstalled but when trying to reinstall I get the error message "could not write value key \software\classes\iTune.wav. Verify that you have sufficient access to that key or contact your support personnel"  I don't understand what this means, can anyone help please?

    For "Could not open key/write value" errors when reinstalling try b noir's user tip:
    "Could not open key: UNKNOWN\Components\[LongStringOfLettersAndNumbers]\
    [LongStringOfLettersAndNumbers]" error messages when installing iTunes for Windows.
    The technique can be applied to the branch of the registry mentioned in the error message.
    If you still have issues see Troubleshooting issues with iTunes for Windows updates.
    tt2

  • Why only final variables can be accessed in an inner class ?

    Variables declared in a method need to declared as final if they are to be accessed in an inner class which resides in that method. My question is...
    1. Why should i declare them as final ? What's the reason?
    2. If i declare them as final, could they be modified in inner class ? since final variables should not modify their value.

    (Got an error posting this, so I hope we don't end up with two...)
    But what if i want to change the final local variable within that method instead of within anonymous class.You can't. You can't change the value of a final variable.
    Should i use same thing like having another local variable as part of method and initializing it with the final local variable?You could do. But as in the first example I posted you are changing the value of the nonfinal variable not the final one. Because final variables can't be changed.
    If so, don't you think it is redundant to have so many local variables for so many final local variables just to change them within that method?If you are worried that a variable might be redundant, don't create it. If you must create it to meet some need then it's not redundant.
    Or is there any alternate way?Any alternate way to do what?

  • ADDED event in document class after removed from Stage

    Hi All,
    I am currently play with the document class (the class acts as main) constructor for a SWF file.
    package {
      import flash.display.*;
      import flash.events.*;
      public class TestSymbol extends MovieClip
        public function TestSymbol()
          this.addEventListener(Event.ADDED, function(event:Event) { trace(event.eventPhase, event.target, event.currentTarget, "added triggered"); });
          trace("parent", this.parent);
          this.stage.removeChild(this);
          trace("stage", this.stage);
    In frame script 1, i put
    trace("1");
    trace("parent", this.parent);
    After i run TestSymbol.swf and  i got
    parent [object Stage]
    stage null
    2 [object TestSymbol] [object TestSymbol] added triggered
    1
    parent null
    I wonder where is this ADDED event coming from? If the document class is added to some other objects, why its parent is null after the event?
    Thanks in advance
    Sam

    By wrapper do you mean they are the same object or the MainTimeLine is a separate object being added to DocumentClass, as it triggers the ADDED event? I know that framescript can be accessed as documentClass functions, so I thought they are the same object, maybe i was wrong.
    I did a new test within some more listeners
    package {
      import flash.display.*;
      import flash.events.*;
      public class TestSymbol extends MovieClip
        public function TestSymbol()
          this.addEventListener(Event.ADDED_TO_STAGE, addedToStageListener);
          this.addEventListener(Event.ADDED, addedListener)
          this.addEventListener(Event.REMOVED_FROM_STAGE, removedFromStageListener);
          this.addEventListener(Event.REMOVED, removedListener);
          trace("parent", this.parent);
          this.stage.removeChild(this);
          trace("stage", this.stage);
         private function addedListener(event:Event):void {
           trace(event.eventPhase, event.target, event.currentTarget, "added triggered");
         private function addedToStageListener(event:Event):void {
           trace(event.eventPhase, event.target, event.currentTarget, "addedToStage triggered");
         private function removedListener(event:Event):void {
           trace(event.eventPhase, event.target, event.currentTarget, "removed triggered");
         private function removedFromStageListener(event:Event):void {
           trace(event.eventPhase, event.target, event.currentTarget, "removedFromStage triggered");
    and this is the output
    parent [object Stage]
    2 [object TestSymbol] [object TestSymbol] removed triggered
    2 [object TestSymbol] [object TestSymbol] removedFromStage triggered
    stage null
    2 [object TestSymbol] [object TestSymbol] added triggered
    As the remove listeners are fired immediately, i don't think the queue is waiting until the end of the constructor.

  • IPM & CIS and Document Class creation

    If I've to setup a new Content Management System with process management, what are the advantages I get if I integrate UCM with IPM?
    1. Can't IPM provide the versioning and document management features?
    2. How can I create various document classes (as in Documentum, FileNet)? The idea is to create various document classes and associate folders and workflows with those classes. Thus once created, documents automatically go into workflow. Note that workflows can be associated with folders. I want them to be associated with document types.
    Thanks

    Its more along the lines of how do I get started. This is part of my homework for my Intro to Programming class. What I have so far is
    package cardCode
         import flash.display.MovieClip;
         public class Card extends MovieClip
              public var cardValue:Number;
              public var cardSuit:String;
              public function card() {
              // constructor code
    I don't know how to go about assigning values and suits. The final outcome wil be so that you can compare two cards and a trace statement will appear stating which card wins.

  • Children swf timeline code vs document class.

    Hey all,
    I am loading a swf into another and had a question that I can't seem to find an answer to.
    I am trying to find out why when I place trace(parent); in the timeline of my child swf I get [object Loader]
    but if i place  trace(parent); in the constructor of the child swf's document lcass I get null.
    Why is this and how would I access the parent swf  from the child document class if it shows as null?
    Thanks

    The constructor is running before the swf has been added to the stage of the parent. Use the Event.ADDED_TO_STAGE event in the document class of the swf being loaded, and once it fires trace parent.

  • Uploading a document as something other than a Document class

    We have created a new subclass of the Document class with
    additional attributes that we need for all documents being
    uploaded into the system. Is there any way (without rewritting
    the upload web page) to assign all documents being uploaded as
    the new class instead of having them default to Document?
    Thanks.

    Hi,
    you can use the ClassSelectionParser to do the same. The class
    selection parser would have to be set up as documented in the
    9iFS developer documentation (chapter 9). The parse option must
    be on when you are uploading files through the protocols.
    Note that the class selection parser can be set up to have a
    default asscoiation through the asterisk (*) key. When this is
    done, all documents of any extension that are put in iFS will get
    created as instances of your custom subclass
    here is an XML example to achieve the above. But please do refer
    to the doc. set to get a better understanding of the class
    selection parser itself
    <!-- SETTING UP DEFAULT ASSOCIATION with CLASSSELECTIONPARSER -->
    <?xml version='1.0' standalone='yes'?>
    <PropertyBundle>
    <Update
    reftype='valuedefault'>ParserLookupbyFileExtension</Update>
    <Properties>
    <Property action='add'>
    <!-- Add a default association with a certain class -->
    <Name> * </Name>
    <Value datatype='string'>
    oracle.ifs.beans.parsers.ClassSelectionParser</Value>
    </Property>
    </Properties>
    </PropertyBundle>
    <!-- SETTING UP CLASS ASSOCIATION -->
    <?xml version='1.0' standalone='yes'?>
    <PropertyBundle>
    <Update
    reftype='valuedefault'>IFS.PARSER.ObjectTypeLookupbyFileExtension
    </Update>
    <Properties>
    <Property action='add'>
    <!-- Add a default association with a custom class -->
    <Name> * </Name>
    <!-- MyCustomClass is the classname ofyour class -->
    <Value datatype='string'>MyCustomClass</Value>
    </Property>
    </Properties>
    </PropertyBundle>
    thanks
    Sirisha

Maybe you are looking for

  • How can I see if the extra content has been downloaded?

    I am using Garageband, the newest version, and I recently purchased the Additional Sounds pack. How can I tell or see if these additional sounds have been downloaded? This is urgent please help! Thanks.

  • Macbook pro having multiple problems?

    Today, my Macbook pro started freezing up while I was using safari. This happens to me often, so I just held the restart button like I usually do and restarted it (that always fixes it). Only this time, when the computer restarted, it didn't make the

  • Why such poor quality saturation and contrast with NEFs?

    Having used Lightroom since the beginning, I'm at my wits end. Ever since Lightroom 1, I've noticed that ACR does a really -really, bad job handeling NEFs when you push contrast and saturation, especially in regards to certain colors (reds, yellows,

  • Reconfigurar cuenta

    hace unos dias perdi mi 4S ya lo cambie por un 5.... en el momento que quiero hacer una compra en i tunes o app store, me piden unas preguntas de seguridad las cuales no recuerdo, para esto me dicen que reconfigure mi cuenta por medio de un correo e

  • Ipod touch not working at all and wont register to charge...help!!

    My son has a 4th gen. ipod touch. He had it on sleep mode for an hour and now it isnt working at all. It wont turn on and it wont register when we try to charge it. Any suggestions on whats wrong with it??