Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Auto/Hide with Flv playback doesn't work with javascript lightbox, need help?

New Here ,
Aug 20, 2008 Aug 20, 2008
Hi everyone,

i created some swf loading a flv file in a flv playback and check on the auto/hide parameter. When i test the movie it works very well. BUT, in my website, i put those swf files in Lightbox (javascript computed) and when the mouse goes Over the flash video, it shows the Skin player and when the mouse goes Out, the Skin player stays over the video!? Why? Does someone has an idea on how to force the auto/hide paramater in this case?
Thanks for your help

Orlenka
TOPICS
ActionScript
1.6K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Explorer , Jul 12, 2011 Jul 12, 2011

Found this post when searching for an answer, but didn't find much elsewhere so I'll post my quick and ugly solution here. I'm sure it can be vastly improved, but I didn't have much more than 5 minutes. Note - setting .visible to false just ended up causing the autohide transition to occur over and over, so instead I'm just temporarily moving the whole sprite offscreen.

(AS3, using CS5 component... note that 'player' is the FLVPlayback instance):

//### force 'autohide' when mouse inactive

var time

...
Translate
New Here ,
Aug 21, 2008 Aug 21, 2008
Is there a way to force the Hide action to the skin? i don't see any other parameters for the flv playback to do so :(
Or maybe is there other Action Script 3 tricks? please help, thanks
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 22, 2008 Aug 22, 2008
Does anybody help? Nobody plays with the flv playback?!
To see the problem, may be goes to : www.remedia.lu
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 12, 2011 Jul 12, 2011

Found this post when searching for an answer, but didn't find much elsewhere so I'll post my quick and ugly solution here. I'm sure it can be vastly improved, but I didn't have much more than 5 minutes. Note - setting .visible to false just ended up causing the autohide transition to occur over and over, so instead I'm just temporarily moving the whole sprite offscreen.

(AS3, using CS5 component... note that 'player' is the FLVPlayback instance):

//### force 'autohide' when mouse inactive

var timer:Timer = new Timer(1500, 0);

timer.addEventListener(TimerEvent.TIMER, onTimer);

timer.start();

var skinSprite:DisplayObject;

var prevMouseX:Number;

var prevMouseY:Number;

function onTimer(e:TimerEvent):void {

  //get skinSprite if we haven't already

  if(!skinSprite) {

    var child:DisplayObject;

    for(var i:Number = 0; i < player.numChildren; i++) {

      child = player.getChildAt(i);

      if(i == 2) { //this is the skinSprite

        skinSprite = child;

      }

    }

  }

  //check to see if mouse hasn't moved since last timer event

  if(skinSprite && mouseX == prevMouseX && mouseY == prevMouseY) {

    skinSprite.y = -1000;

  }

  prevMouseX = mouseX;

  prevMouseY = mouseY;

}

stage.addEventListener(MouseEvent.MOUSE_MOVE, stage_onMouseMove);

function stage_onMouseMove(e:MouseEvent):void {

  if(skinSprite) {

    skinSprite.y = 0;

  }

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 26, 2011 Oct 26, 2011
LATEST

You sir rock. This works perfectly.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines