Solved

Actionscript in Flash

Posted on 2016-11-04
3
123 Views
Last Modified: 2016-11-07
var dotX = "";
var dot = "dot";

Any idea what's the meaning of _root.gotoAndPlay(this+"over"); and  _root.gotoAndPlay("origin"); in Flash ?

Thx



for (var i= 1; i <= 11; i++){

this["dot"+i].onRollOver = function() {
      _root.gotoAndPlay(this+"over");
}
this["dot"+i].onRollOut = function() {
      _root.gotoAndPlay("origin");
}

}
0
Comment
Question by:AXISHK
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 82

Accepted Solution

by:
leakim971 earned 250 total points
ID: 41873706
From here :
http://help.adobe.com/en_US/AS2LCR/Flash_10.0/help.html?content=00000566.html
The documentation say :
Sends the playhead to the specified frame in a scene and plays from that frame. If no scene is specified, the playhead goes to the specified frame in the current scene. You can use the scene parameter only on the root Timeline, not within Timelines for movie clips or other objects in the document.

And from here :
http://help.adobe.com/en_US/AS2LCR/Flash_10.0/help.html?content=00000232.html
It show you this gonna return the object in the currently executing scope

so your code is going to add two listeners (onRollOver and onRollOut) on 11 objects in your page.

1 - You roll over on one of these object, it going to "play" the object/frame having the name of the element + over, for example if the name is "_level0.my_mc" it play "_level0.my_mcover"

2 - You roll out, it play the object/frame having the name "origin"
0
 
LVL 7

Assisted Solution

by:D Patel
D Patel earned 250 total points
ID: 41874073
_root.gotoAndPlay(this+"over");
: "Over" instance of current (on which MouseOver effect tracked) MovieClip will be called and played

_root.gotoAndPlay("origin");
: "Origin" movieclip will be called up and played
0
 

Author Closing Comment

by:AXISHK
ID: 41878023
Thx
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question