WindowedApplication or Window?
When my application loads, the WindowedApplication part consists of a logon screen. When I login successfully, the WindowedApplication closes using the close() method and a new Window() instance is created and opened containing the full application. Everything that happens from that point forward is taking place inside the Window() instance.
Is there anything wrong doing it this way from a design and best practice point of view?
Should I be running the main application inside the WindowedApplication instance instead or doesn't it matter?
The Spark WindowedApplication does not have scrollbars by default. If you want a vertical scroll bar, then add it to your application content or create a custom version of WindowedApplicationSkin that has a scroll bar.
-Darrell
Similar Messages
-
Revision: 5313
Author: [email protected]
Date: 2009-03-13 19:10:24 -0700 (Fri, 13 Mar 2009)
Log Message:
Application, WindowedApplication, and Window background color changed to white.
QE Notes: None
Doc Notes: None
Bugs: sdk-16721
Reviewer: Ryan
tests: checkintests, cyclone build tested
Ticket Links:
http://bugs.adobe.com/jira/browse/sdk-16721
Modified Paths:
flex/sdk/trunk/frameworks/projects/airframework/defaults.css
flex/sdk/trunk/frameworks/projects/framework/defaults.css
flex/sdk/trunk/frameworks/tests/checkinapp/checkinapp.cssHi,
When system is in a sleep mode or hibernate mode, it will save the data ans settings in memory or hard disk, so I suggest you run a memory check and a harddisk check and see if it can detect any errors.
Memory check (instruction is similiar to windows 8\8.1, type "memory" in the search charm bar)
http://windows.microsoft.com/en-in/windows7/diagnosing-memory-problems-on-your-computer
Hard disk check
http://technet.microsoft.com/en-us/magazine/ee872425.aspx
Meanwhile, please check event viewer to find more information, useful path: event viewer\Windows logs or event viewer\Applications and Services Logs\Kernel-power
Yolanda Zhu
TechNet Community Support -
Mx.core.Window open() not working on PC / Windows XP
This seems odd to me almost like some sort of popup blocking trouble...which wouldnt make sense in AIR.
I have an app the trys to create a mx.core.Window in the windowComplete event. It works fine on my mac and on linux, but on the pc I have for testing it refuses to open the window. I have verified that the windowComplete event is firing and calling the appropriate function. If I call the same code from a click handler of a button in the main WindowedApplication he window opens fine.
Am I missing something? Is there something special I have to do for the pc?
Thanks in advance.Sure, thanks for responding:
<mx:WindowedApplication windowComplete="init()" .........removed excess here
<mx:Script>
<![CDATA[
import mx.core.Window;
protected var theWIndow:Window;
protected function init():void{
theWindow = new Window();
theWindow.open();
]]>
</mx:Script>
</mx:WindowedApplication>
In my actual code I have a mxm component that extends Window, so the Window type would be that instead, but since it directly extends it there is no difference. I am actually using the fb.FBConnect code from the facebook-actionscript-api and its open() call also fails on the pc...that is unless I start the process from a flex Button click, then it all works. -
[svn:fx-trunk] 8192: Fix resizing a window with the gripper.
Revision: 8192
Author: [email protected]
Date: 2009-06-24 12:37:55 -0700 (Wed, 24 Jun 2009)
Log Message:
Fix resizing a window with the gripper.
WindowedApplication.as, Window.as
After the click on the gripper is detected and the resized is started just return. The code was falling into the hit testing for the application border.
QE Notes: none.
Doc Notes: none.
Bugs: SDK-21631
Reviewer: Glenn
tests: checkintests
Ticket Links:
http://bugs.adobe.com/jira/browse/SDK-21631
Modified Paths:
flex/sdk/trunk/frameworks/projects/airframework/src/spark/components/Window.as
flex/sdk/trunk/frameworks/projects/airframework/src/spark/components/WindowedApplication. as -
Adobe Air Crash when try to load video
Hi,
Recently, I am trying to do an very simple application using Adobe Air that plays video when certain key pressed on keyboard. However, the adobe air crash frequently when it try to load the video. The problem seems to be Adobe Air/ Flash player bug, because when I tried to do the debug, the debug launcher crash. I have tried with both f4v and mp4 format, but the situation is still the same.
I am using up to date Flash builder 4.5 and Adobe Air 2.7.1. Tested on both WinXP and Win7 Home Premium 32bit. Hopes to get your respond as soon as possible. If the problem cannot be solved soon, maybe I have to search for alternative solution to do the project. Thanks.
Here is my working code:
Display Window:
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" width="640" height="360" showStatusBar="false" applicationComplete="initConn()">
<fx:Script>
<![CDATA[
import flash.utils.setTimeout;
import mx.events.FlexEvent;
private var SWFconn:LocalConnection;
private var delay:Number = 300;
private var intervalId:uint;
protected var nWin:videoscreen = new videoscreen();
private var playing:Number = 0;
protected function initConn():void{
stage.addEventListener(KeyboardEvent.KEY_DOWN, handleKeyDown);
SWFconn = new LocalConnection();
nWin.width = 500;
nWin.height = 400;
nWin.open();
public function handleKeyDown(event:KeyboardEvent) :void
if(event.keyCode==13){
stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
nWin.fullscreen();
}else if(event.keyCode==27){
stage.displayState = StageDisplayState.NORMAL;
nWin.normalscreen();
}else{
if((playing==0)&&(((event.keyCode>=48)&&(event.keyCode<=57))||((event.keyCode>=65)&&(event.keyCode<=67)))){
playing=1;
SWFconn.send("swfConnection", "reset");
clearTimeout(intervalId);
SWFconn.send("swfConnection", "select", String.fromCharCode(event.charCode));
intervalId = setTimeout(sendLock,delay, String.fromCharCode(event.charCode));
private function sendLock(msg:String):void{
SWFconn.send("swfConnection", "lock", msg);
playing=1;
nWin.player.source = msg+".f4v";
nWin.player.play();
private function reset():void{
SWFconn.send("swfConnection", "reset");
public function playFinished():void{
reset();
playing =0;
]]>
</fx:Script>
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<mx:SWFLoader left="0" right="0" top="0" bottom="0" source="content.swf"/>
</s:WindowedApplication>
Video Window:
<?xml version="1.0" encoding="utf-8"?>
<s:Window xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" width="400" height="300" showStatusBar="false">
<fx:Script>
<![CDATA[
import mx.core.FlexGlobals;
import org.osmf.events.TimeEvent;
protected function CallBack(event:TimeEvent):void
// TODO Auto-generated method stub
player.source="";
FlexGlobals.topLevelApplication.playFinished();
public function fullscreen():void
stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
public function normalscreen():void
stage.displayState = StageDisplayState.NORMAL;
]]>
</fx:Script>
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:VideoDisplay id="player" left="0" right="0" top="0" bottom="0" complete="CallBack(event)"/>
</s:Window>Hi Pierre,
Would you mind adding this as a new bug report over at bugbase.adobe.com? I went to look to see if there was an existing bug already in place but couldn't find one. If you can, note this thread url in the bug and post back with the bug URL and I'll follow up internally.
In Yue's original bug, he was able to narrow this down to memory leaks in the spark component video display. He ended up working around it by using the mx video display.
Thanks,
Chris -
Open Modal Dialog in Photoshop (Mac)
I can't seem to open a modal dialog in Photoshop on the Mac with the CS SDK. The code works fine in InDesign. In Photoshop, the modality is there (the application responds to mouse clicks with a bell) but the window is not visible. Here is my mx:WindowedApplication:
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
import com.adobe.csxs.types.CSXSWindowType;
import mx.core.Window;
protected function onClick(event:MouseEvent):void
var w:Window = new TestDialog();
if (w) {
w.type = CSXSWindowType.MODAL_DIALOG;
w.resizable = false;
w.open();
]]>
</mx:Script>
<mx:Button x="10" y="10" label="Open Popup" click="onClick(event)"/>
</mx:WindowedApplication>
The Window itself is more or less copied from the "MakeSideHeads" sample project:
<?xml version="1.0" encoding="utf-8"?>
<mx:Window xmlns:mx="http://www.adobe.com/2006/mxml"
title="Test"
titleAlignment="center"
layout="absolute"
width="300"
height="100"
showStatusBar="false">
<mx:Script>
<![CDATA[
private function myCloseWindow():void{
this.close();
]]>
</mx:Script>
<mx:Canvas width="100%" height="100%" id="TestPanel" backgroundColor="#D2D2D2">
<mx:VBox verticalAlign="middle" horizontalAlign="center" height="100%" width="100%">
<mx:HBox height ="90%" width="100%">
<mx:Text width="100%" height="100%" text="Some Text"/>
</mx:HBox>
<mx:HBox height = "10%" horizontalAlign="center">
<mx:Button id="CloseButton" label="Close" click="myCloseWindow()" />
</mx:HBox>
</mx:VBox>
</mx:Canvas>
</mx:Window>
This seems like quite a significant bug. Or am I missing something?Hello,
I've tested this one and it works.
main.mxml
<?xml version="1.0" encoding="utf-8"?>
<csxs:CSXSWindowedApplication xmlns:csxs="com.adobe.csxs.core.*"
xmlns:mx="http://www.adobe.com/2006/mxml"
historyManagementEnabled="false">
<mx:Script>
<![CDATA[
import com.adobe.csxs.types.CSXSWindowType;
import mx.core.Window;
import ModalDialog;
public function showModal():void
var window:Window = new ModalDialog;
window.type = CSXSWindowType.MODAL_DIALOG;
window.resizable = false;
window.open();
]]>
</mx:Script>
<mx:Button label="Display Modal Dialog" click="showModal()"/>
</csxs:CSXSWindowedApplication>
The following is the ModalDialog.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Window
xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute"
width="300"
height="200"
creationComplete="onCreationComplete()"
title="Modal Dialog"
>
<mx:Script>
<![CDATA[
private function onCreationComplete():void
//Center the window on the screen
var screenBounds:Rectangle = Screen.mainScreen.bounds;
nativeWindow.x = (screenBounds.width - nativeWindow.width) / 2;
nativeWindow.y = (screenBounds.height - nativeWindow.height) / 2;
]]>
</mx:Script>
<mx:VBox verticalAlign="middle" textAlign="center" horizontalAlign="center">
<mx:HBox horizontalAlign="center">
<mx:Label text = "This is an example of a modal dialog box."/>
</mx:HBox>
<mx:HBox horizontalAlign="center">
<mx:Button label = "Close" click="close()"/>
</mx:HBox>
</mx:VBox>
</mx:Window> -
I have a CFML project that starts the user off with a login
process. Upon user authentication, I want to send the user onto the
CFML website if they are one type of user, or send them into a Flex
application if they are a different type of user.
I'd like to be able to refer to the CFML website's
application variables in the CFC's used by the Flex app. For
example, one variable I am storing in the CFML website application
scope is a CompanyId variable. I want to be able to reference
#application.CompanyId# in the Flex app's CFCs [so I can filter my
query accordingly]. How can I do this?
Thanks in advance for any help...Thanks for that.
My flex application is derived from WindowedApplication, does that mean that WindowedApplication is (behind the scenes) the first object on the "stage" or does that mean that the WindowedApplication class operates as the "stage"?
Can I parent-child windows starting with my main application window? I've tried that today and for some reason flash throws up if I add two windows as child elements of my WindowedApplication main window (I get an ::addChild() index out of bounds exception and only the first child window shows up on top of the WindowedApplication window.) WindowedApplication class always errors when I call ::addChild on it with a message saying that you're not allowed to call addChild on this class (odd given that the documentation seems to say that you can...)
I'm sure there are all kinds of caveats, so I'm just wondering if anyone reading this has had to slay this beast before.
Thanks again,
Hans -
WindowedApplication/ Drag and drop in Windows OS
Hi,
I have AIR application which is running on Mac OS and Windows. This application is standard desktop application (WindowedApplication). I use there drag&drop for moving preview of images. My problem is if preview image is large (width > 200 or height > 200) then drag preview is not correctly visible. The dragged preview on left top corner is correct but in right bottom corrner is not visible. There is some transient.
On Mac OS is all ok only in Windows is this problem.Can somebody help me with it?If you install the PlaysForSure firmware yes, otherwise you need to install another program for it to work.
-
Revision: 7204
Author: [email protected]
Date: 2009-05-21 16:30:20 -0700 (Thu, 21 May 2009)
Log Message:
Tweaks to appearance of Halo skins for WindowedApplication/Window to match Spark appearance.
Bug: SDK-19653
QA Notes: Baseline images of Halo WindowedApplication/Window need to be updated.
Doc Notes: none
Ticket Links:
http://bugs.adobe.com/jira/browse/SDK-19653
Modified Paths:
flex/sdk/trunk/frameworks/projects/airframework/defaults.cssI had downloaded it for test, and requested for evaluation license...
But I haven't got license, and also I am not able to find Flash Builder Plugins from HFCD site....
I think those plugins are removed from site....
Please help me, if anyone have those plugins... -
Revision: 11842
Revision: 11842
Author: [email protected]
Date: 2009-11-16 08:45:39 -0800 (Mon, 16 Nov 2009)
Log Message:
Submit Window/WindowedApplication patch from Beau Scott to the 3.x branch.
Instead of using rawChildren.addChildAt() to add a non-content child, use rawChildren.addChild() and then set the child's index using rawChildren.setChildIndex().
QE notes: None.
Doc notes: None.
Bugs: SDK-16464
Reviewer:
Tests run: checkintests
Is noteworthy for integration: no
Ticket Links:
http://bugs.adobe.com/jira/browse/SDK-16464
Modified Paths:
flex/sdk/branches/3.x/frameworks/projects/airframework/src/mx/core/Window.as
flex/sdk/branches/3.x/frameworks/projects/airframework/src/mx/core/WindowedApplication.asHave you tried adding the following css selector to your css file.
.nav-bar a {
text-align: center;
or insert it in the <style> tag you have on the page:
<style type="text/css">
body {
margin-left: 200px;
.n {
text-align: center;
.nav-bar a {
text-align: center;
</style> -
[svn:fx-trunk] 7879: WindowedApplication/Window P-ARB changes.
Revision: 7879
Author: [email protected]
Date: 2009-06-16 07:08:15 -0700 (Tue, 16 Jun 2009)
Log Message:
WindowedApplication/Window P-ARB changes.
WindowedApplication/Window
?\226?\128?\162 Rename resizeAffordance to resizeAffordanceWidth
?\226?\128?\162 Change resizeAffordanceWidth from a property to a style
?\226?\128?\162 Remove showGripper property
?\226?\128?\162 Remove showTitleBar property
?\226?\128?\162 Make override functions @private
?\226?\128?\162 SkinState metadata: rename normalActive to normalAndInactive
?\226?\128?\162 SkinState metadata: rename disabledInactive to disabledAndInactive
TitleBar
?\226?\128?\162 SkinState metadata: rename maximized to normalAndMaximized
?\226?\128?\162 SkinState metadata: rename disabledMaximized to disabledAndMaximized
QE Notes: Expect testing failures do to the changes.
Doc Notes: none.
Bugs: none
Reviewer: Glenn
tests: checkintests
Modified Paths:
flex/sdk/trunk/frameworks/projects/airframework/defaults.css
flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/Window.as
flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/WindowedApplication.as
flex/sdk/trunk/frameworks/projects/airframework/src/spark/components/Window.as
flex/sdk/trunk/frameworks/projects/airframework/src/spark/components/WindowedApplication. as
flex/sdk/trunk/frameworks/projects/airframework/src/spark/components/windowClasses/TitleB ar.as
flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/spark/FlexChromeSkin.mxml
flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/spark/MacTitleBarSkin.mxm l
flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/spark/TitleBarSkin.mxml
flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/spark/WindowedApplication Skin.mxmlI had downloaded it for test, and requested for evaluation license...
But I haven't got license, and also I am not able to find Flash Builder Plugins from HFCD site....
I think those plugins are removed from site....
Please help me, if anyone have those plugins... -
Revision: 9077
Author: [email protected]
Date: 2009-08-04 14:32:29 -0700 (Tue, 04 Aug 2009)
Log Message:
Submit Window/WindowedApplication patch from Beau Scott.
Instead of using rawChildren.addChildAt() to add a non-content child, use rawChildren.addChild() and then set the child's index using rawChildren.setChildIndex().
QE notes: None.
Doc notes: None.
Bugs: SDK-16464
Reviewer:
Tests run: checkintests
Is noteworthy for integration: no
Ticket Links:
http://bugs.adobe.com/jira/browse/SDK-16464
Modified Paths:
flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/Window.as
flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/WindowedApplication.as -
Revision: 13276
Revision: 13276
Author: [email protected]
Date: 2010-01-05 07:18:31 -0800 (Tue, 05 Jan 2010)
Log Message:
Min/Max size fixes for AIR Window and WindowedApplication.
AIR won?\226?\128?\153t allow you to set the min width greater than the current max width (same is true for height). You also can?\226?\128?\153t set the max width less than the current min width (same is true for height). The code that sets nativeWindow.minSize and nativeWindow.maxSize has been modified to take this into account.
QE notes: None.
Doc notes: None.
Bugs: SDK-24566
Reviewer: Corey
Tests run: checkintests, apollo/spark/components/Window.as, apollo/spark/components/WindowedApplication.as, apollo/Window, apollo/WindowedApplication
Is noteworthy for integration: no
Ticket Links:
http://bugs.adobe.com/jira/browse/SDK-24566
Modified Paths:
flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/Window.as
flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/WindowedApplication.as
flex/sdk/trunk/frameworks/projects/airspark/src/spark/components/Window.as
flex/sdk/trunk/frameworks/projects/airspark/src/spark/components/WindowedApplication.asTHank you , Nancy. Appreciate the input.
So instead of this:
<a class="brand" href="index.html"><img src="../img/logo-ca.png"alt="Consumers Advocate Review"> </a>
Would it be something like this?:
<a class="brand" href="index.html"><img src="http://ConsumersAdvocate/img/logo-ca.png"alt="Consumers Advocate Review"> </a>
And if I do that, is there a way to cope with that locally so that DW can still display the images?
jeff -
Problem with minimize and maximize of the AIR WIndow
If I execute the below code I will get an window with 100 buttons. With vertical scrolling on.
If I bring the vertical scroll down say positioned at some button. Minimize it using minimize button and maxmize it . The vertical scroll position is resetting to the top.
I am not able to figureout how to resolve this issue. I appreciate any help in this regard.
Regards,
Penugondac
<?xml version="1.0" encoding="utf-8"?><mx:WindowedApplication
xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" initialize="init()">
<mx:Script>
<![CDATA[
import mx.controls.Button;
public function init():void{
for(var i:int =0; i< 100; i++){
var button:Button = new Button();button.width=50;
button.height=50;
vbox.addChild(button);
]]>
</mx:Script>
<mx:VBox id="vbox" />
</mx:WindowedApplication>imaginebeth, not all ppl have set it up the iMessage feature they just turn off the option on their apple devices, i had few friends that i know they have iPhone iPad , iPod and they just do not use iMessage because they said are using the same apple ID in all their devices and the imessages drop in they message app, i know that happend but just some do not like use that feature, if u send a text to one of ur contacts that has iPhone and the message go in green color that is because they are not using iMessage feature or some are out range from cellphone towers signal sometimes happend with few of my contacts.
-
Problem with opening and closing windows
Hi,
I have a Flex Desktop Application with a Splash screen that
displays for 5 seconds which is the initial WindowedApplication
which uses script to centre itself in the screen at 400 x 300.
It then loads and opens up a Window where people login and
closes the splash screen (using NativeWindow.close) - the login
window it opens is again 400 x 300 and centred on the screen.
When the user susccessfully logins in, the login window needs
to load and open a Window called MainWindow which is when my
software will actually begin - this MainWindow needs to be
maximised so I have a script inside it that does this
(NativeWindow.maximise). The login window also needs to close and
this is where my problem lies. I keep getting a problem when I use
NativeWindow.close in the login window and then open the MainWindow
and run the NativeWindow.maximise.
Any suggestions or ideas on how I can do this better? This is
my first Flex application and I'm just a beginner.
I can send the Flex archive if required.Hi,
Please check out the URLs below.
http://www.adobe.com/devnet/air/flex/quickstart/creating_transparent_window.html
http://www.adobe.com/devnet/air/flex/quickstart/launching_windows.html
http://www.adobe.com/devnet/air/flex/quickstart/
Hope this helps.
Maybe you are looking for
-
I Updated my software (iOS 7.1-2) and now the Bluetooth can't find my keyboard. It worked perfectly before I upgraded - any suggestions?
-
VIP (Virtual IP) on a cluster env for BOBJ 3.1 and rich client
All, I am in 3.1 where I have an installation with 1 cluster and 2 app server machine behind. in order to load balance between the 2 app server I am using some VIP address using some sticky session. It works perferctly when i am logging to it thru th
-
The App Store on the iPhone (and iPod Touch) has two big defects that need to be fixed. 1. When you scroll through several pages of apps (by pressing the "show 25 more..." at the bottom), and then you select one app to view info about, and then retur
-
Hi, I am getting below error message while loading photoshop plugin on intel mac os 10.5.7 in photoshop CS3. "One or more plugins are currently not available on you system. For details, see Help -> System info" In System info it is giving error as "
-
Hey I v made a jar file and m able to execute it through the command prompt by using the command " java -jar myapp.jar ". But when I double-click the jar file, m geeting a JVM error - Could not find the main class. I hv checked the Manifest.mf file,