Stop onRollOver script issues

  • sossity
  • Born
  • Born
  • sossity
  • Posts: 2

Post 3+ Months Ago

Hi everyone-- I'm starting from scratch here-- but I'm trying to get a single Flash swf up on a portfolio site--


--the Flash document is 4 different graphics (which I've made into MC's) -- each image will change into a different picture as the scene continues-- on roll over, I tried to put a stop script to pause the 'slide show' --and another script to resume the scene on roll out. Each picture also has a getURL script attached-- I started something like this ---



Code: [ Select ]
function doStop() {
_root.stop();
}
function doPlay() {
_root.play();
}
eyeshot.onRollOver = doStop();
eyeshot.onRollOut = doPlay();
eyeshot.onRelease = function() {
getURL("http://www.blahblahblah.net");
}
  1. function doStop() {
  2. _root.stop();
  3. }
  4. function doPlay() {
  5. _root.play();
  6. }
  7. eyeshot.onRollOver = doStop();
  8. eyeshot.onRollOut = doPlay();
  9. eyeshot.onRelease = function() {
  10. getURL("http://www.blahblahblah.net");
  11. }



all I have accomplished here is that the MC is a rollover image. Nothing else works-- this my first indepth try at ActionScript. Any help? Do I have the wrong scripts for what I'm trying to do? Thanks in advance:)

-soss
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Posts: 1828
  • Loc: In the Great White North

Post 3+ Months Ago

what you have looks like it should work but try this instead.

Code: [ Select ]
eyeshot.onRollOver = function(){
_root.stop();
}

eyeshot.onRollOut = function(){
_root.play();
}

eyeshot.onRelease = function() {
getURL("http://www.blahblahblah.net");
}
  1. eyeshot.onRollOver = function(){
  2. _root.stop();
  3. }
  4. eyeshot.onRollOut = function(){
  5. _root.play();
  6. }
  7. eyeshot.onRelease = function() {
  8. getURL("http://www.blahblahblah.net");
  9. }


This should prove that your code works but it will only run on the image eyeshot. If this doesn't work for some reason you might have to post more of your code.
  • sossity
  • Born
  • Born
  • sossity
  • Posts: 2

Post 3+ Months Ago

Thanks for the reply :) I put in the code you posted, but it kept the clip the same.. each image rolls over, but the MC doesn't pause and the URL doesn't work-- when I check the script for errors, it tells me there is none, but when I test the movie this comes up--


Quote:
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 1: Syntax error.
function doStop(){

Total ActionScript Errors: 1 Reported Errors: 1





Now here's the code I have down for one MC (3 images):


Code: [ Select ]
eyegrain.onRollOver = function(){
_root.stop();
}

eyegrain.onRollOut = function(){
_root.play();
}

eyegrain.onRelease = function() {
getURL("http://www.blahblahblah.net");
}

beachgrl.onRollOver = function(){
_root.stop();
}

beachgrl.onRollOut = function(){
_root.play();
}

beachgrl.onRelease = function() {
getURL("http://www.blahblahblah.net");
}

bbutton.onRollOver = function(){
_root.stop();
}

bbutton.onRollOut = function(){
_root.play();
}

bbutton.onRelease = function() {
getURL("http://www.blahblahblah.net");
}
  1. eyegrain.onRollOver = function(){
  2. _root.stop();
  3. }
  4. eyegrain.onRollOut = function(){
  5. _root.play();
  6. }
  7. eyegrain.onRelease = function() {
  8. getURL("http://www.blahblahblah.net");
  9. }
  10. beachgrl.onRollOver = function(){
  11. _root.stop();
  12. }
  13. beachgrl.onRollOut = function(){
  14. _root.play();
  15. }
  16. beachgrl.onRelease = function() {
  17. getURL("http://www.blahblahblah.net");
  18. }
  19. bbutton.onRollOver = function(){
  20. _root.stop();
  21. }
  22. bbutton.onRollOut = function(){
  23. _root.play();
  24. }
  25. bbutton.onRelease = function() {
  26. getURL("http://www.blahblahblah.net");
  27. }



The script is on a movieclip--- the 'eyegrain' 'beachgrl' 'bbutton' are buttons with rollover that I placed in the movieclip.

Is there some way to upload my Fla file to the forum?
  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Posts: 1828
  • Loc: In the Great White North

Post 3+ Months Ago

so when you say an image rolls over its because you made it a button with a different image in the over state correct? You don't actually know that the "over"/"out" code here is working.

try _root.play() with
Code: [ Select ]
trace("The rollover worked");
and let me know if you see anything in the output window when you test the movie.

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 14 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.