Author Topic: Transport Buttons for Videos inside Scala Designer?  (Read 388 times)

Offline TGrabosch

  • Jr. Member
  • **
  • Posts: 15
  • Karma: 0
    • View Profile
Transport Buttons for Videos inside Scala Designer?
« on: January 29, 2016, 08:48:15 AM »
Hello

Is there a way to control a video inside of a scala script with transport buttons. I only need "pause" and "restart".

Thank you.

Offline lufo

  • Full Member
  • ***
  • Posts: 123
  • Karma: 1
    • View Profile
    • M-Cube s.p.a.
Re: Transport Buttons for Videos inside Scala Designer?
« Reply #1 on: February 05, 2016, 05:31:47 AM »
Code: [Select]
!ScalaScript1100
// Saved by Scala Designer Release 11.00.06 at 2016-02-05 11:28:56
:"VideoPause.sca"
{
  Group:
    Template FileNameString(Video("myvideo.mp4"));
    Boolean(sVideoPause);
    Integer(sVideoStart, sClock);
    BackgroundSettings(Size(1920, 1080));
  Sequence:
    :"_TempName1"
    {
      Group:
        Display(Backdrop(Pen(20)), Margin(10, 10, 0, 0), UserPalette(RGBPen(1, $0, $ffffff, $999999, $555555, $712068, $df449c, $dc110e, $662200, $ff5a00, $ff9c00, $ffee00, $8800, $dd00, $cccc, $66ff, $aa, $777777, $bbbbbb, $dddddd, $465a96, $d2d2d2, $b4b4b4, $808080, $5e5e5e, $ff4e48, $ff2925, $c30c09, $a00503)));
        Button(Layer(1), Select(Goto("_TempName1", Bookmark(Off))), NormalOff(Text(948, 1002, "Pause", Backdrop(On), Shadow(Off, Softness(5)), Transparent(Off), Bevel(On), AntiAlias(On), OnReplay(Replace), Font("Segoe Regular (Western [<Segoe>])", 50), Tabs(Relative(On)), Wrap(Off, Width(1890)))), NormalOn(Text(948, 1002, "Pause", Backdrop(On, Pen(7)), Shadow(Off, Softness(5)), Transparent(Off), Bevel(Off, Base(Pen(7)), Left(Pen(26)), Right(Pen(27)), Top(Pen(25)), Bottom(Pen(28))), AntiAlias(On), OnReplay(Replace), Font("Segoe Regular (Western [<Segoe>])", 50), Tabs(Relative(On)), Wrap(Off, Width(1890)))), MatchSize(On), Variable(sVideoPause));
      Sequence:
        {
          Group:
            sClock = Clock;
            MovieClip(0, 0, Video, Transparent(Off), Update(None), OnReplay(Ignore), Operation(On), StartTime(sVideoStart), Wait(On));
            If(sVideoPause = Off);
        }
        {
          Group:
            sVideoStart = sVideoStart + (Clock - sClock)  ;
            Wait();
            If(sVideoPause = On);
        }
    }
}
M-Cube s.p.a.