473,386 Members | 1,743 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How to set movieclip back to previous depth on mouse out

37
I have a button that when hovered over plays a movieclip (a info bubble appears) when I mouse out it disapears.
There is also a video clip on the stage.
Currently if I launch the flash movie I can play the video clip the controls are active, however as soon as
I hover over the info button once (the info bubble is now on top of the video clip), then mouse
off the button (the info bubble disapears) however the video controls have now become in-active.

I need to set the hover_jim movieclip
back to its previous depth when I mouse out of the button, jim_btn

Expand|Select|Wrap|Line Numbers
  1. var currentDepth:uint = this.numChildren - 1;
  2. jim_btn.addEventListener(MouseEvent.MOUSE_OVER, goto_bubble4);
  3.  
  4. function goto_bubble4(evt:MouseEvent){
  5. this.setChildIndex(hover_jim, currentDepth);
  6. hover_jim.gotoAndPlay("go");
  7. }
  8. jim_btn.addEventListener(MouseEvent.MOUSE_OUT, goto_bubble_out4);
  9.  
  10. function goto_bubble_out4(evt:MouseEvent){
  11. //this.setChildIndex(hover_jim, currentDepth);
  12. hover_jim.gotoAndPlay("goer");
  13.  
  14.  
Oct 29 '11 #1

✓ answered by Max58kl

I now know how to avoid making FLVPlayBack buttons unresponsive!

Set a variable as follows

var topPosition:uint = this.numChildren - 1;

then create a mouseover listener and function call
which sets the setChildIndex of the hover_jim movieclip (bubble) to the topPosition variable

jim_btn.addEventListener(MouseEvent.MOUSE_OVER, goto_bubble);

function goto_bubble(evt:MouseEvent){
this.setChildIndex(hover_jim, topPosition);
hover_jim.gotoAndPlay("go");
}

then create a mouseout listener and function call
which sets the setChildIndex of the hover_jim movieclip (bubble) back to 0

jim_btn.addEventListener(MouseEvent.MOUSE_OUT, goto_bubble_out);

function goto_bubble_out(evt:MouseEvent){
setChildIndex(hover_jim, 0);
hover_jim.gotoAndPlay("goer");
}







@Max58kl

1 2291
Max58kl
37
I now know how to avoid making FLVPlayBack buttons unresponsive!

Set a variable as follows

var topPosition:uint = this.numChildren - 1;

then create a mouseover listener and function call
which sets the setChildIndex of the hover_jim movieclip (bubble) to the topPosition variable

jim_btn.addEventListener(MouseEvent.MOUSE_OVER, goto_bubble);

function goto_bubble(evt:MouseEvent){
this.setChildIndex(hover_jim, topPosition);
hover_jim.gotoAndPlay("go");
}

then create a mouseout listener and function call
which sets the setChildIndex of the hover_jim movieclip (bubble) back to 0

jim_btn.addEventListener(MouseEvent.MOUSE_OUT, goto_bubble_out);

function goto_bubble_out(evt:MouseEvent){
setChildIndex(hover_jim, 0);
hover_jim.gotoAndPlay("goer");
}







@Max58kl
Feb 20 '12 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Rich | last post by:
Am just beginning to use javascript. I have some pages that can be arrived at from more than one other page. Yes, the user can use the back button but I'd like to have a back link at the bottom...
0
by: jeffgeorge | last post by:
I'm trying to accomodate users who are requesting a "back" button ala an internet browser. It will be primarily used to peel off layers of a filter by selection but I'm sure it will inevitably be...
4
by: ronchese | last post by:
Hello! I have a UserControl that have two other controls inside it. I need to set a different border color for my UserControl when the mouse enters it, and restore the border color when the...
1
by: finerrecliner | last post by:
trying to get the mouse coordinates to show up in an alert box. but all i get is "undefined" the script should work like: click the button, then click anywhere on the page to show your current x...
7
by: anis2007 | last post by:
Hi to all of you, When we back, then not go previous page What this wrong with this coade, plz help me. onclick="Javascript: history.go(-1);" OR onclick="Javascript: history.back();" ...
12
by: Brano | last post by:
Hi I am using vb.net 2005 this is a windows application I am using this functionality in another project I have created this simple project to show the problem Basically I have two forms: ...
1
by: veenathi | last post by:
i am trying to write code for coping a certain portion of movieclip into another movieclip. for that i draw big stage movieclip. (stage_mc).Then i draw small rectangle movieclips on the stage...
2
by: fredd00 | last post by:
how can i change the back color on mouse out to the color specified in the grid view declaration in the gridview declaration <AlternatingRowStyle BackColor="#CECECE" /> <RowStyle...
0
by: khanh | last post by:
I know how to highlight a treenode when the mouse is moving over it in a drag and drop, but what I would like to do is change the forecolor of a node and change it back when the mouse is moved away...
1
by: chromis | last post by:
Hi, This should be really simple to do and has really got me stumped. I have a movieclip inside a button, the button is called my_btn and the movieclip is called my_movie. What i want to happen is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.