02Geek HTML5 and JavaScript, TypeScript, React, Flash, ActionScript online School
Previous VideoNext Video

Shape Animation Tweaks

We ended our last video with a few hick ups in the animation in between i've added 30 pixels of margin on the bottom of our animation but things still can be better. Come join me as i tinker with this Shape animation.

Video Transcript

00:00So let's see what we could do one thing that we could do and if let's just see it one second one thing
00:05We could do it
00:06We could actually change our y value instead of starting at our zero more or less to start maybe 30 pixels above
00:13To give a little bit more time for stuff to overlap on top of each other and then switch it also maybe 30 pixels below
00:21Now we're already switching at 30 pixels below. So all we have to really do is add maybe that starting point of
00:27Of taking that whole value taking whatever number came back and just subtracting 30 out of it
00:34Making sure there are elements begin, you know a little bit higher now
00:38This might not work well
00:39And let's see if it were if it works well for us or not
00:42Because as we started if you notice you're gonna see that you're gonna have a little bit of a margin on the bottom
00:46If you're fine with that, which I kind of him
00:50Then that's great. But if you're not fine with it
00:52Let's see another thing we could do if we wanted to spread out the elements more
00:56Then what we could have done is instead of that started up with minus 30 and add to it our stage height
01:04But instead of stage height, we're gonna do stage height plus 30
01:07So our initial spread of our stage is more 30 pixels more than the height of our stage
01:13But our position our starting position minus 3 and that way we're making sure it's spread out throughout all of the experience
01:18and as soon as it starts we won't be able to see any gaps and
01:23There you go. And that's all we really needed to do to get our
01:27Sprite sample which was very similar to our original but without using movie clips
01:31Which is much more efficient for flash as it doesn't need to throw into it a lot of stuff that are just not needed such
01:38As the interactivity. It doesn't have to worry about display object containers because shapes could only contain graphics
01:45Which we just drew a graphic on our own
01:47But it can't contain
01:49Timelines it can't contain other display objects that are its children and it can't contain any interactivity

Ready to Level Up Your Skills?

Join thousands of learners on 02GEEK and start your journey to becoming a coding expert today!

Enroll Now for Free!