1. Draw a drawing in as3. the first drawing will be overwritten by the later drawing.
2. Draw an irregular image and connect it with a line. To fill it with a line, you only need to set the fill color.
For example, draw a trapezoid with a gray border.
VaR ladder_draw: SPRITE = new sprite ();
VaR G: Graphics = ladder_draw.graphics;
G. linestyle (1, 0xff0000 );
G. beginfill (N );
G. moveTo (100,100 );
G. lineto (143,100 );
G. lineto (130,120 );
G. lineto (110,120 );
G. lineto (100,100 );
Ladder_draw.buttonmode = true;
Addchild (ladder_draw );
3. If you want to move the mouse over the drawn shape as a hand shape and it feels like a button, you can add an attribute to it.
Ladder_draw.buttonmode = true;
4. After a text box is added to the trapezoid, the set buttonmode is invalid. To solve this problem, you can add an attribute to the text box and set its mouse event to false.
Txt_draw.mouseenabled = false;
5. parse the attributes of the slide bar.
/* Instantiate a slide bar component first (Note: To generate a slide bar normally, you should first drag the slide bar in the component to the Flash file stage and then delete it to make it appear in the library )*/
Private var my_scb: scrollbar = new scrollbar ();
/* Set the direction attribute to scrollbardirection. Horizontal to a horizontal scroll bar, And scrollbardirection. Vertical to a vertical scroll bar */
My_scb.direction = scrollbardirection. vertical;
My_scb.x = 100;
My_scb.y = 100;
My_scb.height = 200;
My_scb.enabled = true;
// This is an important attribute. maxscrollposition is used to set the number of moving parts.
My_scb.maxscrollposition = 20;
// Add a mouse bullet event to the slider
My_scb.addeventlistener (mouseevent. mouse_up, AAA );
Addchild (my_scb );
/* Obtain the current position of the slider when the mouse is up, that is, the number of slides to the next time. Based on this value, you can set the current page number */
Private function AAA (Event: mouseevent ){
Trace (my_scb.scrollposition );
}