lineSprite.width = 200;
lineSprite.height = 900;
generally you would want this in the createChildren or measure functions if you were creating a new component, but here you just want it before lineSprite is added to it's parent. Using width or measuredWidth or measuredMinWidth or explicitMinWidth should work.
- Dan
On 8/2/06, wayne_badu_johnson <[EMAIL PROTECTED]> wrote:
Hi
I am having trouble when adding dynamic graphics content to a
container in getting the container to scroll this content.
So in a nutshell, I have some AS adding graphics/lineTo content to a
sprite class and then adding that as a child to a UIComponent, then
adding to a mxml declared container (tried variations Panel, HBox,
Canvas etc). The lines are being drawn however as the drawn conent
is larger than the visible container are I would have thought the
scrollbars for the target container to kick in. Hope this makes some
sense.
Sample:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute" creationComplete="initApp()">
<mx:Script>
<![CDATA[
import mx.core.UIComponent;
private var serviceOwner:UIComponent = new
UIComponent();
private var UICLine:UIComponent = new UIComponent();
private var lineSprite:Sprite = new Sprite();
//
private function initApp():void{
lineSprite.graphics.lineStyle
(2,0xFF0000,100);
lineSprite.graphics.moveTo(100,100);
lineSprite.graphics.lineTo(100,800);
UICLine.addChild(lineSprite);
serviceOwner.addChild (UICLine);
// if of container, currently a HBox
con.addChild(serviceOwner);
}
]]>
</mx:Script>
<mx:HBox width="100%" height="50%" id="con">
</mx:HBox>
</mx:Application>
Any help appreciated
Cheers
Wayne
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
__._,_.___
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
Web site design development | Computer software development | Software design and development |
Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
__,_._,___