Posts filed under ‘Adobe Flash CS3’

Flash Tutorial – Embed Fonts in ActionScript 3

For users who prefer to learn Flash visually we have a range of Adobe Flash CS3 video tutorials, this method of training greatly enhances learning and allows beginners to master even the most complex aspects of Adobe Flash with ease.
View the Adobe Flash CS3 Training Videos.

.

Dynamically Embed Font In Actionscript 3.0

In this Flash tutorial we’ll be looking at how to embed Flash font dynamically using Actionscript 3.0. If you’ve ever used text in your Flash applications you’ve probably noticed that when you preview your Flash file the text doesn’t always render properly. Look at the image below as an example. The first example “Text Example A” has been embedded with Actionscript and the second example “Test Example B” was typed out on the stage using the basic text tool. You can clearly see the difference in the two.

Embedding your flash font also has other advantages;

  • Embedded font characters are anti-aliased, making their edges appear smoother, especially for larger text.
  • You can rotate text that uses embedded fonts.
  • Embedded font text can be made transparent or semitransparent.
  • You can embed almost any type of font on your system.

Step 1 – Library Panel

Our first task is to create a new font symbol to do this we need to open up the Library Panel (Window – Library). Inside the library panel we create a new font by clicking the drop down arrow and selecting New Font from the drop down box, this will open up the Font Symbols Properties Dialog Box. Inside the dialog box we define a name for our font symbol and select the font styles and properties that we require.

 

We then export our Font Symbol for Actionscript so that Actionscript has access to the font symbol. To do this we Right Click the font name and select Linkage from the drop down menu.

 

Once we select Linkage from the menu the Linkage Properties Box pops up. Inside the Linkage properties box we check the “Export For Actionscript” checkbox and give it a class name, in this case we’ve just kept the default class name that flash has provided for us.

So to recap;

  1. Open the library panel (Window – Library).
  2. Select New Font from the Library Panel menu.
  3. Enter a name for the font in the Name field.
  4. Select the font and styles that you require for the application.
  5. Right click the new font inside the library and select Linkage.
  6. Check the export for Actionscript checkbox.
  7. Give it a unique class name or keep the default name (Font1).

Step 2 – Adding Actionscript

Our next task is to create some Actionscript so select the first Keyframe on the timeline and press F9 to open up the actions panel. We need to create a text field for the text so we create a new TextField object and call it flashText. This creates an instance of the TextField class and gives us access to all the properties, methods and events of that class.

var flashText:TextField = new TextField();

Our TextField is empty so we use the text property to fill it with the text of our choice, in this case it’s “Text Example A”.

flashText.text = “Text Example A”;

We can position the TextField where we want on the stage by changing the X and Y properties. The X and Y properties in Actionscript are measured in pixels and the default value is 0.

flashText.x = 25;

flashText.y = 30;

 We want to access the font that we created in step one, by creating a new instance of the Font1 symbol object gives us access to it. We’ll name this object myFont.

var myFont:Font = new Font1();

Next we create a TextFormat object called textFormat, again giving us access to all the properties, methods and events available to that class. The TextFormat class will allow us to change the size and font properties.

var textFormat:TextFormat = new TextFormat();

This line sets the font property to the flashText object’s fontName property. Essentially making sure the textFormat font property is using the font we have embedded.

textFormat.font = myFont.fontName;

Set the text size of the text to 26px.

textFormat.size = 26;

The autoSize property controls automatic sizing and alignment of text fields. We’ll us this property to align the text inside the TextField to left-justified text, this just works in the same way as left justified in a word document for example.

flashText.autoSize = TextFieldAutoSize.LEFT;

The defaultTextFormat property specifies the format applied to newly inserted text, it sets the TextFormat properties to the TextField.

flashText.defaultTextFormat = textFormat;

Setting the TextField embedFonts value to true tells the Flash Player to use the embedded font instead of the default device font.

flashText.embedFonts = true;

Setting the antiAliasType property to AntiAliasType.ADVANCED sets the text inside the TextField to anti-aliasing to advanced anti-aliasing. This allows the font to be shown at a high quality when using smaller font sizes.

flashText.antiAliasType = AntiAliasType.ADVANCED;

The addChild()method adds the TextField to the stage, making it visible when the file is previewed.

addChild(flashText);

Code In Full;

