Học Actionscript 3.0 - p 3 pot
... on ActionScript 3. 0? ??specific syntax. Download from Wow! eBook <www.wowebook.com> Download from Wow! eBook <www.wowebook.com> 3 IN THIS CHAPTER What’s New in ActionScript 3. 0? The Flash ... Flex, such as Learning Flex 4 (O’Reilly). • What Is ActionScript 3. 0? Every new version of ActionScript intro- duces new features. ActionScript 3. 0, however, was written from scratch (not built ... bilities of ActionScript 3. 0, and the language’s power really shines in this area. However, embracing ActionScript 3. 0 doesn’t mean that you must become an expert in OOP. Using Flash, it is
Ngày tải lên: 06/07/2014, 18:20
... green (00 ) or blue (00 ). The hexadecimal color 0x 000 0FF would be a color with no red (00 ) or green (00 ) and the full amount of blue (FF). To find the hexadecimal value of a specific color in Flash, ... = new Ellipse( 10, 10, 0x00FF 00) ; 2 Save and test your movie. ptg 78 LESSON 4 Creating ActionScript in External Files Now, moving the mouse should produce a trail of 10- pixel-by- 10- pixel green ... function. 3 Locate the makeShapes() function and change the line that currently reads: var ellipse:Ellipse = new Ellipse( 10, 10, 0x00FF 00) ; so that it reads: var ellipse:Ellipse = new Ellipse( 10, 10, color);
Ngày tải lên: 08/08/2014, 20:20
... minutes So, subtract 2* 60 from 1 23 to get 3 seconds left over, since1 23 is 2 minutes and 3 seconds: public function clockTime(ms:int) { var seconds:int = Math.floor(ms/ 100 0); var minutes:int ... This makes sure the player sees an up-to-date score, as shown in Figure 3. 13. Adding Scoring and a Clock 1 03 Figure 3. 13 The score now appears in the upper left, using the default font and style. ... MatchingGameObject7.as. Figure 3. 10 shows a diagram of the three frames we plan to have in our updated movie and what each one contains. Chapter 3: Basic Game Framework: A Matching Game 98 Figure 3. 10 The second
Ngày tải lên: 12/08/2014, 14:21
Essential ActionScript 3.0 PHẦN 3 pptx
... 1, and return i i++ // Create an XML element named BOOK Essential ActionScript 3. 0 Example 1 80 Precedence 14 14 13 13 13 12 12 11 11 11 Operator typeof void * / % + – > >>> Performs a ... expression 3 This code compiles in // standard mode only "3" === 3 // Check whether the expression 3 is not equal to // the expression 3 3 != 3 // Check whether the expression "hi" is equal to ... the expression "3" is not equal to // the expression 3 This code compiles in // standard mode only "3" === 3 // Check whether the expression "3" is equal to // the expression 3 This code compiles
Ngày tải lên: 12/08/2014, 16:21
Học Actionscript 3.0 - p 2 doc
... O’Reilly Media, Inc. 100 5 Gravenstein Highway North Sebastopol, CA 95472 ( 800 ) 998-9 938 (in the United States or Canada) ( 707 ) 829 -05 15 (international or local) ( 707 ) 829 -01 04 (fax) We have ... experienced ActionScript 2 .0 programmer, you may wish to glance at a few chapters of interest before deciding whether or not this book is for you. Migration from ActionScript 2 .0- to -ActionScript 3. 0 ... 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
Học Actionscript 3.0 - p 4 doc
... loading a SWF. An ActionScript 3. 0 file can load a SWF created in ActionScript 1 .0 or 2 .0, but it cannot directly access the older SWF’s code. A SWF created in ActionScript 1 .0 or 2 .0, however, ... with ActionScript 1 .0 or 2 .0 in the past—or even if you find yourself updating legacy code created by someone else—it’s very impor- tant to understand that you cannot mix ActionScript 1 .0 or 2 .0 ... Users of Flash Professional CS3 and CS4 should use File →New and create a new ActionScript File (rather than a new FLA document). Users of Flash CS5 Professional will see this option as ActionScript
Ngày tải lên: 06/07/2014, 18:20
Học Actionscript 3.0 - p 5 pptx
... Together What’s Next? ActionScript 3. 0 is a complete rewrite of the language—so much so that ActionScript 3. 0 doesn’t even share the same Flash Player code base as prior versions of ActionScript. But ... 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 3. 0 ... Fundamentals 23 Typing the following into a script, for example, will display “Learning ActionScript 3. 0 Shupe Rosser” in Flash Professional’s Output panel: trace("Learning ActionScript 3. 0& quot;,
Ngày tải lên: 06/07/2014, 18:20
Học Actionscript 3.0 - p 6 ppsx
... a random number value. N O T E Additional ActionScript 3. 0 opera- tors can be found at http://www. adobe.com/livedocs /flash/ 9 .0/ ActionScriptLangRefV3/operators.html. Download from Wow! eBook ... while (num < 0. 5) { trace(num, "is less than 0. 5"); num = Math.random(); } trace("final num:", num); Starting with a default value of 0, num will be less than 0. 5 the first ... loop the value of i is 0, that value is less than 3, a trace occurs, and i is incremented by 1. The second time through the loop, i is 1, that value is less than 3, a trace occurs, and i
Ngày tải lên: 06/07/2014, 18:20
Học Actionscript 3.0 - p 7 pot
... method: Math.round (0. 8); //1 Math.round (0. 2); / /0 Math.floor (0. 8); / /0 Math.floor (0. 2); / /0 Math.ceil (0. 8); //1 Math.ceil (0. 2); //1 The Math.round() method rounds up when the value is 0. 5 and above ... villain.health = 100 ; villain.armor = 100 ; villain.lives = 3; These values can be called up at any time, by querying the properties the same way they were created. trace(villain.health); // 100 Objects ... issues introduced or updated by ActionScript 3. 0. Next, we start off the ActionScript 3. 0- specific material with a look at the three essential building blocks of most ActionScript objects: properties,
Ngày tải lên: 06/07/2014, 18:20
Học Actionscript 3.0 - p 8 pps
... 3 4 txtFld.textColor = 0xFF 000 0; 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, ... not only 0? ??9 but also A–F. 00 is no color and FF is all color, for each pair. 0x 000 000 is black (no colors), and 0xFFFFFF is white (all colors). The color used in this script is all red, no ... box.scaleY = 0. 5; Percent / 0? ??1 Dimensions width, height box.width = 72; box.height = 72; Pixels Rotation rotation box.rotation = 45; Degrees / 0? ? ?36 0 Transparency alpha box.alpha = 0. 5; Percent / 0? ??1
Ngày tải lên: 06/07/2014, 18:20
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 ... ActionScript. When specifying a rotation higher than 36 0 degrees, ActionScript will understand the fact that an angle of rotation can- not exceed 36 0 and use the correct value. That is, 36 0 ... 36 0 degrees is one full rotation around a circle, bringing you back to degree 0 (7 20 degrees is twice around the circle and also equates to 0) . Similarly, 37 0 degrees is equivalent to 10
Ngày tải lên: 06/07/2014, 18:20
Học Actionscript 3.0 - p 10 ppsx
... SWFs created using ActionScript 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 ... 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, ... Essential ActionScript 3. 0. Download from Wow! eBook <www.wowebook.com> Part II: Graphics and Interaction 70 What’s Next? What’s Next? This chapter has demonstrated ways to manipulate ActionScript
Ngày tải lên: 06/07/2014, 18:20
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 ... inc:int = 0; inc < 20; inc++) { 2 var ball:MovieClip = new Ball(); 3 ball.x = ball.y = 100 + inc * 10; 4 addChildAt(ball, 0) ; 5 } 6 7 stage.addEventListener(MouseEvent.CLICK, onClick, false, 0, ... inc:int = 0; 2 3 stage.addEventListener(MouseEvent.CLICK, onClick, false, 0, true); 4 5 function onClick(evt:MouseEvent):void { 6 var ball: MovieClip = new Ball(); 7 ball.x = 100 + inc * 10;
Ngày tải lên: 06/07/2014, 18:20
Học Actionscript 3.0 - p 12 docx
... the spacing is 10, and the button width (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. ... 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 106 5 75 1 50 225 Figure 4- 10. Object positioning in the dynamic navigation bar N OT ... 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 Yourself: A
Ngày tải lên: 06/07/2014, 18:20
Học Actionscript 3.0 - p 13 pptx
... (mc.currentLabels[i].name == frLabel) { 32 return mc.currentLabels[i].frame; 33 } 34 } 35 return -1; 36 } The aforementioned getFrame() function appears in lines 27 through 34 . The function accepts a ... (frameNum > 0) { 25 pages.gotoAndStop(frameNum + 4); 26 } 27 } 28 29 function getFrame(frLabel:String, mc:MovieClip):int { 30 for (var i:int = 0; i < mc.currentLabels.length; i++) { 31 if (mc.currentLabels[i].name ... trace("The second scene's first label is 0& quot; + 13 scenes[1].labels [0] .name + " ;0, "); 14 trace(" which is in frame " + scenes[1].labels [0] .frame + "."); 15 var numLabels:int
Ngày tải lên: 06/07/2014, 18:20
Học Actionscript 3.0 - p 17 pdf
... 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 gear"); 35 ... Truck(16, 23) ; 22 pickup.x = 20; 23 pickup.y = 100 ; 24 addChild(pickup); 25 pickup.changeGear(); 26 pickup.useAccessory(); 27 28 this.addEventListener(Event.ADDED_TO_STAGE, 29 onAddedToStage, 30 false, ... list. 1 package { 2 3 import flash. display.MovieClip; 4 import com.learningactionscript3.gui.NavigationBar; 5 6 public class LAS3Main extends MovieClip { 7 8 public function LAS3Main() { 9 var
Ngày tải lên: 06/07/2014, 18:20
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); ... ball.y = 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 xVel = ... onLoop(evt:Event):void { 10 xVel = velElastic(ball.x, mouseX, 0 .3, 0. 8, xVel); 11 yVel = velElastic(ball.y, mouseY, 0 .3, 0. 8, yVel); 12 ball.x += xVel; 13 ball.y += yVel; 14 } 15 function velElastic(orig:Number,
Ngày tải lên: 06/07/2014, 18:20
Học Actionscript 3.0 - p 20 pps
... 1 times a radius of 100 equals 100 , and multiplying –1 times 100 gives you – 100 . This describes a circle around the origin point of the axes, which spans from – 100 to 100 in both horizontal ... reflection 45 135 135 45 1 80 0 225 –45 31 5 – 135 36 0 1 80 The last step in handling the movement of each particle is to again call the updateParticleVelocities() method (lines 31 and 36 ), to update ... deg = 50; rad = 0. 87 x: Math.cos(rad) = 0. 64 y: Math.sin(rad) = 0. 77 deg = 1 40; rad = 2.44 x: Math.cos(rad) = ? ?0. 77 y: Math.sin(rad) = 0. 64 deg = 2 30 ; rad = 4 .01 x: Math.cos(rad) = ? ?0. 64 y:
Ngày tải lên: 06/07/2014, 18:20
Giáo trình : Thông gió và xử lý khí - Chương 3
... 0, 06 0, 05 0, 01 0, 06 0, 05 0, 01 0, 05 0, 04 0 0, 05 0, 04 0 0, 04 0, 03 0 0, 04 0, 03 0 0, 04 0, 02 0 0, 03 0, 02 0 Tây Bắc > 700 500 1 50 0, 0 8 0, 0 7 0, 0 3 0, 09 0, 08 0, 05 ... 0, 1 2 0, 0 5 0, 12 0, 10 0, 04 0, 11 0, 09 0, 03 0, 10 0, 08 0, 02 0, 09 0, 07 0, 01 0, 08 0, 06 0 0, 07 0, 05 0 0, 06 0, 05 0 0, 06 0, 04 0 0, 05 0, 04 0 0, 05 0, 03 0 Đông > 700 ... 0, 05 0, 10 0, 09 0, 07 0, 10 0, 09 0, 08 0, 1 0 0, 1 0 0, 0 9 0, 10 0, 10 0, 09 0, 10 0, 10 0, 10 0, 10 0, 10 0, 10 0, 16 0, 15 0, 17 0 ,33 0 ,34 0 ,39 0, 49 0, 52 0, 63 0, 61 0, 65 0, 80 0, 60...
Ngày tải lên: 07/10/2012, 18:35
Giáo trình Flash - Tin học cơ sở V2.0
... ứng. Các phím tắt: • Ctrl + ‘+’: Phóng to, Ctrl + ‘-’: Thu nhỏ • Ctrl + 1: 100 %; Ctrl + 2: 200 %; Ctrl + 4: 400 %, Ctrl + 8: 800 % Hand Tool (H) Zoom Tool (M, Z) Enlarge (Phóng to) Reduce (Thu nhỏ) Bài ... viền thành đen (#ffffff) và màu nền thành trắng ( #00 000 0) No Color Thiết lập màu lựa chọn (viền hoặc nền) không được tạo ra khi vẽ Swap Colors Đổi hai màu viền và nền cho nhau Black and ... nhúng vào các trang web Bài giảng Tin học cơ sở - Khoa Công nghệ thông tin - Trường Đại học Bách Khoa Hà Nội 23 3 .3. Mở tệp đã có Cách 1: Bằng Start Page (trang bắt đầu khi vào Flash) Chọn • Open...
Ngày tải lên: 22/07/2013, 01:27
Bạn có muốn tìm thêm với từ khóa: