First create your window.
The first step is to draw a simple rectangle shape on the main stage to the dimensions that you wish your window to be. Select the rectangle and click F8, save it as a movie clip and give it a relevant name "window" will do, also give it an instance name in the Instance dialogue box [Ctrl + I] once again make it relevant, like "window_mc" for example.
Now we'll make the window's objects.
In the window's movie clip level select the rectangle and click F8 again, call this object "screen" and save as a movie clip, remember to give this object an Instance name [Ctrl + I] something like "screen_mc".
Stay in the window's movie clip level and create a new layer calling it "dragbar layer" then create a rectangle object that will serve as your top bar to your window. make sure the rectangle has the same width as your window object and a height to suit your tastes. Select this object and press F8, call it "dragbar" save as a movie clip and give it a relevant instance name like "dragbar_mc".
Go to the dragbar's movie clip level and select the object click F8 call it "dragbar_button" save as a button object. Within the dragbar's level set the dragbar's x,y coordinates to 0, then go to the window's level and reorient the dragbar movie clip to the x,y coordinates to 0. Do the same for the screen object's level and again reorient it's x,y in the windows level.
Orientation of the objects is crucial as the objects must scale to the same coordinate points.
In the window's level create another layer calling it "resizer layer" and draw a right-angle triangle that will go over the bottom right hand corner of the screen object, keep this object small about 20 x 20 pixels. Select the triangle and press F8 call it "resizer" and save as movie clip. It isn't necessary to give this object an instance name as you won't be calling it directly in the actionscript.
Go to the resizer's level, select the object and press F8 call this object "resizer_button" and save as a button. Set the x,y coordinates for the object so that the right hand corner of the object is at the crosshairs - the easiest way to do this is to enter the coordinates of the width and height of the object into the x and y coordinates respectively, and place a minus sign in front of the values (i.e. if the object is 20 pixels wide and 20 pixels high then the x coordinates is -20 and the y coordinates is also -20). Then go into the window's movie clip level and reposition the resizer object to that it's over the bottom right hand corner of the screen object.
|» Level Basic|
Rating: 8 Votes: 23
|FK ID: BeckySG1 Name: Becky Fryer Age: n.o.y.b. Interests: Flash, Photoshop, Digital & Chemical Photgraphy, CorelDraw, Dreamweaver, Web-Site design, Art & Design.|
|Download the files used in this tutorial.|
|Download (11 kb)|
|More help? Search our boards for quick answers!|