var myFont:Font = new Font1();
var textFormat:TextFormat = new TextFormat();
textFormat.font = myFont.fontName;
textFormat.size = 26;
var flashText:TextField = new TextField();
flashText.autoSize = TextFieldAutoSize.LEFT;
flashText.defaultTextFormat = textFormat;
flashText.embedFonts = true;
flashText.x = 25;
flashText.y = 30;
flashText.antiAliasType = AntiAliasType.ADVANCED;
flashText.text = “Text Example A”;
addChild(flashText);

November 5, 2008 at 4:26 pm 1 comment

Flash Tutorial – Drawing Shapes with ActionScript

For users who prefer to learn Flash visually we have a range of Adobe Flash CS3 video tutorials, this method of training greatly enhances learning and allows beginners to master even the most complex aspects of Adobe Flash with ease.
View the Flash CS3 Tutorial Videos .

.

Flash Tutorial – Drawing Shapes with ActionScript

This Flash Tutorial follows on from the “Drawing Lines and Shapes in Flash Tutorial

Now we have managed to draw a straight line and a curve lets move on to making shapes. After reading this Flash Tutorial you should be able to dissect the code and use it in your own Flash content

Download Files Used in this tutorial

Drawing a Rectangle
We’ll first create a new Sprite object called container, this will hold all our shapes graphical information. This was covered in our last tutorial, but just as a reminder we shall briefly cover the steps again.

var container:Sprite = new Sprite();

We add the new Sprite object to the stage by using the addChild() method, using the addChild() method makes adds it to the display list essentially making it visible when you preview or publish the file.

addChild(container);

This next line is optional when drawing shapes and only has a use when you want to give your shape a specific outline colour. The lineStyle() method lets us style the outline of the shape. It has 3 parameters available to it thickness, colour and alpha scale. Thickness is measured in pixels, colour in decimal format and alpha, which is an optional parameter, is measure in percent (1 = 100%, .25 = 25%). We assign the method to the graphics property and then assign the graphics property to our Sprite object so that all the graphic information resides inside the Sprite object.

container.graphics.lineStyle(2,0x000ff0,.4);

We want to fill the rectangle with a colour. We use the beginFill() method to fill it with a colour of our choice. The beginFill() method has 2 parameters avalible to it colour and alpha scale, again the alpha scale is optional. In the code below we’ve given it the colour red and set the alpha scale to 80%.

container.graphics.beginFill(0xff0000, .8);

Now that we have the colour and outline properties it’s time to draw out the rectangle. Drawing the rectangle itself is pretty straight forward, using the drawRect() method we set the properties we require for the rectangle. The drawRect() method requires 4 parameters, X and Y values, and width and height. The X and Y values indicate the position of where you want to draw out the rectangle, and the width and height determine the size of the rectangle. In our code we’ve positioned the rectangle to a position of 20px by 20px and set the size to 100px by 100px.

container.graphics.drawRect(20,20,100,100);

To finish off the rectangle we use one final method called the endFill(). The endFill() method closes off the beginFill() method, basically telling it we no longer require the colour fill as we’ve finished the rectangle.

container.graphics.endFill();

Drawing a Round Rectangle

Drawing a round rectangle requires a little more thought, first we give it some line styles and colour fill properties using the lineStyle() and beginFill() methods just like we did previously. To draw a round rectangle we use the drawRoundRect() method, this method requires 6 parameters. The first 4 parameters are the same as the drawRect() method as they declare the position and size of the rectangle. It’s the last 2 parameters ellipseWidth and ellipseHeight that create the round corners of the rectangle, ellipseWidth measured in pixels declares the width of the ellipse and ellipseHeight measures the height of the ellipse. In our code the round rectangle has the ellipse width and height of 20px respectively.

Tip; An ellipse is a curve for which the sum of the distances from each point on the curve to two fixed points is equal.

container.graphics.lineStyle(4,0×000044);
container.graphics.beginFill(0×333333);
container.graphics.drawRoundRect(300,50,200,75,20,20);
container.graphics.endFill();

Drawing a Circle

Drawing a circle is straight forward, again we create the style and colour fill using the lineStyle() and beginFill() methods. To draw the circle itself we use the drawCircle() method, the drawCircle() method requires 3 parameters, X and Y values and a radius value. The X and Y values indicate where you want the circle positioned and the radius measured in pixels declares the size of the circle itself. Our circle below is positioned at 200px by 80px and has a radius of the 50px.

