Solved

Actionscript in Flash

Posted on 2016-11-04
3
58 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
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 6

Assisted Solution

by:DPatel
DPatel 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

776 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