logo
g Text Version
Beauty & Self
Books & Music
Career
Computers
Education
Family
Food & Wine
Health & Fitness
Hobbies & Crafts
Home & Garden
Money
News & Politics
Relationships
Religion & Spirituality
Sports
Travel & Culture
TV & Movies

dailyclick
Bored? Games!
Nutrition
Postcards
Take a Quiz
Rate My Photo

new
Action Movies
Bible Basics
Houseplants
Romance Movies
Creativity
Family Travel
Southwest USA


dailyclick
All times in EST

Full Schedule
g
g Flash and Animation Site

BellaOnline's Flash and Animation Editor

g

ActionScript and Script Assist Button


5. Click on the Listener input field (to the right of the Type input field) and type in "replay_ecard". Flash will update our code automatically. Here is what you should have.

Now we are ready to write our function.

6. From the code list, choose Language Elements Statements, Keywords & Directives definition keyword function. As you can see, we have a not_yet_set reminder in our new code. We need to tell Flash the name of our function. Click on the Name input field and type in "replay_ecard". Flash will update our code.

7. The next input field is for Parameters. The parameter that we need to supply for this function is the mouse event. In the Parameters input field type in "event:MouseEvent".

8. Under the Parameters input field is the Type field. Use the drop-down menu to set this field to void. Your code should look like this.

9. We will now add the code that will tell Flash to go back to Frame 1 and play the animation. This will be very similar to the stop() code that we added in the previous tutorial. We will use the gotoAndPlay() code. Click on the Plus sign to open the code list. Choose flash.display MovieClip Methods gotoAndPlay. In the Object input field type in "this" to tell Flash that we are talking about the main Timeline. In the Frame input field type in "1". This will tell Flash to go back to Frame 1.

Here is the finished code.

Save the ecard. Now we can publish our eCard for the web. From the Menubar, click File Publish.

← Back



Join us in the Flash forum.




Add ActionScript+and+Script+Assist+Button to Twitter Add ActionScript+and+Script+Assist+Button to Facebook Add ActionScript+and+Script+Assist+Button to MySpace Add ActionScript+and+Script+Assist+Button to Del.icio.us Digg ActionScript+and+Script+Assist+Button Add ActionScript+and+Script+Assist+Button to Yahoo My Web Add ActionScript+and+Script+Assist+Button to Google Bookmarks Add ActionScript+and+Script+Assist+Button to Stumbleupon Add ActionScript+and+Script+Assist+Button to Reddit



 



RSS | Related Articles | Editor's Picks Articles | Top Ten Articles | Previous Features | Site Map


For FREE email updates, subscribe to the Flash and Animation Newsletter


Past Issues


print
Printer Friendly
bookmark
Bookmark
tell friend
Tell a Friend
forum
Forum
email
Email Editor


Content copyright © 2014 by Diane Cipollo. All rights reserved.
This content was written by Diane Cipollo. If you wish to use this content in any manner, you need written permission. Contact Diane Cipollo for details.

g


g features
Particle System - Emitter Shape Parameters

Motion Particle Systems - Introduction

Particle Fog in Motion 5 - Scene Graphics

Archives | Site Map

forum
Forum
email
Contact

Past Issues
memberscenter


vote
Poetry
Daily
Weekly
Monthly
Less than Monthly



BellaOnline on Facebook
g


| About BellaOnline | Privacy Policy | Advertising | Become an Editor |
Website copyright © 2014 Minerva WebWorks LLC. All rights reserved.


BellaOnline Editor