container.graphics.lineStyle(2,0xff0000,.4);
container.graphics.beginFill(0x00ff00, .8);
container.graphics.drawCircle(200,80,50);
container.graphics.endFill();

November 5, 2008 at 12:38 am 2 comments

Flash Tutorial – Drawing Lines and Shapes with ActionScript

For users who prefer to learn Flash visually we have a range of Adobe Flash CS3 video tutorials, this method of training greatly enhances learning and allows beginners to master even the most complex aspects of Adobe Flash with ease.
View the Flash CS3 Tutorial Videos .

.

Flash Tutorial – Drawing Lines and Curves using Actionscript 3.0

We all know you can create shapes and lines in Flash using the many drawing tools, but did you know you can unleash the power of ActionScript to create shapes on the fly.

In this Flash tutorial we’ll be looking at how to draw lines and curves using Actionscript 3.0. In the examples below we’ll use methods from graphics class to draw out the lines and curves. The benefit of drawing in Actionscript rather than using tools from the Flash interface is that it makes for a much smaller file size. Below we’ll go through the code line by line and draw out the line and curve in shown in the example .swf file.

Download the SWF File

Drawing Lines
First thing we’ll look at is how to draw a simple line. We’ll first create a new Sprite object called “container”, this will hold all our graphical information for the line. A Sprite is just a Movie-Clip without a Timeline.

Open up Flash and launch the Actions Panel.

var container:Sprite = new Sprite();

To display the new Sprite object or add it to the stage we use the addChild() method. This makes it visible when you preview or publish the file.

addChild(container);

Next we want to draw the line itself, our first task is to choose the style of the line. To do this we use the lineStyle() method, the lineStyle() method has 3 parameters available to it thickness, colour and alpha scale. Thickness is measured in pixels, colour is in decimal format and finally alpha scale, which is an optional parameter measured in percent (1 = 100%, .5 = 50%). We assign this method to the graphics property and then assign that graphics property to the Sprite object, so that everything is added to the Sprite object.

container.graphics.lineStyle(3,0×333333);

Now that we have the style properties of the line it’s time to decide on our starting point. The starting point will indicate where we are drawing from, to declare the starting point we use the moveTo() method. This method requires 2 parameters, X and Y position. The X and Y values will indicate the starting position of where we want to draw from.

container.graphics.moveTo(20,20);

We have the starting points and are now ready to draw the line. The starting point needs an ending point or somewhere to draw to. Using the lineTo() method we declare the point we’re drawing to. The lineTo() method uses the same parameters as the moveTo() method, the only difference is with the lineTo() method we’re declaring where we are drawing to instead of where we are drawing from.

container.graphics.lineTo(450, 20);

It is possible to draw shapes by continuing to use the lineTo() method, as Actionscript executes in linear fashion we can also change the style of the line at any given point. Adding the code below to the code we’ve already written draws a small rectangle, we draw out the rectangle but change the style of the line by inserting a new lineStyle() method. This means the last two lines will be drawn in red.

container.graphics.lineTo(450,50);
container.graphics.lineStyle(3,0xff0000);
container.graphics.lineTo(20, 50);
container.graphics.lineTo(20,20);

Drawing Curves
Drawing curves is also pretty straight forward but instead of using the lineTo() method we use the curveTo() method. The curveTo() method also works with the moveTo() method to determine our starting point. The curveTo() method however requires 4 parameters, x and y positions of the curve and X and Y positions of the ending point. Using this code below will give us a nice red curve.

var curve:Sprite = new Sprite();
addChild(curve);
curve.graphics.lineStyle(3,0xff0000);
curve.graphics.moveTo(50,150);
curve.graphics.curveTo(225, 0, 450, 150);

For a more clear explanation look at the diagram below, you can see the moveTo() starting points indicated by the arrow. The curveTo() parameters are also highlighted in green, the first 2 parameters show the X and Y points of the curve. The final 2 parameters also highlighted in green show the X and Y points of where the ending point of the curve is.

In the next Flash Tutorial we will move on to creating Shapes with ActionScript

November 3, 2008 at 6:48 pm 1 comment

Flash CS3 Tutorial – Event Handling

For users who prefer to learn Flash visually we have a range of Adobe Flash CS3 video tutorials, this method of training greatly enhances learning and allows beginners to master even the most complex aspects of Adobe Flash with ease.
View the Flash CS3 Tutorial Videos .

.

Interactivity with Flash – Event Handling
The code used in this Flash Tutorial is mainly ActionScript 2.0 with notes for using ActionScript 3.0

This tutorial comprises an introduction to interactivity in Flash, including the underlying principle of Event Handling.
Please note that Event Handling changed significantly between ActionScript 2.0 and 3.0.

Interactivity is one of the main reasons for using Flash to deliver applications and components. It allows you to create rich and stimulating experiences for the user with relative ease. The core concept for delivering interactive results in Flash is Event Handling. A number of functions within the ActionScript language provide you with the means to detect and respond to user interaction. Each time the user ‘interacts’ with your Flash movie, for example using the mouse, one or more ‘events’ is generated; your ActionScript code then has the ability to ‘handle’ these events.
To demonstrate, we will create a simple Flash movie with some interactivity built in. Open Flash and create a new document, then draw a shape on the stage and convert it to a symbol (with the shape selected, press F8 of choose Modify > Convert to Symbol). Give the symbol a name and select Movie clip as the type:

Now give the clip an instance name by selecting it on the stage and entering ‘myclip_mc’ as the Instance Name on the Properties panel (Window > Properties > Properties or F3 if it isn’t visible):

Create a new layer in your movie (press the Insert Layer button on the timeline or choose Insert > Timeline > Layer):

With the new layer selected, open the Actions Panel (press F9, choose Window > Actions or click on it if it’s already visible); this is where we will keep our ActionScript code. First we will detect the user clicking on the clip symbol, in order to do this enter the following code (ActionScript 2.0):

myclip_mc.onPress = function() { trace(“press”); };

This code instructs the movie to listen for the mouse press event on the movie clip symbol, and, when a mouse press is detected, to execute the code within the brackets. This statement is assigning a function to the movie clip onPress event, meaning that Flash Player should carry out the function whenever the event fires.

If you’re using ActionScript 3.0, your code will be slightly different:

myclip_mc.addEventListener(“onPress”, clipPressed);
function clipPressed() { trace(“press”); };

This code has the same effect as the code above. It tells the movie to listen for the onPress event on myclip_mc and then execute the code within the clipPressed function specified.

Test your movie (CTRL + Enter or Control > Test Movie); click on the shape, you should see “press” written to the output panel:

To demonstrate a different event, change onPress to onRelease in your ActionScript code and test the movie again; you should see that the output only now appears when you release the mouse button (test this by clicking and holding it for a moment before release).

There are many events that ActionScript can listen for. For example, to detect the mouse cursor rolling over your movie clip, change onPress (or onRelease) to onRollOver. Test your movie, then roll the mouse on and off the shape; the event should fire each time the cursor moves onto the shape. Try changing onRollOver to onRollOut and test again. This time the event fires when the cursor moves off the shape.

Experiment with the different events to familiarise yourself with them; you can also use button symbols, which have a degree of interactivity built-in, meaning that you may need to write less (if any) ActionScript code yourself.

October 28, 2008 at 1:22 pm Leave a comment

Flash CS3 Tutorial – Create a Custom Scrollbar with ActionScript

For users who prefer to learn Flash visually we have a range of Adobe Flash CS3 video tutorials, this method of training greatly enhances learning and allows beginners to master even the most complex aspects of Adobe Flash with ease.
View the Flash CS3 Tutorial Videos .

.

Would you like to be able to create your own cool, custom Flash Scroll Bar. This Flash Tutorial shows you how, with a little bit of ActionScript 3 you’ll be on your way.

Flash CS3 Tutorial – Create a Custom Scrollbar with ActionScript

In this tutorial we’ll look at how to create a custom scrollbar using Flash and Actionscript 3.0. In the download file (To download right click and save target as ) we have 3 main graphics, two arrows and a rectangle. The two arrows will act as our scrollbar navigation allowing us to scroll up or down. The rectangle will act as the slider and will work in the same way as the scrollbar in your browser window. We’ll create a TextField and connect it to the movie clips using actionscript allowing the text to scroll with the scrollbar.

Downloads for this Flash Tutorial
Example SWF File
Download FLA File
(To download right click and save target as )

Lesson 1 – Setting Up The Movie-Clips

First we need to convert the arrow and rectangle graphics into Flash Movie-Clips, and give them each unique instance names.

