Attract-Mode Support Forum

Attract-Mode Support => Scripting => Topic started by: Marcoqwerty on June 19, 2018, 02:59:09 AM

Title: Delay artwork for quick search
Post by: Marcoqwerty on June 19, 2018, 02:59:09 AM
Hello

I've read some topic about this question but no one fully helpful on my theme.

I'm using COOLS theme.

My aim is  show regular snap (png) for a small amount of time and after play videosnap at the end of it.

Better (to no stress the CPU and making some issue during the quick search) load all the artwork togheter with videosnap (wheel and flyer), maybe with a fade.

I hope someone point me in a right direction, specially which file i must to edit.

Thank you!
Title: Re: Delay artwork for quick search
Post by: kent79 on June 19, 2018, 03:01:04 AM
What theme are you using?
Title: Re: Delay artwork for quick search
Post by: Marcoqwerty on June 19, 2018, 03:18:59 AM
https://www.youtube.com/watch?v=_NQpEZfQXHM

COOLS LAYOUT

Damn i checked this video and looks like this feature its already made....mmm...but so no look like my setup... gosh
Title: Re: Delay artwork for quick search
Post by: Marcoqwerty on June 29, 2018, 08:59:51 AM
Actually i seen this feature working on this youtube video but there are no iscructions how made it working on the layout...

I should put togheter VIDEO and SNAP and turn on some setting on the .nut file?
Title: Re: Delay artwork for quick search
Post by: jedione on August 20, 2018, 06:49:34 PM
this is i think what you are looking for...


Code: [Select]
//
// Videotheme Timer Code By qqplayer
//

::OBJECTS1 <- {
artwork_videotheme = fe.add_artwork("video", flx*0.3125, 150, 270, 190),
}

OBJECTS1.artwork_videotheme.visible=false;

::videoSound <- Vid.NoAudio;
OBJECTS1.artwork_videotheme.video_flags = videoSound;

local settings = {
   delay_timer = 0,
   play_delay = 2000,
   stop_play = 235000,
}

function on_transition_videotheme( ttype, var, ttime ) {
 switch ( ttype ) {
  case Transition.StartLayout:
  case Transition.ToNewSelection:
  case Transition.ToNewList:
  case Transition.EndNavigation:
        OBJECTS1.artwork_videotheme.video_flags = Vid.NoAutoStart;
        settings.delay_timer = fe.layout.time;
        OBJECTS1.artwork_videotheme.visible=false;
       break;
  }
 return false;
}

fe.add_transition_callback( "on_transition_videotheme" );

function on_tick_videotheme(tick_time) {
   if ( !OBJECTS1.artwork_videotheme.video_playing && tick_time - settings.delay_timer >= settings.play_delay ) {
   
        OBJECTS1.artwork_videotheme.video_playing = true;
       
        ::videoSound <- Vid.Default;
        OBJECTS1.artwork_videotheme.video_flags = videoSound;       
       
        OBJECTS1.artwork_videotheme.visible=true;
       
        OBJECTS1.artwork_videotheme.alpha = 0
        local alpha_artwork_videotheme_0 = {
        property = "alpha", start = 0 end = 255, time = 500 easing = Easing.Out,
        }
 
        animation.add( PropertyAnimation( OBJECTS1.artwork_videotheme, alpha_artwork_videotheme_0 ) );
       
    }
   
    else if ( tick_time - settings.delay_timer >= settings.stop_play ) {
       
        OBJECTS1.artwork_videotheme.visible=false;
       
    }
   
}

fe.add_ticks_callback(this, "on_tick_videotheme");

}

it was put together by "qqplayer"

and was used in the last update to my modified by others "arcadesd" theme

let me know if you cant find the theme and ill upload it for ya..