apibank.blogg.se

Flash actionscript 3.0 coloring book
Flash actionscript 3.0 coloring book








flash actionscript 3.0 coloring book
  1. #FLASH ACTIONSCRIPT 3.0 COLORING BOOK HOW TO#
  2. #FLASH ACTIONSCRIPT 3.0 COLORING BOOK REGISTRATION#
  3. #FLASH ACTIONSCRIPT 3.0 COLORING BOOK CODE#

You will obtain this folder (caurina) after downloading the Tweener class. Inside the scrolling_photos folder place the scrolling_photos.fla, Thumbnail.as, the pics.xml file and the caurina folder. Inside this folder make another folder, and name it pics(inside this folder place your photos).

flash actionscript 3.0 coloring book

Make a folder and name it scrolling_photos.

#FLASH ACTIONSCRIPT 3.0 COLORING BOOK CODE#

Open your text editor copy and paste the code from above add the rest of tags (as much as you like) and save the file as pics.xml.ġ2. The url tag represents the path to the picture. Where represents a new picture in the gallery. * -loop through the xml file, populate the arrayThumb, position the thumbnails and add the thumbnails to bigHolder*/ -set the thum_holder as a mask for the photoContainer Var photoContainer:Sprite = new Sprite() UrlLoader.addEventListener(Event.COMPLETE,urlLoaded) Var urlLoader:URLLoader = new URLLoader() Var urlRequest:URLRequest = new URLRequest("pics.xml") Select frame 1 from the actions layer and press F9 to open the ActionScript panel. In the Property Inspector set its instance name to handler and position it at x=0 and y = 140.ġ0.

#FLASH ACTIONSCRIPT 3.0 COLORING BOOK REGISTRATION#

On the same layer draw another rectangle (width=50, height = 20, stoke = none and color = #FF9900).Convert it to a MovieClip, set its name to handler, the registration point to top left and click Ok. In the Property Inspector set its instance name to track.ĩ. Set its name to track, the registration point to top left and click Ok. Select the rectangle and press F8 to convert it to a MovieClip. On the scrollbar layer draw a rectangle (width = 550, height = 20, x = 0, y = 140, stroke = none, color= #999999). In the Property Inspector set its instance name to thumb_holder.Ĩ. Set its name to thumb_holder, the registration point to top left and click Ok. Set the measurements and the position of the rectangle as fallows: width = 550, height = 135, x = 0 and y = 0. Select the Rectangle tool set the stroke to none, pick a color (the color doesn’t matter because we will use this rectangle as a mask and the color won’t be visible) and on the photos_masker layer draw a rectangle. In the Property Inspector click on the Size button and set the width: 550, height: 200, frame rate: 30, background color: black and click Ok.ħ. Insert two new layers (Insert>Timeline>Layer), name the layers beginning from the top: actions, scrollbar and photos _masker. We will build the Thumbnail class witch is associated with the thumb MovieClip.Ħ.

flash actionscript 3.0 coloring book

Go to File > New select ActionScript file and click Ok. Select the thumb MovieClip from the stage and delete it.Ĥ. Select Export to ActionScript checkbox, set the class name to Thumbnail and click Ok. Right click on the thumb MovieClip and select Linkage. Set its name to thumb and set the registration point to center and click Ok.ģ. Select the Rectangle tool set the stroke to none and the fill to #999999 and on the stage draw a rectangle 110 by 110.Select the rectangle hit F8 to convert it to a MovieClip. Create a new file by going to File > New select Flash file (ActionScript 3.0) and click Ok. This is how the final product will look:ġ. You can add as much photos as you like.For this Flash tutorial we will use the Thumbnail class that we have used in the Photo Gallery tutorial but with some little modification. We will use again the Tweener class to add a nice transition.

#FLASH ACTIONSCRIPT 3.0 COLORING BOOK HOW TO#

In this tutorial we will learn how to scroll some photos that we will load dynamically from an xml file and we will scroll the photos using a custom scrollbar.










Flash actionscript 3.0 coloring book