Adobe Dreamweaver Forums



Last 10 THreads :         Suddenly can't see files on remote server (Last Post : Alan - Replies : 4 - Views : 5 )           »          CS4 trials expired too early (Last Post : walla walla - Replies : 5 - Views : 6 )           »          Hacked Possible through local machine (Last Post : Coldstream - Replies : 19 - Views : 41 )           »          roboex32.dll and inetwh32.dll needed in Webhelp? (Last Post : MergeThis - Replies : 3 - Views : 4 )           »          Can Flash Mx buttons operate seporate Dreamweaver MXFrames ? (Last Post : tpwd9904 - Replies : 0 - Views : 1 )           »          Can Flash Mx buttons operate seporate Dreamweaver MXFrames ? (Last Post : tpwd9904 - Replies : 0 - Views : 1 )           »          dumb flex question about mxml arguements (Last Post : Amy Blankenship - Replies : 1 - Views : 2 )           »          extension invalid (Last Post : -=seth=- - Replies : 0 - Views : 1 )           »          DW CS3 won't work on Vista Business (Last Post : Mr Bump 73 - Replies : 0 - Views : 1 )           »          mpg video will play in FF but not in IE (Last Post : Ken Binney - Replies : 1 - Views : 2 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Other Macromedia/Adobe Products > Flex
 
Tags: ,



Reply
  #1 (permalink)  
Old 07-24-2008, 06:43 PM
cesaregb
 
Posts: n/a
Diggs:
Default Drawing with AS3

Hi all,

I wondering if I can draw something with AS3 in the flex, that make any sence
??

what im trying to do is draw something deppending of the data that the flex
have
So I guess I can do this by:

[bullet] Import a flash animation to Flex but I have to give parameters from
flex to the SWF for example a with or height of an object, and i dont know if I
can do that, and if I do how can I.[/bullet]

[bullet] Or making all the AS code of the drawing in a package and run it on
Flex and this show u the dinamic content this make any sence ?? for example I
have this code [/bullet]

var triangleHeight:uint = 8;
var triangleShape:Shape = new Shape();
triangleShape.graphics.beginFill(0x2147AB);
triangleShape.graphics.moveTo(triangleHeight/2, 5);
triangleShape.graphics.lineTo(triangleHeight, triangleHeight+5);
triangleShape.graphics.lineTo(0, triangleHeight+5);
triangleShape.graphics.lineTo(triangleHeight/2, 5);

how can I import it and make it possible in Flex 3 ? In a spesific part of the
stage, for example in the buttom or something like that ???

well I hope make any sence ja, and also hope that u can helpme with this ...
jaja i rather the first working with the swf file =P that make all work easier,
but if you can giveme info for both of them I'll be glad jaja ..

Kind Regards
Cesar Gonzalez



Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-24-2008, 06:59 PM
D_Saito
 
Posts: n/a
Diggs:
Default Re: Drawing with AS3

Hi,

You need to create a class that extends the "UIComponent" class and then add it to your display list.
Reply With Quote
  #3 (permalink)  
Old 07-24-2008, 08:03 PM
Greg Lafrance
 
Posts: n/a
Diggs:
Default Re: Drawing with AS3

Actually, often you do your drawing in a Sprite object and then wrap it is a
UIComponent to be added to display list.

var sprite:Sprite = new Sprite();
sprite.graphics.beginFill(0x2147AB);
sprite.graphics.drawRect(0, 0, 100, 100);
var uic:UIComponent = new UIComponent();
uic.addChild(sprite);
addChild(uic);

Reply With Quote


Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 08:22 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Inactive Reminders By Mished.co.uk