A Flash Developer Resource Site

Results 1 to 11 of 11

Thread: This might be really simple, but...

  1. #1
    Junior Member
    Join Date
    Feb 2010
    Posts
    4

    This might be really simple, but...

    All I want to do is make something when my mouse enters or leaves the frame in actionscript 2.0. This is how new I am to this actionscript business.

    Any thoughts?

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    What do you mean by frame? Is frame a movieClip?

    gparis

  3. #3
    Senior Member
    Join Date
    Jan 2010
    Location
    England
    Posts
    268
    dont understand what you mean
    be more specific please.
    might be addicted to flash...
    _______________________________________

  4. #4
    Junior Member
    Join Date
    Feb 2010
    Posts
    4
    By the frame, I mean the area of white that you are given to begin with when you start a new project. :P

  5. #5
    Senior Member
    Join Date
    Jan 2010
    Location
    England
    Posts
    268
    that didn't help much..that area's called the stage. and you cant stop the users mouse since they need it to function with their computer but you can hide and show it at certain points with Mouse.hide() and Mouse.show() in the actionscript panel. if your trying to do something specific then tell us properly so we can try to help..
    might be addicted to flash...
    _______________________________________

  6. #6
    Flash Intermediate XenElement's Avatar
    Join Date
    Sep 2008
    Location
    At my computer
    Posts
    196
    I believe he means that he wants to create or show an object when the mouse is on the stage. so I'm not sure what it is exactly in AS2, so someone else needs to help on the exact code.
    In the process of designing a quirky little game engine called gulp. Check out it's progress below: @ my blog.

    ---

    Check out my blog at XenElement.com

  7. #7
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    @habberjabber, when the mouse is outside the flash, you can't make anything happen with Actionscript, since you are not interacting with the flash but with the html page it's embedded in. You'll need to use Javascript if you want something to happen when hovering in and out of a div (for example). I suggest you post in the Scripting & Backend Forum.

    gapris

  8. #8
    Senior Member
    Join Date
    Jan 2010
    Location
    England
    Posts
    268
    yeah you'll need to use actionscript's mutated half-brother "javascript" to do something like that on a webpage, but if you want to what xen said you could have a transparent square over the stage and use onRollOver with a var, the var would be true on the rollover and false on the rollout. if the var is false at anytime the code cannot work.would work a treat, then again maybe not but its just a thought.
    might be addicted to flash...
    _______________________________________

  9. #9
    Junior Member
    Join Date
    May 2010
    Posts
    26
    if you want to make something happen when you leave the stage(the white area) you could just make a invisible border to react with right?:P
    for 1 pixel difference i wouldnt move to java hehe

  10. #10
    Junior Member
    Join Date
    Feb 2010
    Posts
    4
    Thanks guys, sorry I was a bit vague. I think I might try what was mentioned in the last two posts as messing with javascript is a bit much for me at the moment.

    Thanks again for all the posts. You never know I might try the javascript in the near future. Is it easy to get to grips with?

  11. #11
    Senior Member
    Join Date
    Jan 2010
    Location
    England
    Posts
    268
    it is when you've had a long love affair with flash & actionscript, there sort of similar.
    might be addicted to flash...
    _______________________________________

Tags for this Thread

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center