www.webdeveloper.com
Results 1 to 10 of 10

Thread: actinscript needed "pause on mouseover"

  1. #1
    Join Date
    Nov 2006
    Location
    Canyon Lake, TX
    Posts
    86

    Red face actinscript needed "pause on mouseover"

    Hi all,

    Still teaching myself Flash - still confused about actionscript.

    I have created a VERY simple slideshow. 6 pictures, same size, one per keyframe in the timeline, set to 1 frame per second. It plays just like I want it to.

    Now I need actionscript.

    I want the slideshow to pause when someone hovers a mouse over it and continue the slideshow when the mouse is moved.

    That's it. No clicking, no enlarging, no special effects. Just pause and continue.

    If someone could give me the actionscript to do this it would help as I learn by seeing, reading and trying.

    Thank you!



    ...What I really need is a book that details for dummies how to use the actionscript events so I can learn how to fill them in and get them working - but that is for another day.... unless someone knows where can find that.

  2. #2
    Join Date
    Aug 2007
    Posts
    13
    buttonName.onRollover = function () {
    stop();
    }

    buttonName.onRollOut = function () {
    play();
    }

    Try this, should be simple enough

  3. #3
    Join Date
    Nov 2006
    Location
    Canyon Lake, TX
    Posts
    86

    Code not working?

    I appologize for being so dense when it comes to this. I converted my pictures to a movie clip and then added the coding/action to scene1 (the frame that holds the movie clip. I am not getting any error messages which is what I usually get but no actions either.

    Maybe I did something wrong? I named the movie clip tshirts and this is the coding of yours I used:

    tshirts.onRollOver = function () {
    stop();
    }

    tshirts.onRollOut = function () {
    play();
    }

    It sure looks like it should work. What am I missing?

  4. #4
    Join Date
    Oct 2006
    Location
    Heaven
    Posts
    211
    Try this:
    Code:
    // this removes hand cursor from appearing
    tshirts.useHandCursor = false;
    
    
    
    
    this.tshirts.onRollOver = function ()
    {
    	this.stop();
    }
    
    this.tshirts.onRollOut = function ()
    {
    	this.play();
    }
    Born to kick booty!

  5. #5
    Join Date
    Nov 2006
    Location
    Canyon Lake, TX
    Posts
    86

    still not working

    Well I don't want to hide the hand but I tried the code just like you had and it didn't work. I even tried it with true (to show the hand) and it didn't work. And of course if I go in and try to edit the code in any way I get numerous error messages. I guess i just don't understand how actionscript works because that first code sure looked like it should work, perfectly and it did nothing.

    Is there another code I can try? To add to a movie clip that will pause the movie clip when the mouse rolls over it and when the mouse moves away to start the movie clip again. It is just 6 pictures showing at one second at a time. It really seemed like it should be easier than this.

    Does anyone know where I can read more abot actionscript, learn how the heck it works and how to fill out the actionscript assist?


  6. #6
    Join Date
    Oct 2006
    Location
    Heaven
    Posts
    211
    Here ya go,

    Check out the second post in this thread : http://www.actionscript.org/forums/s...d.php3?t=59141

    You can just download the zip file and open it in flash and use the code, it definitely works.

    My example works for ActionScript 2, I have it working in several of my websites.

    That zip file should settle it for ya.
    Born to kick booty!

  7. #7
    Join Date
    Nov 2006
    Location
    Canyon Lake, TX
    Posts
    86

    Red face yours works mine still doesn't

    Hi webjedikungfu,

    I appreciate your patience and appologize for my ignorance. I went and downloaded your file and have spent over half an hour trying to figure out what is different on mine versus yours and can't.

    The first thing I noticed was I hadn't made a seperate layer for the actions so I did that and gave it a try, still didn't work. I am of the beleif it is either in the name of the movie clip or the way the movie clip has been created.

    My file is 450kb (too big to attach) so I have included a link to download it from my website and was hoping you could take a look at it and tell me what I am still doing wrong.

    go to: http://www.kathleens-graphics.com/Tanners%20TShirts.zip

    I really do appreciate your time on this!

    -Kathleen1357
    Last edited by kathleen1357; 08-29-2007 at 10:26 AM. Reason: file didn't attach

  8. #8
    Join Date
    Oct 2006
    Location
    Heaven
    Posts
    211
    Below is the zip to your fixed file.(works now)

    The thing that was stopping yours from working was that you had no instance name given to your movie clip in the properties inspector.

    So your actionscript was sound, just had nothing to attach itself to.

    http://www.flashbuilding.com/zip_dir...rs_TShirts.zip

    Any questions just jot em' down.


    research "instance name" of movieclips.
    Born to kick booty!

  9. #9
    Join Date
    Nov 2006
    Location
    Canyon Lake, TX
    Posts
    86

    Talking THANK YOU!!!!!!!! Webjedikungfu!!!!!

    THANK YOU!!!!

    I could not have done this without your tip to research instance name. As long as I know WHAT it is I need to look for I can find it.

    At first I was like, awe shucks he didn't insert the file, just the proof that it works but then I said, okay lets do this reasearch and I am SOOO GLAD I did. When I finally found where the instance name goes and tried out my file and it worked it FELT SO GREAT!!!

    So thank you. Thank you for helping me figure this out. Now I feel one step closer to figuring out this darn program.

  10. #10
    Join Date
    Oct 2006
    Location
    Heaven
    Posts
    211
    Hey Kat,

    That's awesome! Down the rabbit hole you go!

    Born to kick booty!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles