View Full Version : Deactivate Movie when outside
seanhennessey
June 26th, 2007, 08:42 AM
Hey, I setup a gallery with scrolling thumbnails, it's working great, but the only problem is if the user goes to scroll through the thumbnails and then goes outside the movie, the thumbnails continue to scroll.
How can I tell them to stop scrolling when the mouse exits the swf area?
Here is a link so you can see what i'm talking about
http://server.webtekcc.com/~zentz/portfolio.php (http://server.webtekcc.com/%7Ezentz/portfolio.php)
NaughtyPine
June 26th, 2007, 03:38 PM
what about a hit test on the stage that fires of a function to disable the .scroll property when hitTest == false.
Am I making sense?
Let me know how you make out.
seanhennessey
June 27th, 2007, 09:53 AM
Hey, thanks for responding! Not sure that I'm following you though, here is the fla if anyone would take a look it would be very much appreciated, i'm sorta stumped on this one.
www.asimpleart.com/flash/thumbnail_final.fla
jman1
June 27th, 2007, 11:40 AM
I heard that with AS3 there is an event trigger when the mouse moves out of the swf area. I haven't found it myself, but haven't searched thoroughly through the docs. Maybe this could help.
Dazzer
June 27th, 2007, 11:54 AM
I'm really not sure if it any events will work if it goes out of the player
Maybe instead of checking when it goes out, just check the position of the mouse at regular intervals.
OR
make your symbol smaller than the width of the player. just 2 pixels might do the trick! lol
seanhennessey
June 27th, 2007, 12:18 PM
Hey guys, thanks so much for the responses! Here is the problem, I'm not very familiar with this gallery, I used the popular scotty's gallery with infinite horizontal scroll, but not really sure what is activating the scrolling. I tried moving the buttons and such, but doesn't seem to effect it much.
I'm a novice actionscripter, could anybody pick apart the code for me so maybe i could see whats going on? thanks!!!!
devonair
June 27th, 2007, 12:43 PM
didn't look at the .fla, but Event.MOUSE_LEAVE is triggered when the mouse leaves the .swf and may be what you're looking for..
greggreg
June 27th, 2007, 03:24 PM
i checked out the fla, its actionscript 2. i dont know how strict the rules are but this is the actionscript 3 forum and thus this post is in the wrong place.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.