Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help with stopping mc at certain coordinate

Status
Not open for further replies.

Rhiannon

Technical User
Feb 8, 2002
55
US
I've got a Flash movie that has a movie clip that scrolls from right to left. The clip contains 6 sample full page magazine covers and each one is a movie clip that contains a button.

When you rollover a particular ad a screen that contains info rolls down and it's the width of two of the ads. When you rollout the screen rolls back up.

What I'm TRYING to do is have the scrolling movie clip stop when the ad you've rolled over reaches the far left so what you'll end up with is the ad on the left and the screen to the right. THEN when you rollout the movie will continue scrolling and the screen will roll up.

I've tried different methods of setProperty but can't seem to get the 'x' coordinates right. Nothing happens.

Example:

setProperty
var guardianx = ("_root.adsmc.guardianbutton",xPos);

if (guardianx > 0) {
_root.adsmc.play();

} else if (guardianx = 0) {
_root,adsmc.stop();
}

If it would help you can download the fla at
This is driving me nuts and would appreciate some help. It seems like it should be a simple thing to do.

Cheers,
Rhiannon
 
I haven't checked out the fla file yet, but I do see an error in the code you posted. Like I said, I haven't taken a good look yet, but here is your mistake:

} else if (guardianx = 0) {
_root,adsmc.stop();
}

should be:
} else if (guardianx == 0) {
_root,adsmc.stop();
}

You have to use double equals in If statements, or it doesnt work properly.

Lumstar
______________________________________
And The Star Continues To Shine....
 
Hi Lumstar,

Yeah, I noticed that a LONG time ago. Also caught the commas after _root as well and it's still not working. This one really has me stumped.

I you want to take a look at the Flash movie (actually a section of it) and see what I'm trying to do, go to Click on "Selection of Advertisers". You'll see how the ads scroll and get a better picture of what I'm trying to accomplish as far as getting the ads to stop when you scroll over them and the screen rolls down.
 
Rhiannon,
this little problem has me really interested. I would love to take a closer look at it now, but I am on deadline at work for a couple of projects of my own. If you wouldnt mind sending me an email I can reach you at, I would like to work on this project on my spare time either tonight or over the weekend. Is this fix needed ASAP or do you have a little time, I am pretty sure I should be able to figure it out for you.

Regards,

Lumstar
______________________________________
And The Star Continues To Shine....
 
Hi Lumstar,

Understand about you working on a deadline. I don't need this fixed ASAP, but my client would like to see it working soon. I've gotten pretty far along in the site it resides on though so he's happy enough and as long as he knows I'm trying to get the frelling thing working he's fine.

My email address is rhiannoninmd@hotmail.com. If you want to see how this whole thing fits together the web site addy is
Appreciate your interest in this.

Cheers, Rhiannon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top