• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

combining 2 grahics or more into one

New Here ,
Sep 13, 2009 Sep 13, 2009

Copy link to clipboard

Copied

Using AS3 code, is it possible to combine 2 graphics or more into one?

Example : combining a rectangle and a triangle to make a nice arrow?

TOPICS
ActionScript

Views

584

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Sep 13, 2009 Sep 13, 2009

Do you know anything about AS3 drawing API - I guess this is what you need to use:

This is an example of how one can draw rectangle:

var sp:Sprite = new Sprite();

sp.graphics.beginFill(0xff0000);

sp.graphics.drawRect(0, 0, 100,200);

sp.graphics.endFill();

addChild(sp);

Read:

http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/Graphics.html

And this:

http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00000176.html

Votes

Translate

Translate
LEGEND ,
Sep 13, 2009 Sep 13, 2009

Copy link to clipboard

Copied

Yes, it is possible.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 13, 2009 Sep 13, 2009

Copy link to clipboard

Copied

Do you have a handy example for whatever shapes?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 13, 2009 Sep 13, 2009

Copy link to clipboard

Copied

Do you know anything about AS3 drawing API - I guess this is what you need to use:

This is an example of how one can draw rectangle:

var sp:Sprite = new Sprite();

sp.graphics.beginFill(0xff0000);

sp.graphics.drawRect(0, 0, 100,200);

sp.graphics.endFill();

addChild(sp);

Read:

http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/Graphics.html

And this:

http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00000176.html

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 13, 2009 Sep 13, 2009

Copy link to clipboard

Copied

many thanks

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 13, 2009 Sep 13, 2009

Copy link to clipboard

Copied

LATEST

You are very welcome.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines