(Either JavaScript is not active or you are using an old version of Adobe Flash Player. Please install the newest Flash Player.) //Create the URLLOader instance var myLoader:URLLoader = new URLLoader() //the data will come as URL-encoded variables myLoader.dataFormat = URLLoaderDataFormat.VARIABLES //Load using an URLRequest, even beeing local myLoader.load(new URLRequest("about.txt")) //onLoad handler listener myLoader.addEventListener(Event.COMPLETE, onDataLoad) //Error handling myLoader.addEventListener(IOErrorEvent.IO_ERROR, onIOError) myLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onSecurityError) //Could be an error or just a message myLoader.addEventListener(HTTPStatusEvent.HTTP_STATUS, onHTTPStatus) //add a listener for the complete event function onDataLoad(evt:Event){ Title_txt.text = evt.target.data.Title Comments_txt.text = evt.target.data.Comments } //error callbacks function onIOError(evt:IOErrorEvent){ trace("IOError: "+evt.text) } function onHTTPStatus(evt:HTTPStatusEvent){ trace("HTTPStatus: "+evt.status) } function onSecurityError(evt:SecurityErrorEvent){ trace("SecurityError: "+evt.text) } 11. Simple Scrollbar 12. Nice Scrollbars
Step 1. Create a Default Flash document e.g. width 550, height 400. Using the rectangle tool (R) to draw a rectangle, Stroke Height is 2 and the Fill Colour is #BED0BF. This is a pretty good scrollbar for scrolling text or other objects within your Flash movie. It doesn't require too much coding and it uses simple ActionScript commands that most people learn soon after getting Flash Designer. It resizes itself automatically for the number of lines in your HTML text field. Once it's complete, you can insert it into any SWF with an HTML text field or edit field, add two lines of code to your project, and have a working scrollbar. You can click an arrow to move the text up or down one line, click and drag the bar, or click in the track to make the text "jump" several lines. |
| ww_w___.j__av___a_2_s.__c___o__m_ | Contact Us |
| Copyright 2009 - 12 Demo Source and Support. All rights reserved. |
| All other trademarks are property of their respective owners. |