learning actionscript 3 0 by rich shupe with zevan rosser pdf

creating flash widgets with flash cs4 and actionscript 3.0

creating flash widgets with flash cs4 and actionscript 3.0

... discuss ActionScript 3.0 If you’re already familiar with ActionScript 3.0, you may skip ahead to the next chapter Moving Up to ActionScript 3.0 ActionScript 3.0 (AS3) was released with Flash CS3 and ... “Void” with “void” and “_x” with “x” In AS2, values that represented percent were expressed as 0–100, like in the following: mc._alpha = 30; In AS3, they are now expressed in the 0–1 range ... a good book on the subject, get Foundation ActionScript 3.0 with Flash CS3 and Flex by Sean McSharry, Steve Webster, and Todd Yard (friends of ED, 2007) This book will teach you all the fundamentals

Ngày tải lên: 17/07/2014, 09:30

94 380 0
Học Actionscript 3.0 - p 1 ppsx

Học Actionscript 3.0 - p 1 ppsx

... 4Learning ActionScript 3.0, Second Editionby Rich Shupe with Zevan Rosser Copyright © 2011 Rich Shupe and Zevan Rosser All rights reserved Printed in Canada Published by O’Reilly Media, Inc., 1005 Gravenstein ... Input 327 What’s Next? 333 Chapter 12 Video 335 Encoding 336 Components 340 Full-Screen Video 343 Captions 344 Writing Your Own Player 350 What’s Next? 358 ... Sounds 301 Buffering Sounds 307 Changing Sound Volume and Pan 308 Reading ID3 Metadata from MP3 Sounds 311 Visualizing Sound Data 313 Visualizing Microphone Input 322 Recording,

Ngày tải lên: 06/07/2014, 18:20

10 354 0
Học Actionscript 3.0 - p 2 doc

Học Actionscript 3.0 - p 2 doc

... and ISBN. For example: Learning ActionScript 3.0, Second Edition, by Rich Shupe with Zevan Rosser (O’Reilly). Copyright 2011 Rich Shupe and Zevan Rosser, 978-1-449-39017-4. If you feel your ... O’Reilly Media, Inc. 1005 Gravenstein Highway North Sebastopol, CA 95472 (800) 998-9938 (in the United States or Canada) (707) 829-0515 (international or local) (707) 829-0104 (fax) We have ... including one that focuses on ActionScript 2.0 to 3.0 migration. Push Yourself Although this book was written for a reader still finding his or her way with ActionScript 3.0, we’ve tried to include

Ngày tải lên: 06/07/2014, 18:20

10 338 0
Học Actionscript 3.0 - p 5 pptx

Học Actionscript 3.0 - p 5 pptx

... example, will display “Learning ActionScript 3.0 Shupe Rosser” in Flash Professional’s Output panel: trace ("Learning ActionScript 3.0", "Shupe", "Rosser"); Variables and ... two ways to cast data, both shown here, and both with pros and cons horizontalLocation = Number ("300"); horizontalLocation = "300" as Number; The first example, using the format ... recom-mend Learning Flash CS4 Professional by Rich Shupe (O’Reilly) for a starter book on the Flash interface and Essential ActionScript 3.0 by Colin Moock (O’Reilly) for a more complete ActionScript

Ngày tải lên: 06/07/2014, 18:20

10 308 0
Học Actionscript 3.0 - p 7 pot

Học Actionscript 3.0 - p 7 pot

