1
00:00:01,830 --> 00:00:08,310
OK, moving right along in this video, we want to start to add the slider down here that will go horizontally,

2
00:00:08,700 --> 00:00:14,300
left or right, that we can use to sort of rewind and fast forward through a song while it's playing.

3
00:00:14,310 --> 00:00:15,390
So a song starts.

4
00:00:15,390 --> 00:00:20,760
We want to move it towards like halfway through the song, we grab our slider, pull it over, and now

5
00:00:20,760 --> 00:00:23,210
it moves it to halfway through the song.

6
00:00:23,220 --> 00:00:25,040
So that's we're going to start to do in this video.

7
00:00:25,050 --> 00:00:28,530
Now, this is going to take us a few videos to do this, sort of probably the most complicated thing

8
00:00:28,530 --> 00:00:30,300
that we're going to work with in this course.

9
00:00:30,660 --> 00:00:32,610
But that's why we left it to last.

10
00:00:32,730 --> 00:00:33,630
And it's not that hard.

11
00:00:33,640 --> 00:00:38,130
We've already done one slider, so we know we've got the basic slider mechanisms down.

12
00:00:38,820 --> 00:00:44,730
We're just going to sort of hypercharged them a little bit to make them to make it work inside of the

13
00:00:44,730 --> 00:00:47,190
actual songs that are playing and should be fun.

14
00:00:47,220 --> 00:00:48,360
So let's go ahead in this video.

15
00:00:48,360 --> 00:00:52,710
Let's just like sort of make the slider like we did in this video where we just kind of put it up on

16
00:00:52,710 --> 00:00:53,220
the screen.

17
00:00:53,220 --> 00:00:56,310
So let's head back over to our code and let's come down here.

18
00:00:56,850 --> 00:00:59,340
And where was our last slider?

19
00:01:05,160 --> 00:01:13,500
Maybe underneath that, let's go ahead and create a song Slider, and let's call this song Underscore

20
00:01:13,500 --> 00:01:16,410
Slider, and this is going to be a tech actually.

21
00:01:16,410 --> 00:01:20,430
Let's just go ahead and copy all of this and paste it.

22
00:01:20,430 --> 00:01:21,980
And just to make this easier.

23
00:01:24,780 --> 00:01:31,470
So we wanted to go from zero to not one for now, let's put it to one hundred, though we're not going

24
00:01:31,470 --> 00:01:32,190
to keep it like this.

25
00:01:32,190 --> 00:01:34,680
What we want it to be is the length of the song.

26
00:01:34,680 --> 00:01:37,350
So we're going to have to get the song length and we'll do that later.

27
00:01:37,350 --> 00:01:39,720
But right now, we're just putting it up on the screen.

28
00:01:39,720 --> 00:01:42,000
So let's go from zero to one hundred.

29
00:01:42,000 --> 00:01:43,320
And we don't want this to be vertical.

30
00:01:43,320 --> 00:01:46,740
We want this to be horizontal and small capital.

31
00:01:47,770 --> 00:01:55,990
And here the link, let's put this to 360, I happen to know that's sort of how far our playlist boxes

32
00:01:55,990 --> 00:01:58,180
and we wanted to sort of line up with the playlist box.

33
00:01:58,180 --> 00:01:58,500
Right.

34
00:01:58,900 --> 00:02:04,480
And let's start out with a value of zero, because we wanted to start at zero because a song starts

35
00:02:04,480 --> 00:02:07,570
at zero right before it starts at zero.

36
00:02:07,720 --> 00:02:10,340
And then as the time goes on, it increases.

37
00:02:10,660 --> 00:02:12,300
So for now, we'll put that to zero.

38
00:02:12,700 --> 00:02:18,550
And for the command, let's call this, I don't know, slide, slide.

39
00:02:18,670 --> 00:02:20,170
That was just called a slide.

40
00:02:20,470 --> 00:02:23,290
OK, now we'll create this function in just a minute.

41
00:02:24,160 --> 00:02:26,280
So now let's pack this guy onto the screen.

42
00:02:26,290 --> 00:02:28,750
So song underscore slider.

43
00:02:29,020 --> 00:02:30,010
And we don't want to pack.

44
00:02:30,010 --> 00:02:31,540
We want to grid this.

