dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: createTextField - flash 8. Broken??

  1. #1
    Grandmaster Flash
    Join Date
    Apr 2004
    Location
    Edinburgh, Scotland
    Posts
    139

    PLEASE HELP!!: createTextField - flash 8

    Hi

    I'm using Flash 8 / AS 2.0.

    I have the following code within a class which extends MovieClip:

    Code:
    	private function addBalloonText(balloonRef:MovieClip):Void
    	{		
    		trace(balloonRef);
    		var tf:TextField = balloonRef.createTextField("_balloonText", 
    						balloonRef.getNextHighestDepth(), 
    						0, 
    						0, 
    						balloonRef._width, 
    						30);
    		trace(tf);
    		var format:TextFormat = new TextFormat();
    		format.color = 0x000000;
    		format.font = "Arial-12";
    		format.size = 12;
    		
    		tf.antiAliasType = "advanced";
    		tf.embedFonts = true;
    		tf.thickness = 20;
        	tf.gridFitType = "pixel";
    		tf.multiline = true;
    		tf.wordWrap = true;
    
    		tf.text = "Here is some dummy text, just for testing";
    		tf.setTextFormat(format);
    		trace("balloon text ref is " + tf);
    	}
    When I pass a reference to my balloon clip (a valid movieclip on the stage) in the method the 'trace(tf);' prints 'undefined'. When I pass a reference to 'this' in the method everything works as expected.

    Any ideas? Is this a bug in flash?
    Last edited by geedubb; 03-20-2006 at 12:26 PM.
    If it ain't broke, don't fix it.

  2. #2
    All 1s and 0s dmonkey's Avatar
    Join Date
    Nov 2005
    Location
    Leeds, UK
    Posts
    606
    What does trace(balloonRef) come back as?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center