Why do my interface elements keep appearing off-screen? - actionscript-3

I'm developing a mobile app, so I want to test my application by pressing control+enter. When my swf file appears, some interface elements are off-screen. Maximizing the window doesn't help, but if I test scene, it works well.

Related

How can a jsp based application launch a browser with no window frame or tabs or menu or toolbar

I am looking for a way to launch my application in a browser with window frame or tabs or menu or toolbar, is there any way i could achieve that.
For instance i want to launch my application without the part marked in orange. (without tabs or possibility of creating a new tab) and the settings button beside the address bar
Update:
i am adding a image of what i am trying to accomplish...
Thanks in advance

JavaFX8 external canvas in a pane

My application calls for a canvas to be rendered externally. Imagine a BorderPane where the centre pane is a canvas. This canvas needs to be rendered from a combination of an external .html, a .js and a .css file. My JavaFX app will write these files as a result of what the user chooses in the left pane, right pane etc. of the BorderPane. In other words, much like a paint program, the user can create a design.
Then my thoughts were to execute a browser in the centre pane and use something like liveReload to monitor the underlying file system. That works, but I have no control over the browser window e.g. Chrome in kiosk mode expands to the screen and not to the centre pane.
Then I looked at external renderers such as Mozilla XUL, but that seems to be close to deprecation.
The reason for needing this, is that the final files (html, js and css) will be rendered in kiosk mode by a totally separate system that does not support JavaFX, but does support HTML canvas.
Should I forget about JavaFX alltogether and write the whole app in some other language/system/framework or can anyone throw some ideas into the pot?

Adobe AIR bring to front

I have an adobe AIR app. When I send some data with a local connection from a web page, I want the app in front of the browser and all the other windows.
I tried with both activate() and orderToFront() but I have no results.
The only script working is:
window.alwaysInFront=true;
window.alwaysInFront=false;
But this doesn't give the focus to the app. So when I click the button on the browser, I have the app on the top, but if I click on the browser the app stays on top until I click on it (giving it the focus) and than I click on the browser window again. It works fine If I click on the browser top bar.
I think that activate() would solve the problem giving the focus to the app, but doesn't work.
Here it is the code (I worked with the native window to resize, minimize and maximize the window too). The function I call from local connection is "primopiano"
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.display.MovieClip;
import flash.display.NativeWindow;
var window = stage.nativeWindow;
function trascina (event:MouseEvent) {
window.startMove();
}
...
function primoPiano (event) {
trace("porto in primo piano...");
//window.activate(); // doesn't work
//window.orderToFront(); // doesn't work
window.alwaysInFront=true;
window.alwaysInFront=false;
}
Did I forgot to import something or do I have to define a different window to do this?
Thanks!
Nadia
Have a look at the Documentation and API Reference
AIR provides several methods for directly changing the display order of windows. You can move a window to the front of the display order or to the back; you can move a window above another window or behind it. At the same time, the user can reorder windows by activating them.
You can keep a window in front of other windows by setting its alwaysInFront property to true. If more than one window has this setting, then the display order of these windows is sorted among each other, but they are always sorted above windows which have alwaysInFront set to false. Windows in the top-most group are also displayed above windows in other applications, even when the AIR application is not active. Because this behavior can be disruptive to a user, setting alwaysInFront to true should only be done when necessary and appropriate. Examples of justified uses include:
Temporary pop-up windows for controls such as tool tips, pop-up lists, custom menus, or combo boxes. Because these windows should close when they lose focus, the annoyance of blocking a user from viewing another window can be avoided.
Extremely urgent error messages and alerts. When an irrevocable change may occur if the user does not respond in a timely manner, it may be justified to push an alert window to the forefront. However, most errors and alerts can be handled in the normal window display order.
Short-lived toast-style windows.
Note: AIR does not enforce proper use of the alwaysInFront property. However, if your application disrupts a user’s workflow, it is likely to be consigned to that same user’s trash can.
I have tried:
window.alwaysInFront = true;
window.alwaysInFront = false;
window.activate();
You could also try with a reference to a display object on the window stage:
displayObject.stage.nativeWindow.alwaysInFront=true;
//(where displayObject is your instance name)
And works fine. I'm using Adobe AIR 4

