[flexcoders] Client IP Address and Client Computer Name

2011-08-18 Thread K.C Baruri
Dear All,
I have published a Flex project in IIS  which is wcf service oriented. Now,   I 
am facing a problem to catch IP address from Flex(Action Script) .  From wcf 
can retrieve easily , but I want to take it from Flex. Can you please help me 
regarding this?

Thanks
Kumaresh  

[flexcoders] Flex 4 & CSS

2011-08-18 Thread Davidson, Jerry
Alex, you might be "Flex harUI" in the other forum.  But I'm going to
ask the question here as no one there seems to know the answer.

 

I'm trying to convert a Flex 3 application to Flex 4.  I find CSS isn't
working under Flex 4 as it did before.  What I want to do is set a back
ground image on a canvas object.  Here is that object:

  http://www.adobe.com/2006/mxml";

xmlns:s="library://ns.adobe.com/flex/spark"

styleName="bgImage"

backgroundColor="#DEDACF" 

borderColor="#DEDACF"

width="100%" 

horizontalScrollPolicy="off" verticalScrollPolicy="off">

 

Here is "bgImage":

.bgImage {

/*background-image: "/src/images/BannerBackground.jpg"; */

/*background-image: "src/images/BannerBackground.jpg"; */ 

/*background-image: "images/BannerBackground.jpg"; */

/*background-image: "/images/BannerBackground.jpg"; */

/*background-image: "../images/BannerBackground.jpg"; */ 

/*background-image: "../BannerBackground.jpg"; */ 

/*background-image: "FSCalc/images/BannerBackground.jpg"; */

/*background-image: url(images/BannerBackground.jpg); */

/*background-image: url("images/BannerBackground.jpg"); */ 

/*background-image: url("/images/BannerBackground.jpg"); */

/*background-image: url("../images/BannerBackground.jpg"); */ 

  background-image: url("FSCalc/images/BannerBackground.jpg");  

/*background-image: Embed("images/BannerBackground.jpg"); */

/*background-image: Embed("/images/BannerBackground.jpg"); */ 

/*background-image: Embed("../images/BannerBackground.jpg"); */ 

/*background-image: Embed(source="images/BannerBackground.jpg"); */


/*background-image: Embed(source="/images/BannerBackground.jpg");
*/

/*background-image: Embed(source="../images/BannerBackground.jpg");
*/  

/*background-image: Embed(source="src/images/BannerBackground.jpg");
*/  

  text-align: right;

  border-style: solid;

  }

 

Obviously, many tests have not resulted in something that works.  The
directory structure as I see it in Flash is:

FSCalc

src

css

DHSclasses

images

scripts

 

If I change the color in the CSS class, I do see the color change in the
canvas object.  Therefore, I know that the CSS is available to the
component.

 

Any ideas anyone?



Re: [flexcoders] Re: Updating mobile profiles

2011-08-18 Thread Csomák Gábor
 *your screen res is 480x800 which is the same, as HTC  desire's, what is in
that list, so you don't have to do anything, just select that.*

yes, in fact, there are many devices. there are 57 certified Android devices
(http://www.adobe.com/flashplatform/certified_devices/), and a lot more that
runs air/flash, but unoficially (zte, viewsonic, zenithink, ...) (and most
of them have the same screen res)
I'd be sad, if I had a 100 long dropbown list, and i have to write "samsung
galaxy s", and then still go down to select S2 for example.
The popular devices are there, and anybody can add more, if they want to.


On Thu, Aug 18, 2011 at 8:53 PM, Amy  wrote:

>
>
> Do they not have any sort of central repository, so EVERY developer doesn't
> have to do this? It's not like there are that many phones in the world that
> are capable of running AIR.
>
>
> --- In flexcoders@yahoogroups.com, Csomák Gábor  wrote:
> >
> > go to edit profiles, you add your screen resolution, size and platform
> > (android), and it will be on the list
> >
> > On Wed, Aug 17, 2011 at 7:22 PM, Amy  wrote:
> >
> > >
> > >
> > > Hi, all;
> > >
> > > I have an HTC Inspire, and it is not on my list of mobile profiles. I
> > > assume that new mobile profiles are being added all the time,
> somewhere, but
> > > I'm not sure how to get FB to go get them. Can anyone point me in the
> right
> > > direction?
> > >
> > > TIA;
> > >
> > > Amy
> > >
> > >
> > >
> >
>
>  
>


Re: [flexcoders] BitmapData Argument: Error #1063: Arg count mismatch on object util.copy

2011-08-18 Thread Alex Harui
Probably something like:

public function writeExternal(output:IDataOutput):void
   {
output.writeInt(_bitmapData.width);
output.writeInt(_bitmapData.height);
output.writeBytes(_bitmapData.getPixels(new Rectangle(0, 0, 
_bitmapData.width, _bitmapData.height))
}

public function readExternal(input:IDataInput):vo! id
{
var w:int = input.readInt();
var h:int = input.readInt();
_bitmapData = new BitmapData(w, h);
_bitmapData.setPixels(input.readBytes(), new Rectangle(0, 0, w, h));
}


On 8/18/11 2:04 PM, "Philip Smith"  wrote:






How would I go about implementing that? eg:

public class PageVO implements IExternalizable
{
public function get bitmapData():BitmapData
{
return _bitmapData;
}

public function set bitmapData(value:BitmapData):void
{
_bitmapData = value;
}

public function writeExternal(output:IDataOutput):void
{

}

public function readExternal(input:IDataInput):vo! id
{
}
}


To: flexcoders@yahoogroups.com
From: aha...@adobe.com
Date: Thu, 18 Aug 2011 13:46:59 -0700
Subject: Re: [flexcoders] BitmapData Argument: Error #1063: Arg count mismatch 
on object util.copy




   You can implement IExternalizable on the object that references the 
bitmapdata


On 8/18/11 11:57 AM, "method_air" http://loudj...@hotmail.com> > wrote:







I'm creating a deep copy of an object which has a BitmapData property using 
ObjectUtil.copy and 'registerClassAlias', eg:

registerClassAlias("flash.display.BitmapData", BitmapData);

...but I'm getting the error: ArgumentError: Error #1063: Argument count 
mismatch on flash.display::BitmapData(). Expected 2, got 0

Is there a workaround?

Thanks,

Philip






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


RE: [flexcoders] BitmapData Argument: Error #1063: Arg count mismatch on object util.copy

2011-08-18 Thread Philip Smith

How would I go about implementing that? eg:

public class PageVO implements IExternalizable
{
public function get bitmapData():BitmapData
{
return _bitmapData;
}

public function set bitmapData(value:BitmapData):void
{
_bitmapData = value;
}

public function writeExternal(output:IDataOutput):void
{
   
}

public function readExternal(input:IDataInput):void
{
}
}

To: flexcoders@yahoogroups.com
From: aha...@adobe.com
Date: Thu, 18 Aug 2011 13:46:59 -0700
Subject: Re: [flexcoders] BitmapData Argument: Error #1063: Arg count mismatch 
on object util.copy


















 



  



  
  
  

You can implement IExternalizable on the object that references the bitmapdata





On 8/18/11 11:57 AM, "method_air"  wrote:



 

 

 

   



I'm creating a deep copy of an object which has a BitmapData property using 
ObjectUtil.copy and 'registerClassAlias', eg:



registerClassAlias("flash.display.BitmapData", BitmapData);



...but I'm getting the error: ArgumentError: Error #1063: Argument count 
mismatch on flash.display::BitmapData(). Expected 2, got 0



Is there a workaround?



Thanks,



Philip



 

   







-- 

Alex Harui

Flex SDK Team

Adobe System, Inc.

http://blogs.adobe.com/aharui








 









  

Re: [flexcoders] BitmapData Argument: Error #1063: Arg count mismatch on object util.copy

2011-08-18 Thread Alex Harui
You can implement IExternalizable on the object that references the bitmapdata


On 8/18/11 11:57 AM, "method_air"  wrote:






I'm creating a deep copy of an object which has a BitmapData property using 
ObjectUtil.copy and 'registerClassAlias', eg:

registerClassAlias("flash.display.BitmapData", BitmapData);

...but I'm getting the error: ArgumentError: Error #1063: Argument count 
mismatch on flash.display::BitmapData(). Expected 2, got 0

Is there a workaround?

Thanks,

Philip






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


[flexcoders] BitmapData Argument: Error #1063: Arg count mismatch on object util.copy

2011-08-18 Thread method_air
I'm creating a deep copy of an object which has a BitmapData property using 
ObjectUtil.copy and 'registerClassAlias', eg:

registerClassAlias("flash.display.BitmapData", BitmapData);

...but I'm getting the error: ArgumentError: Error #1063: Argument count 
mismatch on flash.display::BitmapData(). Expected 2, got 0

Is there a workaround?

Thanks,

Philip



[flexcoders] Re: Updating mobile profiles

2011-08-18 Thread Amy
Do they not have any sort of central repository, so EVERY developer doesn't 
have to do this?  It's not like there are that many phones in the world that 
are capable of running AIR.

--- In flexcoders@yahoogroups.com, Csomák Gábor  wrote:
>
> go to edit profiles, you add your screen resolution, size and platform
> (android), and it will be on the list
> 
> On Wed, Aug 17, 2011 at 7:22 PM, Amy  wrote:
> 
> >
> >
> > Hi, all;
> >
> > I have an HTC Inspire, and it is not on my list of mobile profiles. I
> > assume that new mobile profiles are being added all the time, somewhere, but
> > I'm not sure how to get FB to go get them. Can anyone point me in the right
> > direction?
> >
> > TIA;
> >
> > Amy
> >
> >  
> >
>




Re: [flexcoders] Updating mobile profiles

2011-08-18 Thread Csomák Gábor
go to edit profiles, you add your screen resolution, size and platform
(android), and it will be on the list

On Wed, Aug 17, 2011 at 7:22 PM, Amy  wrote:

>
>
> Hi, all;
>
> I have an HTC Inspire, and it is not on my list of mobile profiles. I
> assume that new mobile profiles are being added all the time, somewhere, but
> I'm not sure how to get FB to go get them. Can anyone point me in the right
> direction?
>
> TIA;
>
> Amy
>
>  
>


RE: [flexcoders] SQLite Insert Statements in a transaction

2011-08-18 Thread Bill Franklin
You're not the only one that has had problem with Async transactions.  They 
should be possible, but the statement doesn't get released until the execution 
is completewhich is problematic.  Your best bet for this is to use a 
synchronous connection.  Yes, that sucks for user experience if you have many 
bulk entriesbut, if you don't need the data right away, perhaps you could 
do them when the application is idle

something like this...

NativeApplication.nativeApplication.addEventListener(Event.USER_IDLE, 
onUserIdle);

You could then check to see if you have already run the onAddBulkContacts via a 
Boolean value, and run it if have not run it before...


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf 
Of Tac Tacelosky
Sent: Tuesday, August 16, 2011 7:25 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] SQLite Insert Statements in a transaction



I'm trying to get my head around how to do a SQLite bulk insert using 
transactions.  This works, but it doesn't make sense to re-create a new 
SQLStatement in the loop:

private function onAddBulkContacts():void {
_responder = new Responder(resultEventHandler, errorEventHandler);
contacts_db.connection.begin(null, _responder);
var statement:SQLStatement;

for (var i:uint=0; ihttp://bayerdisclaimer.bayerweb.com
___


Re: [flexcoders] SQLite Insert Statements in a transaction

2011-08-18 Thread Johannes Nel
probably, but the environment is still single threaded. We tend to open our
connections synchronously and then manage the number of inserts we do in a
given time.

On Wed, Aug 17, 2011 at 9:28 AM, Tac Tacelosky  wrote:

> **
>
>
> I should have clarified that my database has been opened async.  And I'm
> now pretty convinced that to do async inserts, you have to create a new
> SQLStatement within the insert loop.  I'm almost certain that is going to be
> slower and use more memory, but the user experience may be better with
> async, if the entire process is in the background.
>
> Is my thinking correct on that?
>
> Thanks,
>
> Tac
>
> On Wed, Aug 17, 2011 at 2:52 AM, Johannes Nel wrote:
>
>> **
>>
>>
>> how much data are you dealing with. make your inserts synchronous perhaps
>>
>>
>> On Tue, Aug 16, 2011 at 1:24 PM, Tac Tacelosky  wrote:
>>
>>> **
>>>
>>>
>>> I'm trying to get my head around how to do a SQLite bulk insert using
>>> transactions.  This works, but it doesn't make sense to re-create a new
>>> SQLStatement in the loop:
>>>
>>> private function onAddBulkContacts():void {
>>> _responder = new Responder(resultEventHandler, errorEventHandler);
>>> contacts_db.connection.begin(null, _responder);
>>> var statement:SQLStatement;
>>>
>>> for (var i:uint=0; i>>  statement  = new SQLStatement();
>>> statement.sqlConnection = contacts_db.connection;
>>> statement.text ="INSERT INTO contacts ('name', 'lastname') VALUES
>>> (@NAME, @LASTNAME)";
>>>
>>> statement.addEventListener(SQLErrorEvent.ERROR,
>>> function(event:Event):void {
>>> trace('statement error');});
>>> statement.addEventListener(SQLEvent.RESULT,
>>> function(event:Event):void { trace('result'); });
>>> statement.parameters['@NAME'] = "Name " + i.toString();
>>> statement.parameters['@LASTNAME'] = "LastName " + i.toString();
>>> statement.execute();
>>> }
>>> contacts_db.connection.commit();
>>> }
>>>
>>> What I want to do is create the SQLStatement once, let it compile, then
>>> just pass in new arguments within the loop, the commit it at the end, e.g.
>>>
>>> private function onAddBulkContacts():void {
>>> _responder = new Responder(resultEventHandler, errorEventHandler);
>>> contacts_db.connection.begin(null, _responder);
>>> var statement:SQLStatement;
>>>
>>> statement  = new SQLStatement();
>>> statement.sqlConnection = contacts_db.connection;
>>> statement.text ="INSERT INTO contacts ('name', 'lastname') VALUES
>>> (@NAME, @LASTNAME)";
>>>
>>> statement.addEventListener(SQLErrorEvent.ERROR,
>>> function(event:Event):void {
>>> trace('statement error');});
>>> statement.addEventListener(SQLEvent.RESULT,
>>> function(event:Event):void { trace('result'); });
>>>
>>> for (var i:uint=0; i>> statement.parameters['@NAME'] = "Name " + i.toString();
>>> statement.parameters['@LASTNAME'] = "LastName " + i.toString();
>>> statement.execute();
>>> }
>>> contacts_db.connection.commit();
>>> }
>>>
>>> But the latter code throw an error saying that it can't execute the
>>> second time through, since the statement itself is still executing (and I
>>> believe will be in that state until the commit).  I guess I can understand
>>> that the statements get added to the execution queue, but it doesn't make
>>> sense that I have to add the SQL text within the loop, exactly the thing I'm
>>> trying to avoid.  I'm sure there's a better way to do this, but I've spent
>>> way too long hacking and reading trying to figure out what the proper
>>> sequence is.  Any ideas?
>>>
>>> Thanks,
>>>
>>> Tac
>>>
>>
>>
>>
>> --
>> j:pn
>> \\no comment
>>
>>
>  
>



-- 
j:pn
\\no comment