Solved

Actionscript in Flash

Posted on 2016-11-04
3
22 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
3 Comments
 
LVL 82

Accepted Solution

by:
leakim971 earned 250 total points
Comment Utility
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 5

Assisted Solution

by:D Patel
D Patel earned 250 total points
Comment Utility
_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
Comment Utility
Thx
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
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…
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

763 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now