|
|
#1 |
|
Registered User
Join Date: May 2006
Posts: 15
|
return to original position
Hi NC
I have a very fixed start of my application, that I would like it to return to after it has been dragged around the screen. I notice there is a win.restore-possibility after an application has been mini- or maximized. But I cant get it to apply with my application - if it actually works in the sítuation that I need it to. The return to the original posistion should be excuted by a button in a child-movie, that refers to a frame in the main-movie. Hope you can help. |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Jun 2002
Location: Ottawa
Posts: 4,368
|
ssCore.Win.restore is the same as right-clicking on the program button in the Windows taskbar and selecting Restore - it's the menu that also contains Maximize, Minimize, Close, Move and Size.
What you're looking for is ssCore.Win.setPosition. That will let you set the x and y co-ordinates of the application window.
__________________
Derek Vadneau (mbd) - Northcode Support Home | Download Free Trial | Buy / Upgrade How does SWF Studio Work? | Online Help | Knowledge Base (FAQs) | Examples | Known Issues ActionScript API: Code Wizard - New to SWF Studio V3? Step through this wizard and sample code is displayed. FAQ: How do I enable synchronous commands? |
|
|
|
|
|
#3 |
|
Registered User
Join Date: May 2006
Posts: 15
|
What I want it to, is to return to the upper right corner placed after the windows minimized-button - seen from the right.
That position varies from screen to screen if it's positioned from the default left. What I was hoping for was a function where I could position it as 20 pixels from the right. I have tried to use setStageAlign, but I dont get it. Either I have misunderstood the function or my code is wrong Look at this. ssDefaults.synchronousCommands = true; ssCore.Win.setStageAlign({align:TR}); //I guess it means TopRight ssCore.Win.setPosition({x:20, y:0}); Here the setPosition alone places the application in top just a little to the left of the screen middle. The setStageAlign doesn't seem to change anything at all. |
|
|
|
|
|
#4 |
|
Administrator
Join Date: Jun 2002
Location: Ottawa
Posts: 4,368
|
The desktop is not the Stage. setStageAlign is the same as Flash's Stage.align property, only it tells SWF Studio that you are changing that property so it can properly align objects like the video player and embedded browser relative to the Flash Player window.
What you need is to know the size of the desktop and position the window accordingly. For example: ActionScript Code:
__________________
Derek Vadneau (mbd) - Northcode Support Home | Download Free Trial | Buy / Upgrade How does SWF Studio Work? | Online Help | Knowledge Base (FAQs) | Examples | Known Issues ActionScript API: Code Wizard - New to SWF Studio V3? Step through this wizard and sample code is displayed. FAQ: How do I enable synchronous commands? |
|
|
|