Select the rectangle, press F8, choose Movie-Clip from the type options and click Ok.

Click the new Movie-Clip to make sure it’s selected and go down to the properties inspector and type “slider” inside the text box. This will give the Movie-Clip the instance name “slider” and allow us to control the Movie-Clip with Flash Actionscript.

Repeat this step for the up and down arrow graphics but give them the instance names upArrow and downArrow respectively.
Step 2 Setting Up The Text Field

In this step we’ll create the text that will be controlled by the scrollbar, instead of using the basic text tool to create the text we’re going to dynamically create it using actionscript. We’ll use the TextField and TextFormat classes to create, format and position the text on the stage. Below we’ll break the code down line by line to see what it all does.

If you haven’t already done so select the first keyframe on the timeline and press F9 to open up the actions panel.

First we create a new TextField object called theText. This creates a new instance of the TextField class giving us access to all the properties, methods and events inside that class.

var theText:TextField = new TextField();
Next we create a TextFormat object called theFormat, again giving us access to all the properties, methods and events available to that class. The TextFormat class will allow us to change the size and font properties.

var theFormat:TextFormat = new TextFormat();

At the moment our TextField is empty so we fill it with some text using the text property.

theText.text = “This is a custom made scrollbar. At quod soleat voluptua pri, congue copiosae vulputate ea vel, sit solum facer dicta ne. Sit vide singulis voluptatum cu, est et porro nominati iudicabit, ius et dicit perfecto volutpat. Altera iriure incorrupte est eu, et usu graece fuisset, pri libris epicurei neglegentur an. Usu nibh velit accusata cu, pro ad graecis phaedrum indoctum. Facilis nusquam id ius, ut sonet legimus has. Veniam eruditi graecis sed ei, est id alterum dolorum omittantur. Libris semper quo cu, ius rationibus delicatissimi signiferumque ut, in enim elit corpora sit. Et ius aliquam bonorum ancillae, vix ei quis atqui. Debet dicunt senserit ne sed, solum ponderum persecuti eos et, ullum antiopam expetenda usu eu. Eu nec doming everti nominavi, eu mea falli utroque facilis. An quot quas sonet sit, id vim laudem dolorum, ne vel veritus denique constituto.”;

Sets the text size to 15px.

theFormat.size = 15;

Using the setTextFormat()method sets the font property to the theText object’s theFormat property. In simple terms it combines the TextFormat properties to the TextField.

theText.setTextFormat(theFormat);

Setting the wordWrap value to true will word wrap the text inside the TextField.

theText.wordWrap = true;

Currently all of the text sits on a single line, setting the multiline value of the TextField to true will ensure that the text will appear on multiple lines.

theText.multiline = true;

We want to position the TextField alongside the scrollbar, so we change the X and Y positions of the TextField to 100px respectively.

theText.x = 100;
theText.y = 100;

At the moment our TextField size is really small, we resize it by changing the width and height values to 300px and 160px respectively.

theText.width = 300;
theText.height = 160;

The addChild method adds the TextField to the stage, making it visible when you preview the file.

addChild(theText);

Step 2 – Setting Up The Scroll Arrows

In this step we’ll give the up and down arrows some MouseEvents and functions, enabling us to manipulate the position of the text inside the TextField.
When you hover over a link on the Internet the cursor state changes from an arrow to a hand pointing, to create the same effect with Actionscript we set the buttonMode value to true. Setting the buttonMode value of the up and down arrows to true gives us the hover state effect.

upArrow.buttonMode = true;
downArrow.buttonMode = true;

