FORUMS: list search recent posts

Finding playhead location

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Finding playhead location
on Jul 12, 2006 at 12:04:45 am

I'm using the drag/fade/slide class and here's what I have:

import com.dragslidefade.*;

function turnOff() {
_root.mc_print._visible = false;
_root.mc_web._visible = false;

mc_bckgrnd.cacheAsBitmap = true;

var s:Slide = new Slide(mc_bckgrnd,1);
var n:Slide = new Slide(mc_NaviTest,1);

mc_NaviTest.tonic.onRelease = function(){

The movement works fine. What I'm trying to do is make the movie clips mc_print and mc_web become visible once the background image reached it's destination.

In this case, when someone clicks the mc "tonic" the background slides over to rest at -812,0. I want the other two movie clips to become visible when the sliding actually stops.

If I had something like the onMotionFinished() method, that would be cool but I don't so I don't know exactly what I need to do to tell Flash "once the mc_bckgrnd clips STOPS moving (when the x property is = -812, THEN make the two clips mc_print and mc_web visible."

The code above is sending the playhead to a labeled frame named "tonic" but it gets there before the background is done sliding.

I'm thinking it probably some kind of loop to check the position of the x property and then setting the visibility of the clips at the 'tonic' frame but I'm getting confused.

Any ideas?


Return to posts index

Re: Finding playhead location
on Jul 12, 2006 at 1:44:55 am

Well, I don't use the dragslidefade code, but I would suggest you check through the documentation to see if the functions return any values that might indicate that they have completed. Short of that, I would suggest you either dump dragslidefade in favor of your own tweens, or set an interval once the movement starts that checks the location of your moving clip, and when it's position doesn't change for an interval, you can assume you're done, so clear the interval and make your clips visible.


I'm filling a need. Without me there would be no bad examples.

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved