Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Actionscript in Flash

Posted on 2016-11-04
3
Medium Priority
?
132 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 1000 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 1000 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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…
Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
Suggested Courses

719 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