Natives series AS Tutorial - Basics

2010-04-03  来源:本站原创  分类:Flash  人气:191 

[1b] Introduction [/ 1b]:
I write these tutorials in the hope fans of Flash beginners can
[1b] and more hands, less questions [/ 1b]
. I like these tutorials surface have Flash (MX) based on operational knowledge of the reader. See my tutorial at the same time, we hope to open Flash, look at them while doing so you will be more profound impression that, by the way also to see where I was wrong:)
[1b] [1b] AS foundation [/ 1b] [/ 1b]
-----------------------------------
Flash animation Flash did fans know, to make a Flash animation, AS is essential, even if only a few very simple code to play the Flash finishing point. Here I simply introduce the basic knowledge of AS.
First we have to understand
AS to write where, and when the implementation of AS would be triggered.
1, [1b] frame [/ 1b]:
Written in the key frame above the AS, when the timeline on the key frame pointer came when written in the frame on top of AS is triggered executed. Common examples are in the frame end of the film written on the stop () and so on. How is the click key frame, and then open the AS panel.
2, [1b] button [/ 1b]:
Different from the frame above the AS, AS is to have the button to trigger the above conditions. AS should be written on the button, the operation is to click the target button and then open the AS panel. For example can say more to understand.
Suppose there is an animation to complete it in play and stop, then you need to do is in the animation of the last one to write AS
stop ();
Suppose there is a button, the effect is press the button to stop playback, then the following steps.
Make a button, into the main scene, click the button, and then open the AS panel. If the button is now also write stop ();
Then, the output will prompt an error when. The right should be written
on (
release
) (
stop ();
)
More than the frame of the animation here the code: on (release) (), the code translates to: if (release) (
Stop
)
Code red events that trigger events of the mouse, here is the release with the release, the button of common events:
release
Release releaseOutside
Release outside the button press
Press rollOver
Button mouse into the sensing area rollOut
Mouse left button of the sensing area is now very clear: to write some AS on the button above that this format:
on (events) (code to be executed)
3, [1b] MC (movie clip)
[/ 1b] If you read the contents of the above, then write and write AS MC above the button on the similar. How is the click MC, and then open the AS panel. See example onClipEvent (
load
) (
stop ();
)
Similarly, MC need an event to trigger the implementation of AS. Translate this code is that when clip (loaded) (
Stop
)
Code Red also said an event. MC these events are the following:
load
Loading arises when the MC implementation. That is, unless uninstalled the MC, or load event code only once within the unload
Uninstall, uninstall the time when the MC implementation enterFrame
There's every frame. MC exist in the implementation of a code for each frame should. If your scene with 100 frames, there began to MC from 41 to 100 before disappearing, then the MC above 60 times mouseDown code execution
Click the mouse anywhere within the scene count. And the buttons are not the same place mouseMove
Move the mouse, move the mouse on the implementation of the code as long as mouseUp
Release the mouse as you want to clear: to write the code on the MC must always be in this format:
onClipEvent (event) (code)
See here, if you understand the writing in the frame, button, MC What is the code on different tasks to complete the paper even carried over: http://www.5uflash.com/flashjiaocheng/Flashjichucaozuo/249.html

