Solved

Actionscript in Flash

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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 …
There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
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 how to load their YouTube profile onto Flash Media Live Encoder.

740 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