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

Scaling content to fit spesific devices

Finally we are done talking about orienting things. Congrats we are ready to move on to the next topic %u2013 not that far away and yet connected to what we where talking about before. Ratios and scaling. There are are different ways to scale our content. Ideally we would want to use one application that would work for all but what if we wanted to create a custom build for a specific device. To do that we can rescale our content using the properties panel on flash. In this video we will show you how to scale your content in seconds with Adobe Flash CC.

Video Transcript

00:00Welcome back. So we're done with auto orientation and with orientation in general you already know
00:05how to create dynamically resizing content that changes size as the monitor changes. But let's
00:12talk now about different sizes of devices. So you might have an older device or a newer device if
00:18it's a phone if it's a tablet and they all come in various different sizes. Their ratios are
00:23usually more or less the same but they're not exactly the same. Now for example in our case
00:28our default size for our application right now is 480 pixels by 800 but we are resizing the content
00:35to fit the screen. With that said, what if we wanted to create a variation that was a custom
00:40fit for a specific size of a specific device. So for example right now I'm with the Samsung Galaxy
00:47S3 and the Samsung Galaxy S3 its resolution is a 1280 by 720. Now if I just went into my properties
00:57panel and by the way this you could resize with any version of flash really since flash is out you
01:02could resize your properties. But one of the most frustrating and complicating things to do in earlier
01:08versions of flash was to make sure that everything scales appropriately if you want to resize your
01:13content bigger or smaller. Now if you had a lot of layers it would become really cumbersome to
01:18go through every layer and all the different time if you had animations going on and so on
01:23and so forth it would make it really difficult to set it up. But since flash CS5.5 and up and
01:29you know CS6 came out already we're in flash cc which is even a later version of flash.
01:34So since that version since flash professional flash CS5.5 the capability of resizing your content
01:41dynamically in your publishing settings became available and I want to show you how to do it.
01:47The first step is to go into your properties panel. The way you get into your properties panel
01:52is making sure that you select an empty area on your stage. Once you do that your properties
01:57panel itself will have the properties settings. In the properties settings you could click here on
02:02the edit button, edit document properties and once you do that is going to open up the document
02:09settings. In the document settings you want to make sure that your units are pixels if it's
02:13not that it should be selected by default as pixels and then you could resize your stage.
02:18So let's do that we want to resize our stage to be fitting for the Samsung Galaxy S3 and in that
02:24case basically we want to make it 1280 by 720. So I'm going to set my width to 720 and my height
02:33to 1280 because we're we're our default is our horizontal version. All right now the next stage
02:40is we want to set our scale content by clicking on the scale content we're going to get access
02:45to enable us to basically resize our content inside of our everything inside of our application
02:50will be resized to fit this new dimensions. With that said because our content might not be exactly
02:58the same ratio but with a margin of some sort we it's best for us also to define where do we
03:03want our content to go. Do we want it to be locked to the top? Do we want it to the center? Do we
03:08want it to any other position? A good start probably would be to lock it to the center so
03:12we're going to select the center area and that's all we really had to do. Once we click on okay
03:18notice what happens our content will automatically grow as our stage grow and that leftover margin
03:24is right there on the top and bottom as it was before. Now if I save this and I run my
03:30application by clicking again I have my phone connected so I'm going to click on the debug
03:34menu and just run the debugger.

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!