header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
FlashDevil
Points:10
Posts:0

6/17/2010 8:36:19 AM

Title: attaching ruler in scrollpane


Hi,
I am developing design tool application in flash. I have problem regarding scrollpane component. In my application the scrollpane component is having scale displayed on top horizontally and left vertically.
I think I need to create a custom component in which I have to implement the ruler in the scrollpane component which shows the size in inches. But how should I do this I don’t have any idea please guide me. If anybody have solution regarding this.
Help will be really appreciated…


Thanks
Manoj sawant




1
Dave
Points: 790
Posts:1
6/17/2010 9:57:17 AM



you need to extend the verticalScrollBar and horizontalScrollBar and a method on updatedisplaylist method to draw a scale points on the scrollbar using graphics class. It will look something like this

< | | | | | | | | | > The vertical lines are the scale points in cm whatever unit you are using. You have to write some loop to draw points until the length is reached.


2
Inder
Points: 2620
Posts:0
6/18/2010 11:22:46 AM



create a scale component and add it as child to horizontal and verticalscrollbar, below actionscript example is just to demonstrate

// I am considering "scaleComponent" as button, you can use your component which shows scale instead of button
var scaleComponent:Button =new Button();
scaleComponent.label="some scale component";
//to place the scale just below scrollbar
scaleComponent.x=20;
scaleComponent.width=20;
scaleComponent.height=myContainer.horizontalScrollBar.width;
myContainer.horizontalScrollBar.addChild(scaleComponent)


Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 8+7 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions