Re: [flexcoders] urgent Help needed regarding loading time please

2012-09-19 Thread Alex Harui
What error did you get?


On 9/18/12 10:04 PM, "anas naeem"  wrote:






Hi Guys hope everyone is doing great firstly i am not a native English speaker 
so apologies for any language mistakes any ways,  this is my third post for 
help needed regarding an error in my Flex application and no one had replied 
ever to my first 2 posts either i hope i get some help this time
I am working on a real time flex application related to stock exchange domain 
and i am using LightStreamer's flex api . Its a browser based application.
So the issue i am facing is whenever i launch my application as soon it is 
launched in the browser it gets stuck on sometimes 1% , sometimes 7% and 
sometimes between 20 and 25% for about 27 seconds approximately. I have tried 
to fix it using the Flash Builder profiler but I don't got something 
informative about the cause of the error. I have also switched between RSLs and 
by merging into code from the Flex Build Path but it either not helped me One 
thing more I localized my application recently  and afterwards i am getting 
this error but I removed all my localization code from the project and tested 
it but the problem persisted there as it is... Please I have to deliver a build 
by this Friday evening so I request that please figure me out what am I doing 
wrong and where should be corrected ?

i also Googled the error but the solutions aren't matching for my specific 
problems

Thanks alot in advance.





--
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] windows 8 store app onscreen keyboard invoking

2012-09-19 Thread Alex Harui
Are you sure focus went to the sprite?  Make sure stage.focus is set and you 
got FOCUS_IN and not FOCUS_OUT (and can get keyboard events).

It might be that there is a difference in the UIA in the player.  Did you link 
in the Flex accessibility code for the Spark components?


On 9/19/12 1:37 AM, "Wouter Schreuders"  wrote:






Hi Alex

I'm using Flex SDK 4.5A (problem also occurs on 4.6)
The flash player is version 11.3.372.94 on windows 8 64 bit and as far as I 
know IE have gone the same route as flash and rolled their own version of the 
flash player inside the browser.

Metro officially supports flash sites that comply with their conditions as set 
out here ( 
http://msdn.microsoft.com/en-us/library/ie/jj193557%28v=vs.85%29.aspx )

Microsoft's official policy on invoking the keyboard is that it must be under 
the control of the user and can not be problematically invoked. The way to 
invoke the keyboard is one of the following from this page ( 
http://msdn.microsoft.com/en-us/library/windows/apps/hh465404.aspx ) :

Accessibility properties from UI Automation (UIA)
User tap
Focus changes

from their docs : UI Automation is the mechanism through which developers 
communicate whether or not a particular UI element can receive text input. You 
must ensure that the appropriate accessibility properties are set in your apps 
so that the touch keyboard will know to appear when focus lands on a specific 
UI element.

Their own windows provided controls do this automatically otherwise inside of 
your html you need to add the following:


So  that's how it works in html. I haven't found any documentation of help on 
forums explaining how they decide when to bring up the keyboard in a flash 
situation.

As you suggested I made an AS only site to see what works and what doesn't. a 
normal sprite doesn't invoke the keyboard, neither does a sprite with a mouse 
click listener. A normal textField doesn't invoke the keyboard but a textfield 
with type set to TextFieldType.INPUT does invoke the keyboard (which makes 
sense)

So somehow microsoft (I'm guessing) are inside of flash detecting what kind of 
component recieved focus and if it's a editable textfield then it does bring up 
the keyboard.

The intriguing thing is that for some reason when a spark textInput / 
RichEditableText is set to displayAsPassword = true it DOES bring up the 
keyboard so perhaps somewhere in the framework setting that flag causes the 
component to somehow be perceived as a input component which quite strange to 
me since I can't see why setting that condition would make any difference.

Here's my test code:


package
{
import flash.display.Graphics;
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageQuality;
import flash.display.StageScaleMode;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.text.TextField;
import flash.text.TextFieldType;
public class CleanAsProject extends Sprite
{
public function CleanAsProject()
{
stage.scaleMode = StageScaleMode.NO_SCALE; //this stuff is required since I'm 
working in flash builder and if you you don't put it in your graphics scale is 
whack
stage.align = StageAlign.TOP_LEFT;
stage.quality = StageQuality.HIGH;
init();
}
private function init():void
{
drawSprite(); // Does not invoke Metro soft Keyboard
drawSpriteWithEventHandler(); // Does not invoke Metro soft Keyboard
drawTextField(); // Does not invoke Metro soft Keyboard
drawInputTextField(); // successfully invokes Metro soft Keyboard
}
private function drawTextField():void
{
var textField:TextField = new TextField;
addChild(textField);
textField.x  = 100;
textField.y = 300;
textField.height = 50;
textField.text = 'click me';
}
private function drawInputTextField():void
{
var textField:TextField = new TextField;
addChild(textField);
textField.x  = 100;
textField.y = 350;
textField.height = 50;
textField.text = 'input text into me';
textField.type = TextFieldType.INPUT;
textField.background = true;
}
private function drawSpriteWithEventHandler():void
{
var textInputEH:Sprite = new Sprite();
textInputEH.x  = 100;
textInputEH.y = 200;
var g:Graphics = textInputEH.graphics;
g.beginFill(0x44ff00, 1);
g.drawRect(0,0,200,80);
g.endFill();
addChild(textInputEH);
textInputEH.buttonMode = true;
textInputEH.addEventListener(MouseEvent.CLICK, function (event:MouseEvent):void
{
trace(event.currentTarget);
} );
}
private function drawSprite():void
{
var textInput:Sprite = new Sprite();
textInput.x  = 100;
textInput.y = 100;
var g:Graphics = textInput.graphics;
g.beginFill(0xff9900, 1);
g.drawRect(0,0,200,80);
g.endFill();
addChild(textInput);
}
}
}


On 19 September 2012 07:59, Alex Harui  wrote:





I would break it down to an AS-only test where you set focus to a Sprite and 
see if you get the keyboard.

Which version of player are you using?  Is metro officially supported?




On 9/18/12 1:11 PM, "Wouter Schreuders" http://wschreud...@gmail.com> > wrote:






Hi Alex

The problem occurs wit

[flexcoders] urgent Help needed regarding loading time please

2012-09-19 Thread anas naeem
Hi Guys hope everyone is doing great firstly i am not a native English speaker 
so apologies for any language mistakes any ways,  this is my third post for 
help needed regarding an error in my Flex application and no one had replied 
ever to my first 2 posts either i hope i get some help this time 
I am working on a real time flex application related to stock exchange domain 
and i am using LightStreamer's flex api . Its a browser based application.So 
the issue i am facing is whenever i launch my application as soon it is 
launched in the browser it gets stuck on sometimes 1% , sometimes 7% and 
sometimes between 20 and 25% for about 27 seconds approximately. I have tried 
to fix it using the Flash Builder profiler but I don't got something 
informative about the cause of the error. I have also switched between RSLs and 
by merging into code from the Flex Build Path but it either not helped me One 
thing more I localized my application recently  and afterwards i am getting 
this error but I removed all my localization code from the project and tested 
it but the problem persisted there as it is... Please I have to deliver a build 
by this Friday evening so I request that please figure me out what am I doing 
wrong and where should be corrected ? 
i also Googled the error but the solutions aren't matching for my specific 
problems 
Thanks alot in advance. 

Re: [flexcoders] windows 8 store app onscreen keyboard invoking

2012-09-19 Thread Wouter Schreuders
Hi Alex

I'm using Flex SDK 4.5A (problem also occurs on 4.6)
The flash player is version 11.3.372.94 on windows 8 64 bit and as far as I
know IE have gone the same route as flash and rolled their own version of
the flash player inside the browser.

Metro officially supports flash sites that comply with their conditions as
set out here (
http://msdn.microsoft.com/en-us/library/ie/jj193557%28v=vs.85%29.aspx )

Microsoft's official policy on invoking the keyboard is that it must be
under the control of the user and can not be problematically invoked. The
way to invoke the keyboard is one of the following from this page (
http://msdn.microsoft.com/en-us/library/windows/apps/hh465404.aspx ) :

Accessibility properties from UI Automation (UIA)
User tap
Focus changes

from their docs : *UI Automation is the mechanism through which developers
communicate whether or not a particular UI element can receive text input.
You must ensure that the appropriate accessibility properties are set in
your apps so that the touch keyboard will know to appear when focus lands
on a specific UI element.*
*
*
Their own windows provided controls do this automatically otherwise inside
of your html you need to add the following:


So  that's how it works in html. I haven't found any documentation of help
on forums explaining how they decide when to bring up the keyboard in a
flash situation.

As you suggested I made an AS only site to see what works and what doesn't.
a normal sprite doesn't invoke the keyboard, neither does a sprite with a
mouse click listener. A normal textField doesn't invoke the keyboard but a
textfield with type set to TextFieldType.INPUT does invoke the keyboard
(which makes sense)

So somehow microsoft (I'm guessing) are inside of flash detecting what kind
of component recieved focus and if it's a editable textfield then it does
bring up the keyboard.

The intriguing thing is that for some reason when a spark textInput /
RichEditableText is set to displayAsPassword = true it DOES bring up the
keyboard so perhaps somewhere in the framework setting that flag causes the
component to somehow be perceived as a input component which quite strange
to me since I can't see why setting that condition would make any
difference.

Here's my test code:


package
{
import flash.display.Graphics;
import flash.display.Sprite;
 import flash.display.StageAlign;
import flash.display.StageQuality;
import flash.display.StageScaleMode;
 import flash.events.Event;
import flash.events.MouseEvent;
import flash.text.TextField;
 import flash.text.TextFieldType;
 public class CleanAsProject extends Sprite
 {
public function CleanAsProject()
{
 stage.scaleMode = StageScaleMode.NO_SCALE; //this stuff is required since
I'm working in flash builder and if you you don't put it in your graphics
scale is whack
 stage.align = StageAlign.TOP_LEFT;
stage.quality = StageQuality.HIGH;
 init();
}
 private function init():void
{
drawSprite(); // Does not invoke Metro soft Keyboard
 drawSpriteWithEventHandler(); // Does not invoke Metro soft Keyboard
drawTextField(); // Does not invoke Metro soft Keyboard
 drawInputTextField(); // successfully invokes Metro soft Keyboard
}
 private function drawTextField():void
{
var textField:TextField = new TextField;
 addChild(textField);
textField.x  = 100;
textField.y = 300;
 textField.height = 50;
textField.text = 'click me';
}
 private function drawInputTextField():void
{
 var textField:TextField = new TextField;
addChild(textField);
textField.x  = 100;
 textField.y = 350;
textField.height = 50;
textField.text = 'input text into me';
 textField.type = TextFieldType.INPUT;
textField.background = true;
}
 private function drawSpriteWithEventHandler():void
{
 var textInputEH:Sprite = new Sprite();
textInputEH.x  = 100;
 textInputEH.y = 200;
var g:Graphics = textInputEH.graphics;
g.beginFill(0x44ff00, 1);
 g.drawRect(0,0,200,80);
g.endFill();
addChild(textInputEH);
 textInputEH.buttonMode = true;
textInputEH.addEventListener(MouseEvent.CLICK, function
(event:MouseEvent):void
 {
trace(event.currentTarget);
} );
 }
  private function drawSprite():void
{
var textInput:Sprite = new Sprite();
 textInput.x  = 100;
textInput.y = 100;
var g:Graphics = textInput.graphics;
 g.beginFill(0xff9900, 1);
g.drawRect(0,0,200,80);
g.endFill();
 addChild(textInput);
}
 }
}


On 19 September 2012 07:59, Alex Harui  wrote:

> **
>
>
> I would break it down to an AS-only test where you set focus to a Sprite
> and see if you get the keyboard.
>
> Which version of player are you using?  Is metro officially supported?
>
>
>
> On 9/18/12 1:11 PM, "Wouter Schreuders"  wrote:
>
>
>
>
>
>
> Hi Alex
>
> The problem occurs with the spark RichEditableText therefore
> also textInput (not for MX:textInput). I set up a little test inside of
> windows 8 metro where traced out all the events for both a normal textInput
> and a textInput with displayAsPassword="true" and they are firing identical
> events. The one with displayAsPassword="true" invokes the