相关文章
  • Natives series AS Tutorial - Basics 2010-04-03

    [1b] Introduction [/ 1b]: I write these tutorials in the hope fans of Flash beginners can [1b] and more hands, less questions [/ 1b] . I like these tutorials surface have Flash (MX) based on operational knowledge of the reader. See my tutorial at the

  • Natives series AS Tutorial - actual articles 2010-04-03

    [1b] [1b] AS actual articles [/ 1b] Step 2, we changed the name of the default layer Bkground, and draw on the track, starting line and finish line, I have here is a four track Step 3 Create a new layer, layer name into WN_Layer, and then draw a snai

  • Natives series AS Tutorial - Object Posts 2010-04-03

    [1b] AS object articles [/ 1b] ----------------------------------- While AS is not a true object-oriented programming, but it also has the concept of the object. This concept has always been throughout the AS, therefore, the object of understanding,

  • Natives series AS Tutorial - Grammar articles 2010-04-03

    [1b] AS syntax Posts [/ 1b ]----------------------------------- Next, I want to say is the AS syntax. We must first understand is: [1b] AS syntax is case sensitive. [/ 1b] Such as: gotoAndPlay () correctly gotoAnd p lay () error. Keyword spelling and

  • ZzLinux enthusiasts Tutorial 2011-05-28

    We should first know the basic situation of the computer. Computer, is a pile of metal, semiconductor and plastics aggregate, if the pass on the power, you can start, but you can not do anything, because the computer is just a bunch of hardware, if y

  • Struts2 Tutorial 1: The first program a Struts2 2010-03-29

    http://www.linux521.com/2009/java/200904/1681.html Struts2 Tutorial 1: The first program consists of a Linux system Struts2 English (Linux521.com) editor to compile, in addition to original articles, Linux521 indicated, its belongs to original author

  • Learning Linux, 101: edit files using vi 2010-04-05

    Outline In this article, you will learn the basic vi editor to use, the editor in most Linux or UNIX can be seen in both. You will learn: Navigate the document using vi Use basic vi model Insert, edit, delete, copy, and search text This article will

  • Various types of web video programming learning integration. 2010-12-10

    Ladies and gentlemen, this is our order of free video tutorials, daily updates, as well as e-books, also free, thank you for attention ~ O ( ∩ _ ∩ ) O ~ has been done related to the classification, we can according to the direction of interest here t

  • Telnet do you really know? (Rpm) 2010-12-13

    Directory: A Digest of the three Telnet remote login protocol Telnet services, four of the five Win2000 telnet in what to do in six Conclusion A summary Telnet application will not only facilitate our remote log, but also to provide another kind of h

  • E-book and video learning Daquan 2011-04-26

    Mobile Development Android/3G: Flash Professional CS5: game video tutorials produced iOS Devices http://www.hztraining.com/bbs/showtopic-1393.aspx Android project video tutorial (DVDRip) http://www.hztraining.com/bbs/showtopic-1392.aspx Android-based

  • Study books and videos Daquan 2011-04-26

    Mobile Development Android/3G: Flash Professional CS5: game video tutorials produced iOS Devices http://www.hztraining.com/bbs/showtopic-1393.aspx Android project video tutorial (DVDRip) http://www.hztraining.com/bbs/showtopic-1392.aspx Android-based

  • 6 Symfony Chinese learning resources 2010-02-04

    Symfony Despite the development of more than 3 years, but in China very few resources to learn Symfony. Symfony has now come out symfony1.4, and domestic symfony tutorial latest 1.2 version. Symfony tutorial is basically internal translation of the f

  • 从今天开始学习iOS开发(iOS 7版)--构建一款App之App开发过程 2013-11-11

    构建一款App之App开发过程App开发过程设计用户界面定义交互 教程: Storyboard (构建一款app一章中包含四个小节:App开发过程.设计用户界面.定义交互以及教程,本文是第一小节) App开发过程 虽然开发一款app可能会令人心生畏惧,但这个过程可以被分为几个容易理解消化的部分.在你首次开发app的过程中,这些步骤将帮开启app开发之旅并为你指引正确的方向. 定义概念每款伟大的app都始于一个概念.直达概念最有效的方法是思考你想通过app解决什么问题.伟大的app只解决一个定义明

  • PowerDesigner Tutorial Series 2010-03-23

    Objectives: This paper introduces the concept of PowerDesigner data model in the basic concept of CDM. A conceptual data model data model outlined <br /> data in the real world characteristics of an abstract. Data model should meet three requirement

  • Reprinted: CSS Basics Tutorial (internal training) 2010-05-25

    CSS Basics Tutorial (internal training) This is the last week of training for the CSS information within the company, want to help beginners. CSS is the abbreviation for Cascading Style Sheet. Translated as "cascading style sheets." For (enhance

  • Teradata Basics Tutorial (English) 2010-07-12

    [Teradata Basics Tutorial (English)] consists of a 29 part, want to help you! >> See All Note: I hope your help, if you have some good information, hope to share with you!

  • Extjs + Grails Tutorial Series 1 (Extjs environment with and HelloWorld program) 2010-07-28

    Here are some series of blog posts are my own right when the path of a school Extjs reviewed and summarized. Today, in Shanghai, the company, I learned two weeks, the Extjs learn about, then follow the engineers more or less the accumulated experienc

  • Rails3 one tutorial series: Rails3 Getting Started 2010-11-22

    Article Source: http://edgeguides.rubyonrails.org/getting_started.html Then pick up the time that has come to Rails 3.0.3, the huge change that can not find tutorial to find articles in Chinese, has decided to side according to the official translati

  • Android tutorial series Six: TextView group document to be used - with hyperlinks and marquee effect 2010-11-25

    Wrote Application of these two days busy with my "I Group" of the update, here's the article updates a lot slower, please forgive me! This section describes what the simple use of TextView, and the hyperlink text, marquees and other instances. A

  • Rails3 Tutorial Series Five: Rails3 Getting Started (5) 2010-11-28

    Article Source: http://edgeguides.rubyonrails.org/getting_started.html 1. Add a second model In the previous tutorial, we have quickly learned to use scaffolding to build a simple application, after all, the scaffolding can not do anything, and now w