... mdArray1: Array = [ "a" , "b" , [ "c" , "d" ]]; var mdArray2: Array = [ "e" , "f" ]; mdArray2 push ([ "g" , "h" ]); To access values ... "hairy" , "funny" , "bouncy" ]; 2 var nounsSally: Array = [ "daddy" , "mommy" , "sister" ]; 3 var verbsSally: Array = [ "drove" , "swam" ... "swam" , "ran" ]; 4 5 var adjsClaire: Array = [ "tall" , "snuggly" , "clean" ]; 6 var nounsClaire: Array = [ "duck" , "birdy" , "chipmunk"

Ngày tải lên: 06/07/2014, 18:20

10 311 0
Học Actionscript 3.0 - p 8 pps

Học Actionscript 3.0 - p 8 pps

... addChild(txtFld); 3 4 txtFld.textColor = 0xFF0000; 5 6 var str:String = "Hello World!" ; 7 var len:int = str.length; 8 var i:int = 0; 9 10 this.addEventListener(Event.ENTER_FRAME, onEnter, false, 0, true); ... property syntax, some with and some without leading underscores, in 3.0 no properties begin with the underscore character Second, some value ranges that used to be 0–100 are now 0–1 Examples include ... not only 0–9 but also A–F 00 is no color and FF is all color, for each pair 0x000000 is black (no colors), and 0xFFFFFF is white (all colors) The color used in this script is all red, no

Ngày tải lên: 06/07/2014, 18:20

10 303 0
Học Actionscript 3.0 - p 9 pps

Học Actionscript 3.0 - p 9 pps

... 30 function onScaleUp(evt:MouseEvent):void { 31 box.scaleX += 0.2; 32 box.scaleY += 0.2; 33 } 34 function onScaleDown(evt:MouseEvent):void { 35 box.scaleX -= 0.2; 36 box.scaleY -= 0.2; 37 } 38 ... is, 360 degrees is one full rotation around a circle, bringing you back to degree 0 (720 degrees is twice around the circle and also equates to 0). Similarly, 370 degrees is equivalent to 10 ... scripting shortcut aided by ActionScript. When specifying a rotation higher than 360 degrees, ActionScript will understand the fact that an angle of rotation can- not exceed 360 and use the correct

Ngày tải lên: 06/07/2014, 18:20

10 521 0
Học Actionscript 3.0 - p 10 ppsx

Học Actionscript 3.0 - p 10 ppsx

... 1.0 or 2.0. AVM1, (which stands for ActionScript Virtual Machine 1) is reserved for SWFs that use ActionScript 1.0 and/or ActionScript 2.0, while AVM2 is used for SWFs that use ActionScript 3.0. ... with ActionScript 1.0 or 2.0, you may have heard that you should avoid using the _root property. That’s because the value of the property was subject to change. Before ActionScript 3.0, ... What’s Next? One of the most dramatic changes introduced by ActionScript 3.0, par- ticularly for designers accustomed to prior versions of ActionScript, is the way in which visual elements are

Ngày tải lên: 06/07/2014, 18:20

10 392 0
Học Actionscript 3.0 - p 11 pptx

Học Actionscript 3.0 - p 11 pptx

... code assigns 100 to both the x and y coordinate of a movie clip: ball.x = 100; ball.y = 100; Because both values are 100, the same task can be expressed this way: ball.x = ball.y = 100; This is ... have gaps 2 4 6 var ball:MovieClip = new Ball(); 7 ball.x = 100 + inc * 10; 8 ball.y = 100 + inc * 10; 9 addChildAt(ball, 0); 10 inc++; 11 } Line 1 creates a variable that will be incremented ... positioning them with the same technique used previously It then uses the event listener to remove a child with each click 3 ball.x = ball.y = 100 + inc * 10; 5 } 6 8 10 removeChildAt(0); 11 } This

Ngày tải lên: 06/07/2014, 18:20

10 248 0
Học Actionscript 3.0 - p 12 docx

Học Actionscript 3.0 - p 12 docx

... position is also set for each button, moving the button down 10 / 2, or 5 pixels. 10 10 65 10 65 10 65 10 65 10 1065 75 150 225 Figure 4-10. Object positioning in the dynamic navigation bar N OT ... (65) plus spacing is 75. So, the first result is 10 plus 0 * (65 + 10), or 10 + 0, or 10. The second result is 10 plus 1 * (65 + 10), or 10 + 75, or 85. This process continues for each button. ... have experience with prior versions of ActionScript, you will soon find that it’s much simpler and more consistent than equivalent methods in ActionScript 1.0 or ActionScript 2.0. N OT E Push

Ngày tải lên: 06/07/2014, 18:20

10 301 0
Học Actionscript 3.0 - p 13 pptx

Học Actionscript 3.0 - p 13 pptx

... + "0."); 10 trace ("It has " + currentScene.numFrames + " frame(s),"); 11 trace (" and " + currentScene.labels.length + " label(s) "); 12 trace ("The second scene's first label is 0" + ... ("The second scene's first label is 0" + 13 scenes [1] labels [0] name + "0,"); 14 trace (" which is in frame " + scenes [1] labels [0] frame + "."); 15 var numLabels: int ... 16 trace ("Movie clip 'pages' has " + numLabels + " labels."); 17 trace ("Its last label is 0" + 18 pages currentLabels [numLabels-1] name + "0."); 19 } Lines

Ngày tải lên: 06/07/2014, 18:20

10 295 0
Học Actionscript 3.0 - p 14 doc

Học Actionscript 3.0 - p 14 doc

... StructureChapter 5: Timeline Control 109 1 var nextSection: String = "" ; 2 3 section1 addEventListener ( MouseEvent.CLICK , navigate, 4 false , 0, true ); 5 section2 addEventListener ... , navigate, 6 false , 0, true ); 7 section3 addEventListener ( MouseEvent.CLICK , navigate, 8 false , 0, true ); 9 function navigate(evt: MouseEvent ): void { 10 nextSection = evt target.name ... vast majority of classes in ActionScript 3.0, including the recently cited example of creating a movie clip So, you already have some of the skills required for working with custom classes! Classpaths

Ngày tải lên: 06/07/2014, 18:20

10 316 0
Học Actionscript 3.0 - p 16 doc

Học Actionscript 3.0 - p 16 doc

... switch (tire) { 10 case "snow" : 11 type = "storm-ready snow" ; 12 break ; 13 case "highperformance" : 14 type = "high-performance radial" ; 15 break ; 16 ... = _milesTraveled; 30 } 31 } 32 33 public function go(): void { 34 _moving = true ; 35 } Now that the properties are private, getters and setters must be added to access them Lines 37 through ... onAddedToStage, 28 false , 0, true ); 29 } 30 31 public function onAddedToStage(evt: Event ): void { 32 this.removeEventListener(Event.ADDED_TO_STAGE, 33 onAddedToStage) 34 stage.addEventListener(MouseEvent.CLICK

Ngày tải lên: 06/07/2014, 18:20

10 318 0
Học Actionscript 3.0 - p 17 pdf

Học Actionscript 3.0 - p 17 pdf

... var menuData:Array = [ "one" , "two" , "three" , 10 "four" , "five" ]; 11 var navBar:NavigationBar = 12 new NavigationBar(menuData); 13 addChild(navBar); ... onLoop, false, 0, true); 27 } 28 trace(this, _milesTraveled, _fuelAvailable); 29 this.x = _milesTraveled; 30 } 31 } 32 33 public function changeGear(): void { 34 trace ( this , "changed ... 34 trace ( this , "changed gear"); 35 } 36 37 public function useAccessory(): void { 38 trace ( this , "vehicle lights turned on"); 39 } Next let’s see how to override the

Ngày tải lên: 06/07/2014, 18:20

10 255 0
Học Actionscript 3.0 - p 19 potx

Học Actionscript 3.0 - p 19 potx

... = ball y = 100; 3 addChild (ball); 4 5 var ball2: MovieClip = new Ball(); 6 ball2 x = 100; 7 ball2 y = 400; 8 addChild (ball2); 9 10 addEventListener ( Event.ENTER_FRAME , onEnter, false , 0, true ... positions in lines 13 and 14 1 var ball: MovieClip = new Ball(); 2 ball x = ball y = 100; 3 addChild (ball); 4 5 var xVel: Number = 10; 6 var yVel: Number = 10; 7 var frCoeff: Number = 0.95; 8 9 addEventListener ... = 100; 3 addChild (ball); 4 5 var xVel: Number = 0; 6 var yVel: Number = 0; 7 8 addEventListener ( Event.ENTER_FRAME , onLoop, false , 0, true ); 9 function onLoop(evt: Event ): void { 10

Ngày tải lên: 06/07/2014, 18:20

10 365 0
Học Actionscript 3.0 - p 20 pps

Học Actionscript 3.0 - p 20 pps

... deg = 50; rad = 0.87 x: Math.cos(rad) = 0.64 y: Math.sin(rad) = 0.77 deg = 140; rad = 2.44 x: Math.cos(rad) = –0.77 y: Math.sin(rad) = 0.64 deg = 230; rad = 4.01 x: Math.cos(rad) = –0.64 y: ... must multiply these values by the desired radius of your circle A calculated value of 1 times a radius of 100 equals 100, and multiplying –1 times 100 gives you –100 This describes a circle around ... = getDistance(ball0 x , ball0 y , 11 ball2 x , ball2 y ); 12 13 if (dist1 < dist2) { 14 trace ( "ball1 is closest to ball0" ); 15 } else { 16 trace ( "ball2 is closest to ball0" );

Ngày tải lên: 06/07/2014, 18:20

10 217 0
Học Actionscript 3.0 - p 21 doc

Học Actionscript 3.0 - p 21 doc

... TweenLite.from(bg, 1, {tint:0x000000}); 9 TweenLite.from(ball0, 1, {scaleX:0, scaleY:0, 10 ease:Elastic.easeOut, delay:0.5}); 11 TweenLite.from(ball1, 1, {scaleX:0, scaleY:0, 12 ease:Elastic.easeOut, delay:1.5}); 13 ... tf.textColor = 0xFFFFFF; 30 tf.text = btn.name; 31 btn.addChild(tf); 32 } 33 } 34 positionButtons(); 35 36 function onClick(evt:MouseEvent) { 37 trace(evt.target.name); 38 } Lines 39 through ... var ball:MovieClip = new Ball(); 7 ball.x = ball.y = 100; 8 addChild(ball); 9 10 var ballXTween:Tween = new Tween(ball, "x" , Bounce.easeOut, 11 100, 400, 3, true); 12 N OT E As discussed in Chapters

Ngày tải lên: 06/07/2014, 18:20

10 267 0
Học Actionscript 3.0 - p 22 docx

Học Actionscript 3.0 - p 22 docx

... sg.lineStyle(6, 0x0000FF, 0.5); 10 sg.beginFill(0xFF0000, 0.5); 11 sg.drawCircle(50, 50, 50); 12 sg.endFill(); 13 14 sg.lineStyle(); 15 sg.beginFill(0x0000FF, 0.2); 16 sg.drawRect(125, 0, 100, 100); 17 ... addChild(canvas); 3 var g:Graphics = canvas.graphics; 4 5 canvas.x = canvas.y = 10; 6 g.lineStyle(20, 0x000000); 7 8 var gradType:String = GradientType.LINEAR; 9 var colors:Array = [0xFF0000, 0x000000]; 10 ... colors:Array = [0xFF0000, 0x000000]; 7 var alphas:Array = [1, 1]; 8 var ratios:Array = [0, 255]; 9 10 g.beginGradientFill(gradType, colors, alphas, ratios) 11 g.drawRect(0, 0, 100, 100); Figure 8-4

Ngày tải lên: 06/07/2014, 18:20

10 287 0

Bạn có muốn tìm thêm với từ khóa:

w