The arrows on the stage need to listen for mouse clicks, we use the addEventListener()method to achieve this. The addEventListener()methods below each have three parameters class type, property and unique name. The main parameters in our code are MouseEvent and CLICK, selecting MouseEvent gives us access to the MouseEvent class and inside that class we choose the CLICK property. Finally we name them scrollUP and scrollDown respectively.
upArrow.addEventListener(MouseEvent.CLICK, scrollUP);
downArrow.addEventListener(MouseEvent.CLICK, scrollDown);
At the moment nothing happens when we click the up and down arrows, we need to create some functions for the scrollUP and scrollDown event listeners. We want the text in the TextField to scroll up or down depending on which arrow is clicked, with the use of the scrollV property and a little math this can be accomplished. The scrollV property allows us to manipulate the vertical position of the text inside the TextField; it’s measured in lines making it easy to change the text’s position inside the TextField. Inside the scrollUP function we subtract the scrollV value by one each time the function fires, essentially subtracting one line of text each time the up arrow is clicked. For the scrollDown function the opposite is required and we add one each time.
function scrollUP(event:MouseEvent):void {

theText.scrollV -=1;

}
function scrollDown(event:MouseEvent):void {

theText.scrollV += 1;
}
Step 3 – Controlling The Slider
The final and most difficult step of this Flash tutorial is controlling the slider. We’ll create boundaries to control where the slider can and cant scroll too. We’ll then create some eventListener()methods and functions to attach the TextField to the slider.
First we create a new Rectangle object called area to create some boundaries for the slider. The arguments for the Rectangle object are x position, y, position, width and height. In our case we want the boundaries to start at the same position as the slider position, we do this by declaring the x and y positions as slider.x and slider.y. For the width and height of the Rectangle argument we specify 0 and 90 respectively, 0 because we don’t want to be able to move the slider horizontally and 90 because the height of our slider background on the stage is 90px.

var area:Rectangle = new Rectangle(slider.x, slider.y,0,90);

The next step is to create some mouse events for the slider so that we’re able to drag the slider. We’ll use MOUSE_UP and MOUSE_DOWN events from the MouseEvent class that’ll allow us to drag and drop the slider. One noticeable difference between the 2 methods is that the sliderOut event listener is attached to the stage and not the slider, if we attached it to the slider the scrollbar would continue to scroll even when we click away from the slider. Attaching it to the stage gets around this problem.

slider.addEventListener(MouseEvent.MOUSE_DOWN, sliderDrag);
stage.addEventListener(MouseEvent.MOUSE_UP, sliderOut);

As stated before we want to be able to drag and drop the slider, creating functions with the methods startDrag() and stopDrag makes this simple. startDrag() you’ll notice has 2 parameters false and area, the first parameter is a Boolean value called lockCentre. The lockCenter value is set to false, locking to the point where you first click. The second parameter bounds is a Rectangle value that allows us to specify a rectangle boundary area, we’ve already created the boundary inside the area Rectangle object so we call that by typing “area” for the second parameter. The stopDrag() method doesn’t require any parameters as it just cancels the drag.

function sliderDrag(event:MouseEvent):void {
slider.startDrag(false,area);
}

function sliderOut(event:MouseEvent):void{
slider.stopDrag();

}

Next we have to create some EventListeners() to listen for a SCROLL event and an ENTER_FRAME event. The SCROLL event will listen for when the text inside theText TextField is being scrolled. The ENTER_FRAME fires constantly at the same rate as the frame rate. We’ll name these EventListeners() textScrolled and theSlider respectively. In the next step we’ll create some functions for these EventListeners.

theText.addEventListener(Event.SCROLL, textScrolled);
theText.addEventListener(Event.ENTER_FRAME, theSlider);
At the moment the slider drags up and down within the boundaries specified earlier but it doesn’t actually scroll the text. To scroll the text with the slider we create a function with a small calculation that attaches the text position to the slider position.  First we set the vertical position of theText TextField equal to Math.round making sure the calculation gives us a whole number, remember we want to scroll down line by line otherwise we’d end up having some lines getting cut off. Inside the brackets we create the calculation, we’re looking for how far the slider has scrolled so we subtract the sliders y position by the area’s y position and multiply that by the maximum scroll value of the TextField, then finally divide that value by the height of our area (90).

function theSlider(event:Event):void
{
theText.scrollV = Math.round ((slider.y – area.y)* theText.maxScrollV/90)
}

When we click either the up or down arrows the slider doesn’t move position. To make this scrollbar complete we want the slider to move in conjunction with the text when we scroll with the arrow buttons. Inside the function we’ll create a small calculation so that the slider follows the text position. First we set the slider.y position to the y position of our area rectangle. We add that to the calculation inside the brackets. The calculation adds the vertical position of our text (theText.ScrollV), multiplied by the height of the of our boundary area (90) and divides it by theText Textfields maximum ScrollV position.
function textScrolled(event:Event):void
{
slider.y = area.y + (theText.scrollV * 90/theText.maxScrollV);
}

October 27, 2008 at 10:55 pm Leave a comment

Newer Posts


Follow us on Twitter


Follow

Get every new post delivered to your Inbox.