PDA

View Full Version : Resize a group of objects?


seano
09-29-2005, 06:15 AM
Hi guys,

Can anyone tell me how I can resize all my objects on a page at the same time?

Is this possible?

Regards




Sean

TJ_Tigger
09-29-2005, 06:33 AM
If you are looking to resize at runtime, here is a sample project that should help to get you started.

http://www.indigorose.com/forums/showthread.php?t=12944

Tigg

seano
09-29-2005, 06:49 AM
Hi I've tried this, but my flash intro page dosen't resize! Any suggestions?


Sean

TJ_Tigger
09-29-2005, 07:01 AM
Is it a flash splash introduction or a page with a flash object on the page as your introduction.

Can you post your project or part of your project so we can help in finding out why it doesn't want to resize?

Tigg

seano
09-29-2005, 07:21 AM
It's a page with a flash movie on it! I'll attatch it here now!

I just burnt a copy to disc to try it on another PC with a smaller screen and none of it resizes!!

Sean

Dermot
09-29-2005, 08:17 AM
Hi Sean

You need to use the export option in AMS and then attache the .apz file. We cannot test it because all the resource files are missing. From what I can tell from your cose it should work.

Regards

Dermot
09-29-2005, 08:33 AM
OK I think I see your problem. It is the code you have in the project On Startup. Try commenting that out and put the following in the On Show event of the first page.

Window.Maximize(Application.GetWndHandle(this))

Your code was resizing the window before the resize code had a chance to get the original size and position of all the objects.

seano
09-29-2005, 10:32 AM
Hi Dermot,

I'm really lost now!!

Can you explain what I need to do?


Thanks



Sean

Dermot
09-29-2005, 12:33 PM
Hi Sean

Under Project > Actions > On Startup you have the following:
-- Get the user's screen size
screen_info = System.GetDisplayInfo();

-- set the application size to same as screen size
Window.SetSize(Application.GetWndHandle(this), screen_info.Width, screen_info.Height-10);

-- position application window to top left
Window.SetPos(Application.GetWndHandle(this), 0, 0);

Try removing the above and place the following in the On Show event of the first page.
Window.Maximize(Application.GetWndHandle(this))

This will maximise the window to fill the screen and then the resize code will resize and position all the objects.

seano
09-30-2005, 03:33 AM
Hi Dermot,

Do I leave the code in the OnPreload as: Resize_OnPreLoad(); on the first page?

Have you tried this yourself and did it work?

Thanks



Sean

seano
09-30-2005, 04:14 AM
Ignore my last comment about the OnPreload. Just tried it duhhh!!

The first page will not resize the flash movie! I can resize the window but it doesn't resize the flash movie!!

Also when I build this to a disc, none of the pages resize???????

I am currently pulling my hair out and am against time!

Sean

rhosk
09-30-2005, 05:06 AM
Settings - Page Size - "huge" 1270x969
Flash attributes - 1270x970 (which is off the page btw)

What do you want it to resize to? It's already max'd out to your stage, and then some.

What is your display resolution? Mine is currently set to 1024x768 and I substituted your flash file with the globe.swf and it can't render full screen without being cutoff, no matter what resize code is used.

I think the object of the resize code is meant to start off fairly small and resize/scale all objects accordingly. The size of your project in general is preventing that from the git-go ;)

Dermot
09-30-2005, 08:45 AM
Hi Sean

Yes leave the resize code in the OnPreload, Close and Resize envents. Yes I have done this with other projects and it works fine. I have not tested it with your because I can't run because you do not upload all the files. (see my response about exporting as a .apz).

The difference with my projects is they are designed at 800 x 600 so they only need to expand when run on a higer res but will rarely if ever need to be reduced.

Idealy you should design at the lower res because if your app is reduced in size too much for example to 800 x 600 ir may look strange. Labels for one thing will not chnage size and may get cust off.

If you can upload the whole project or at least a couple of pages, that would help.

Also try reducing the size of the flash object so that it is not off the page. That maybe causing it to not resize. Just a thought.