PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197
Doubt in Sprite (AS3)
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Doubt in Sprite (AS3)

  1. #1
    Member
    Join Date
    Feb 2010
    Posts
    79

    Unhappy Doubt in Sprite (AS3)

    import flash.display.Sprite
    var circle:Sprite=new Sprite();
    circle.graphics.beginFill(0xFFCC00);
    circle.graphics.drawCircle(200,200,20);
    addChild(circle);

    Please see the above script. In the first line the import scrip is used. I tried this. After removing the first line... Still it is working. No error displayed. Then what is the use of first line. Please reply.

  2. #2
    Member
    Join Date
    Nov 2006
    Posts
    79
    You dont have to import display-classes when coding inside Flash itself. If you are using some other program, like FlashDevelop - you have to import everything.
    Most of the code examples you find online is not written inside Flash.

  3. #3
    Senior Member
    Join Date
    Jun 2008
    Posts
    549
    add this before the addchild(circle);

    Actionscript Code:
    circle.graphics.endFill();

  4. #4
    Member
    Join Date
    Feb 2010
    Posts
    79
    The code is working well. Then why should i use this endFill() line? Is it important?

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