Actionscript 3 - ESC making application to go out of fullscreen mode

So, how do I make it so that so when I got my application at StageDisplayState.FULL_SCREEN, it wont make it StageDisplayState.NORMAL on pressing esc? like if I want to make an in-movie pop-up menu, which appears on esc that includes all the options like exit and fullscreen or not -settings?
If you are making a web based swf then there is no way to stop the escape key from quitting full screen mode, because of the security problems associated with not being able to leave a full screen movie. However if you are making an AIR application then there might be some work arounds that I am unsure of.
More in depth explanation

Android application on Tizen

I am working on Tizen. Developing an application on Tizen which has been already developed by me on Android.
I have to place an image in the background.and then place button on it. Click on that button and receive its action in javascript.
How can I place image in the background.
Is their any way to transfer android application on Tizen platform.
Can we make our android application on Tizen?
background-image in CSS can do it.
E.g. put mesh_background_1280x720.jpg into images directory than fix your style.css:
body {
background-image: url("../images/mesh_background_1280x720.jpg");
}
For me this works.
You can do it by using Jquery Mobile.
.ui-icon-myapp-custom {
background: url("settings.png") no-repeat rgba(0, 0, 0, 0.4) !important;
}
in HTML,
<a href="#user_info" data-role="button" data-theme="b" data-iconpos="right" data-icon="myapp-custom" >
Custom Icon
</a>
For detail, check
http://jquerymobile.com/test/docs/buttons/buttons-icons.html
Currently there is no support in Tizen SDK to convert Android app to Tizen. But there is a way. A company Open Mobile developed ACL(Application Compatible Layer) for tizen. If you have Android app, you can submit it to them, they can convert it for Tizen. All application credit will be name on you. They will get a amount from samsung. Search ACL in Tizen store, you will find several application under ACL.
I can tell you how to do this using Tizen Native (WYSIWYG). If you are seeking a code based answer, then ignore this. HOWEVER, for those trying to learn and navigate within Tizen Studio this is very helpful!
Start Tizen Studio
File/New Tizen Project
Template / Next
Mobile / Next
Native Application / Next
UI Builder Single View (Bottom Left) / Next
In the Project Explorer (Top Left) open the tree to Layout / Layout.xml (Double click to open the Layout).
Choose Design Tab (Center)
In Palette , UI Container (just to right of center)
Drag "Grid" from the Palette onto your screen
In Properties Tab (far right or turn on: Window/ Show View/ Other/ choose properties OK)
Change Col Count to 720 and Row Count to 1280
Drag "Grid" from the Palette onto your screen
Now you should see more (22) UI Components
Drag "Background" from the Palette onto your screen
If it does not automatically resize (Hello BUG) then do the following. Drag to a little LARGER then your screen size (assuming HD, Look into this I think this is REQUIRED by the Tizen Store).
With Background highlighted, again go to Properties Tab, bottom Variation Attributes make:
Left 0, Top 0, Width 720, Height 1280. The first few times it will give you trouble until you figure out that the BG resized window can't go higher than the BLUE TOP and the window should be larger on the bottom, until you manually type in the CORRECT SIZE as shown above.
Now go to or open your Resource Tab (just drag and drop files here from Windows Explorer) and find your background image that you already RESIZED CORRECTLY in Adobe PS and used SAVE FOR WEB to reduce jpg file size.
Drag onto Background "layer" on your Screen.
For a button you can:
Drag "BUTTON" from UI components onto Background OR BETTER is to drag "IMAGE" from UI components onto Background...
Then drag and drop (PRE-MADE BUTTON from Adobe PS) image from the Resource Manager Tab onto the empty image place holder. You will have to resize it manually in the Properties Tab to get the correct proportions.
REPEAT for more Images and Buttons and Text since the built in text "Label" is horrible to say the least. You can always make any of these do Button Actions.
This is as far as I have come, now I need to learn how to program said buttons and actions.
Whew! This will save you many weeks!
Wish I had found a step by step like this!
Now where to post this?
IO
P.S. If you find this useful. Tick the little black up arrow to up vote this. Purely to help others, I receive no reward for "likes".