45
00:02:31,960 --> 00:02:36,550
And so we want it to go underneath our volume or our player control.

46
00:02:36,550 --> 00:02:38,500
So the play button, the stop button, the pause button.

47
00:02:38,740 --> 00:02:45,050
And so the playlist is in row zero, the buttons for the play buttons and whatnot or in row one.

48
00:02:45,280 --> 00:02:50,020
So this needs to go in row two and then column zero.

49
00:02:50,500 --> 00:02:50,820
Right.

50
00:02:50,980 --> 00:02:54,610
And we also kind of want to push it down a little bit so it's not right up against those buttons.

51
00:02:54,610 --> 00:02:58,590
So let's give this iPad y of, I don't know, like twenty just to see what this looks like.

52
00:02:58,600 --> 00:03:02,020
So let's go and save this and let's run this guy and see what it looks like.

53
00:03:02,170 --> 00:03:05,650
We're going to get an error because we didn't create our slide function yet.

54
00:03:05,650 --> 00:03:07,590
So let's do that real quick.

55
00:03:07,780 --> 00:03:13,150
So let's come up here and actually I'm going to put this ad.

56
00:03:13,150 --> 00:03:13,670
Does it matter?

57
00:03:13,750 --> 00:03:16,060
Let's put it there at the bottom here.

58
00:03:17,040 --> 00:03:18,330
So let's create.

59
00:03:19,350 --> 00:03:25,020
A slide function for song positioning.

60
00:03:26,480 --> 00:03:27,680
And let's define.

61
00:03:29,530 --> 00:03:30,530
Slide.

62
00:03:30,550 --> 00:03:35,530
And again, we we need to pass in a variable and let's just say pass for now, it doesn't matter what

63
00:03:35,530 --> 00:03:39,220
this variable is called X you could call it events.

64
00:03:39,220 --> 00:03:41,260
You could call it hello.

65
00:03:41,590 --> 00:03:42,540
Does it really matter?

66
00:03:42,550 --> 00:03:46,210
Just call it anything, but I'm just going to call it X, because that's sort of a convention when you

67
00:03:46,210 --> 00:03:49,500
have a variable that you don't really want to name, just name it X.

68
00:03:49,520 --> 00:03:52,360
So, all right, let's go and say this and see what this looks like.

69
00:03:54,090 --> 00:03:56,260
How is geometry manager?

70
00:03:57,250 --> 00:04:00,370
Where did we do that line one ninety five.

71
00:04:01,580 --> 00:04:05,700
It's a volume frame, we don't want to put our new slider in the volume frame.

72
00:04:05,920 --> 00:04:08,060
We want to put it in our main frame.

73
00:04:08,440 --> 00:04:11,950
That's what I get for copying and pasting are a volume slider.

74
00:04:11,950 --> 00:04:13,990
So let's see right here.

75
00:04:13,990 --> 00:04:17,440
Instead of volume frame, we want to put it in the main frame.

76
00:04:17,440 --> 00:04:21,820
So, OK, so our song Slider is in the main frame road to column zero.

77
00:04:21,970 --> 00:04:23,040
OK, so that looks good.

78
00:04:23,110 --> 00:04:23,320
Go good.

79
00:04:23,340 --> 00:04:25,770
Save this and let's clear the screen.

80
00:04:25,810 --> 00:04:26,980
Get rid of all those errors.

81
00:04:28,360 --> 00:04:34,360
And pretend like they never happened because I never have errors and OK, so this is going this is sort

82
00:04:34,360 --> 00:04:37,720
of lined up with that that looks decently sized.

83
00:04:38,500 --> 00:04:42,430
If it's a little bigger to your eye, you can make it, you know, three fifty eight or something.

84
00:04:42,430 --> 00:04:45,780
But that's good enough for me and OK, so that's looking good.

85
00:04:45,790 --> 00:04:46,150
So.

86
00:04:47,440 --> 00:04:49,330
We can move this thing around.

87
00:04:50,450 --> 00:04:55,970
And OK, so I think that's all for this video in the next video, we'll start to actually work through

88
00:04:56,180 --> 00:05:00,470
turning this slider into an actual song slider that actually moves our songs around.

89
00:05:00,620 --> 00:05:02,330
And we'll start to do that in the next video.
