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.

Similar Messages

  • Access another class function

    Hey,
    I am trying to access another class function. I have 2 Classes and my main menu features are in my Main Class and I want to call that function from my Level Class
    What is a good idea to approach this, some how I need to import it in a way but I don't know how I could do that.
    Thanks,
    McbainGames11

    Fixed it myself
    Answer:
                        public static var instance:Main;
                        public function Main()
                                  instance = this;
    And I called a function from Main Class in my Level Class using:
    Main.instance.function();

  • Execute functions in document class when main timeline reaches a frame

    Hi,
    I have 3 functions in my main document class that I want to execute when the main timeline reaches a particular frame number.
    how do I do that?
    see the code and comments
    public function mainClass()
    //stage declaraction
    stage.align = StageAlign.TOP_LEFT;
    stage.scaleMode = StageScaleMode.NO_SCALE;
    stage.addEventListener(Event.RESIZE, stageResized);
    //wrap these next 3 lines in an if statement that says if maintimeline currentframe = x
    position();
    loadXml();
    initArrowButtons();
    slideTimer = new Timer(timer_delay);
    slideTimer.addEventListener(TimerEvent.TIMER, nextSlide);

    It's still undocumented, but something like this would do it:
    package
        import flash.display.MovieClip;
        public class FrameScript extends MovieClip
            public function FrameScript()
                addFrameScript( 3, frameFour );
            private function frameFour():void
                trace( "you have reached Frame 4" );
    You can test this as a documentclass.

  • Access Report Custom Functions from code

    Post Author: leedo
    CA Forum: .NET
    Hello,
    I am using VS2005 (VB) and was able to change formula text from within code using the "FormulaFieldDefinitions" object. However, I am having problems finding out how I can do the same to Report Custom Functions.  The reason I am doing all this is that I noticed during my Windows app is running the source of my .rpt file is thrown in the user "Local Settings\Temp" folder and all code is revealed by simply opening that file. Please help. ThanksLeedo

    Post Author: MJ@BOBJ
    CA Forum: .NET
    It looks like it is not possible to access the custom functions within a report using the CR .NET SDK.  However, to address the potential security issue that you may be concerned about, is this a Windows or ASP.NET application?  If this is an ASP.NET application, then you shouldn't have to worry about the security as the end-user (client) will not be able to access that folder since the rest of the web server is typically unaccessible by the client. 
    Another way to secure your reports is to use what we call "managed reporting" solutions such as Crystal Report Server or Business Objects Enterprise, which manages reports securely and your users are only allowed to access/see what you allow them to.  These solutions also provide public SDKs so you could incorporate the system into your own applications.  For more information, go to www.businessobjects.com/products.

  • 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....

  • 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!

  • Hang Calling function after Document Class' Event.ADDED

    I was trying to load an external SWF (that contains the below code in its document class) with the Loader class but i keep on receiving Error #1009: Cannot access a property or method of a null object reference. So i tried to use the event listener Event.ADDED in MyDocumentClass constructor of the external SWF to let the document class be part of the display list before i invoke createRandomGraph. But when i place createRandomGraph( ) inside onStageReady, The compilation process hangs. When i leave the createRandomGraph( ) inside the constructor, it works perfectly as stand alone but will produce Error 1009 if loaded within the loader SWF. Any ideas?
    public function MyDocumentClass( )
        this.addEventListener(Event.ADDED, onStageReady);
        createRandomGraph( )
    private function onStageReady(oEvent:Event):void
        this.removeEventListener(Event.ADDED, onStageReady);
    private function createRandomGraph( ):void
        var cRandomGraph:RandomGraph = new RandomGraph();
        cRandomGraph.x = 10;
        cRandomGraph.y = stage.stageHeight - nH - 25;
        cRandomGraph.setDimensions(nW,nH);
        cRandomGraph.createGraphBackground();
        this.addChild(cRandomGraph);

    use:
    public function MyDocumentClass( )
        this.addEventListener(Event.ADDED_TO_STAGE, onStageReady);
    private function onStageReady(oEvent:Event):void
        this.removeEventListener(Event.ADDED, onStageReady);
    createRandomGraph();
    private function createRandomGraph( ):void
        var cRandomGraph:RandomGraph = new RandomGraph();
        cRandomGraph.x = 10;
        cRandomGraph.y = stage.stageHeight - nH - 25;
        cRandomGraph.setDimensions(nW,nH);
        cRandomGraph.createGraphBackground();
        this.addChild(cRandomGraph);

  • How to disable the 'Read Only' notification on an Access document when it is opened from within a document library (SP 2010)

    Hello, 
    OK, so I am currently having issues with opening MS Access documents from SP 2010. I have taken an existing database and uploaded it into a document library. Now, when I open this document I get the prompt to open it in either 'Read Only' or 'Edit'. 
    When I select 'Read Only' I can view the document, however I get the 'Read Only - Save As' notification when the document opens up. I have configured the document both from the source (on the original file) and from within SP to disable notifications - (from
    within the Trusted Options selection) 
    Deleted the document and uploaded it again, and the 'yellow bar' notification is still appearing. 
    I want to disable the 'Save As' function, or even hide this when the document is opened. Is this at all possible?? 

    Hi Terry,
    According to your description, my understanding is that you don’t want the yollow bar notification to display when you open Access documents.
    This issue seems to be about the client application. Please compare the followings with the things that you did:
     1.Open the documents
     2.Click File->Options->Trust Center->Trust Center Settings
     3.Click Protected View, unselect ‘Enable Protected View for originating from the Internet’
     4.Click Message Bar, select ‘Never show information about blocked content’
     5.Click Macro Settings, select ‘Disable all macros without notification’
    In addition, as this issue is about Office, I commend you create a new thread in Office forum, more experts will assist you with this issue.
    Office forum:
    http://social.technet.microsoft.com/Forums/en-US/home?category=officeitpro
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • 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;

  • 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.

  • 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.

  • Timeline code to document class code - best practices

    I'm starting to put all of my code in the document class instead of on the main timeline, and I have a few questions. When I was using the timeline, everything was linear. It was easy to know when things would start and end because of how the playhead moves. With the document class, I noticed for the first time that functions are executed simultaneously if you call them one after the other. What would be the best way to make them execute in sequence? Let's say I have functions f1, f2, and f3. I suppose at the end of f1 I could call f2, and at the end of f2 call f3, or use event listeners, but is that the right way to do it? By the time you get to f3, aren't f1 and f2 still "open" because they haven't terminated?

    do you want some appreciable time to transpire between executing f1,f2 and f3?
    if yes, use a timer or timers.  if no, then just call them sequentially. with few exceptions (mainly when loading some external (to flash) file executes code synchronously:
    f1();
    f2();
    f3();

  • Adding "Filter Criteria" to the XSLT List View Web Part impact on "Export to Excel" functionality within Document Library

    Hi there,
    XSLT List View displaying all the list items within the Document Library. In order to implement the Search functionality within Document library out of box "Text Filter" web part is configured as explained below. The solution is similar to
    the one suggested at
    http://www.wonderlaura.com/Lists/Posts/Post.aspx?ID=77
    "Text Filter" Web Part added to the page.
    Filter Criteria (i.e., XSLT List View columns) added to the XSLT List View where the filter parameters take the input from the "Text Filter" Web Part .
      3. Both Web Parts (XSLT List View and the Text Filter) are connected.
    When the search criteria is entered into the "Text Filter" Web Part, it is passed to the relevant Columns of the XSLT List View and the documents (List Items) that match the search criteria are shown within XSLT List View.
    Search functionality working as expected.
    Query: Selecting the "Export to Excel" icon from the ribbon generates the excel spread sheet with no data except Column Titles from the Document library. In the investigation it is
    found that adding the 'Filter Criteria' on XSLT List View is causing this bug. When the Filter Criteria is removed, then "Export to Excel" functionality is working as expected.
    But it is mandatory to add "Filter Criteria" to implement the search functionality with in the document library.
    Help: Help/input appreciated on the work around to get the "Export to Excel" functionality work when the "Filter Criteria"
    exist on the XSLT List View.
    Regards,

    Once again thanks very much for your help Scott. very much appreciated.
    In the investigation it is found that removing the 'Filter Criteria' on XSLT List View makes the "Export to Excel" functionality work. But the 'Filter Criteria' is mandatory to get the 'Document Search' functionality.
    I think that due to technical limitations it should be concluded that 'only custom development can make all work, no code solutions using the SharePoint Designer can meet all the requirements.
    If you can think of any alternative solution that could help in resolving the current issue or fix the issue without any custom implementation please inform. Otherwise this issue would be marked as resolved with your suggested response.
    Regards,

  • Auto-complete not working on variables/functions within a class in FlashBuilder 4.5

    Hi all,
    I'm using Flash Builder 4.5 (not burrito), and I'm not getting auto-complete on variables or functions within the class I'm working in.  It will auto-complete classes, and even variables within another variable, but not a variable within that class.
    As an example, let's say I have a class with this var:
    private var myDate:Date = new Date();
    If I start typing myD, I can't get myDate to autocomplete.  But once I type myDate., I'll get auto-complete for all the variables/functions in the Date class.
    I've tried re-installing FlashBuilder and switching workspaces, but with no luck.
    Also tried creating a brand new test project, but it didn't work there either.
    Anyone have any ideas what might be wrong?
    Thanks!

    Hi,
    After you type "myD" If u press cntrl + space it should auto-complete to myDate. Please raise a bug in http://bugs.adobe.com/flex with the sample project as i am not able to reproduce.
    On the other hand if you were expecting code hint to show up as soon as you type "myD" (without pressing cntrl+space) , Please follow the below step.
    Go to Window -> Preferences -> Flash Builder -> Editor
    check the "use additional custom triggers" check box. Leave the keys as default value .
    That should work for you .

  • 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;

Maybe you are looking for

  • Upgrade from 10.5.8 to 10.5.0 crashes

    Upon receiving my highly anticipated upgrade DVD, I attempted to upgrade my mbp 3,1 15". All went well at first, the progress bar moved steadily and it shut down and rebooted once. Not long after this, with the progress bar about 34% complete, I got

  • IO Wrong asset settlement Issue

    Hi We settlement rule for internal order 2500007 was erroneously set to settle costs to asset 11 (company 123). That asset is already part of a different internal order. Costs from internal order ***0007 were settled to that asset in prior periods(fr

  • Ora10g

    I have a problem with the configuration of oracle 10g, I have installed it and seems all ok,if I execute tnsping the listener respond, but if i try to connect via pl*sql i get the error ora-12514, can anyone give me an advice?

  • Why JSTL change the encoding of response?

    Dear all, I use JSTL to display multiple language, and it can work fine. I also have a servlet to let the user to select the display language. All the request and response encoding is set to UTF-8, but I found that when user choose language to Chines

  • Installing Windows XP Pro alongside Windows 7 & Mac OS/X Snow Leopard

    I am running mac os/x snow leopard. I have partitioned my hard disk three ways: Mac OS (journaled), Windows 7 and a third partition on which I intend to install Windows XP Pro. The 3rd partition is formatted NTFS. My understanding is that if I were t