A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: on(rollOut) but with javascript?

  1. #1
    Gods cower, women quiver. Buckwheat469's Avatar
    Join Date
    Dec 2003
    Location
    Uranus
    Posts
    247

    on(rollOut) but with javascript?

    I've noticed that the on(rollOut) statement is pretty touchy when you wanna figure out if the user is entirely out of the movie. I have a clip that's the entire length of the document in Flash and I want to have a rollOut on it, but one that records whether the user has rolled out of the entire swf file. Is there a way to integrate javascript using a variable to check if the user is outside of the swf boundaries?

    I would associate it to moving your mouse out of an image, like a rollover, but instead of doing the rollover it sets the variable to true or false. Then the swf would resume play or stop play.
    yup.

  2. #2
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Yes you can use javascript to detect if the mouse is over the movie or not... But since your saying the movies occupies the whole screen, what "outside" of the movie do you want to check for? The browser's borders?

  3. #3
    Gods cower, women quiver. Buckwheat469's Avatar
    Join Date
    Dec 2003
    Location
    Uranus
    Posts
    247
    Not outside the screen but outside of the swf's working document area. Say the document in Flash is 300x120 and a movie clip on the frame is also 300x120. You obviously couldn't use a rollOut statement (or hittest), but I was wondering if you could just use a rollover command in Javascript and then link the javascript "True" variable to Flash.

    if(javascript = 'true'){
    dosomething;
    }else{
    dontdosomething;
    }
    yup.

  4. #4
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Yes! Will post an example later today...

    Uses javascript's onMouseOver & onMouseOut events and Flash Methods to control the movie...

    http://www.macromedia.com/support/fl...hflash_03.html

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