Re: [flexcoders] Flex PHP Service with Date Parameters Help

2010-08-27 Thread claudiu ursica
I am not sure where your problem is in the php code. However if you think the 
date is the issue use timestamps which are basically numbers. I did that 
successfully in the past. On the flex side you can write an utility for 
translating that into a date for display purposes. 

Which line is 61 in your code anyway ?

C





From: Stephen sd_br...@ntlworld.com
To: flexcoders@yahoogroups.com
Sent: Fri, August 27, 2010 12:27:57 AM
Subject: [flexcoders] Flex PHP Service with Date Parameters Help

   
I'm having some trouble using the Date as a Parameter does anybody know where 
I'm going wrong as I am currently getting the error: 

Reason: 
Fatal error: Call to a member function toString() on a non-object in 
C:\wamp\www\testing-debug\services\TestingService.php on line 61
mysqli_stmt_bind_param($stmt, 'ss', $from-toString('-MM-dd'), 
$to-toString('-MM-dd'));

public function getAllTestingByRange($from, $to) {

$stmt = mysqli_prepare($this-connection, SELECT name_no, SUM(amount) AS total 
FROM $this-tablename WHERE datefield BETWEEN ? AND ? GROUP BY name_no); 

$this-throwExceptionOnError();

mysqli_stmt_bind_param($stmt, 'ss', $from-toString('-MM-dd'), 
$to-toString('-MM-dd')); 

$this-throwExceptionOnError();

mysqli_stmt_execute($stmt);
$this-throwExceptionOnError();

$rows = array();

mysqli_stmt_bind_result($stmt, $row-name_no, $row-total);

while (mysqli_stmt_fetch($stmt)) {
$rows[] = $row;
$row = new stdClass();
mysqli_stmt_bind_result($stmt, $row-name_no, $row-total);
}

mysqli_stmt_free_result($stmt);
mysqli_close($this-connection);

return $rows;
}


 


  

RE: [flexcoders] Loading Images into a loaded SWF

2010-08-27 Thread Julian Tenney
This is getting too hard. I've fixed it by creating a native window and
loading it into that.

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Alex Harui
Sent: 26 August 2010 21:28
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Loading Images into a loaded SWF

 

  

Image extends SWFLoader so you want to see how Image uses the SWFLoader
code to determine the actual path to try.


On 8/26/10 11:45 AM, Julian Tenney julian.ten...@nottingham.ac.uk
wrote:


 
 
   

SWFLoader or Image?

Surely the problem is with Image - or does Image use the paths
set by SWFLoader to resolve its own paths?





From: flexcoders@yahoogroups.com on behalf of Alex Harui
Sent: Thu 26/08/2010 18:33
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Loading Images into a loaded SWF

  
I don't see any obvious problem with your setup.  Set a
breakpoint in SWFLoader.as:loadContent and watch it try to resolve the
URL into an absolute URL.  Maybe there is a clue there.


On 8/26/10 1:12 AM, Julian Tenney
julian.ten...@nottingham.ac.uk wrote:


 
 
   

Yes, that's right: mx:SWFLoader 
 
mySWFLoader.load(swfFile); //to load it
 
loadForCompatibility is true or false, makes no odds,
 
Not specifying a loaderContext, but when I've tried it makes no
odds - am I missing something here?
 
 

From: flexcoders@yahoogroups.com
[mailto:flexcod...@yahoogroups.com] On Behalf Of Alex Harui
Sent: 26 August 2010 00:43
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Loading Images into a loaded SWF

  

Just so I'm clear, you are using mx:SWFLoader and s! etting
source=C:\x35\learningObject.swf?

I was just checking to see if you are or aren't specifying
loadForCompatibility or loaderContext


On 8/25/10 2:53 PM, Julian Tenney
julian.ten...@nottingham.ac.uk wrote:



 
 
   

C:\x35\LearningObject.swf is the path.

'x35' is a folder containing the mxml file compiled by the app
via fcsh.

AirTricks waits for fcsh to finish, and then loads
LearningObject.swf.

What other params can I pass in to the swf that might help?

Thanks Alex,

J 






From: flexcoders@yahoogroups.com on behalf of Alex Harui
Sent: Wed 25/08/2010 18:13
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Loading Images into a loaded SWF

  
What is the path to the LearningObjects.swf that you are handing
to SWFLoader in the AirTricks.SWF?  Are you specifying any other
parameters for loading LearningObjects.swf?

mx:Image has code that tries to convert relative paths to
absolute paths relative to the current SWF so you don't need to place
the JPG in the AirTricks folder.   It looks like the absolute path
conversion is getting fooled.


On 8/25/10 1:28 AM, Julian Tenney
julian.ten...@nottingham.ac.uk wrote:

 
 
   

Thanks for your help.
 
The! loaded SWF is a flex SWF, all built with the latest stable
release.
It uses mx:Image
Yes, using Flex 4.
Paths:
 
To Air App:
C:\Program Files\Xerte 3.5\AirTricks\AirTricks.exe which loads
C:\Program Files\Xerte 3.5\AirTricks\AirTricks.swf
 
To SWF:
C:\x35\LearningObject.swf
 
To image - it's in all these places, and it doesn't load.
C:\x35\media\DSC_0095.JPG [where it really ought to load from,
or be able to load from.]
C:\Program Files\Xerte 3.5\AirTricks\media\DSC_0095.JPG [where
you guys are telling me it should load from, but it doesn't]
 
The relative path is media/DSC_0095.JPG
 
If I execute C:\x35\LearningObject.swf it works fine.
 
The application is an .mxml ! editor and compiler, which creates
and edits mxml files, and compiles them. What I'm trying to do is load
and preview the results in the application.
 
Thanks,
 
J
nb! sp;
 
 
 

From: flexcoders@yahoogroups.com
[mailto:flexcod...@yahoogroups.com] On Behalf Of Alex Harui
Sent: 24 August 2010 18:41
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Loading Images into a loaded SWF

  

Is the loaded SWF a Flex SWF?  Is it using SWFLoader/Image?  Are
you using Flex 4?  What is the path 

Re: [flexcoders] FABridge Problem - Please help!

2010-08-27 Thread Brian J. Ackermann
http://code.google.com/p/flex-iframe/source/browse/trunk/examples/IFrameCommTest/src/com/google/code/flexiframe/examples/IFrameCommTest.mxml


lines 80  81

in the original example, there was no ID

Thanks

--
Brian J. Ackermann
brian.ackerm...@gmail.com
952.373.1626
--





On Thu, Aug 26, 2010 at 3:27 PM, Alex Harui aha...@adobe.com wrote:



 I just noticed you didn’t specify an id=”FABridge” in your
 fx:Declarations

 What was the equivalent statement in Flex 3?



 On 8/26/10 10:45 AM, Brian J. Ackermann brian.ackerm...@gmail.com
 wrote:






 From my testing, I believe the problem is on the JS side of thing, and that
 the FABridge doesn't 'live' in the same location in the DOM in flex4, as
 compared with flex3.

 But we're both reasonably novice flex developers, so we could be
 mis-interpreting what we're seeing.  In another version of the project, I
 have added some debugging to a text area on screen, and
 this.parent.FABridge and parent.FABridge and FABridge all return
 'undefined'.  Since that used to work just fine in flex3, it seems like
 maybe I just need to find the new 'path' in the DOM

 for example:

 this.parent.foo.bar.blah.FABridge

 Thanks,

 Brian


 --
 Brian J. Ackermann
  brian.ackerm...@gmail.com
  952.373.1626

 --





 On Thu, Aug 26, 2010 at 12:38 PM, Alex Harui aha...@adobe.com wrote:






 I don’t have time right now to look and I don’t deal much with FABridge,
 but are you now saying that parent.FABridge is now the issue?  The OP said
 it was FABridge.flex.  Is this on the JS side or AS side?  In Flex 4, a
 child component’s parent is not the main app, they get shoveled down into
 the skin.  It think the document or parentDocument properties or
 FlexGlobals.topLevelApplication can access the main app.




 On 8/26/10 9:10 AM, Brian J. Ackermann brian.ackerm...@gmail.com 
 http://brian.ackerm...@gmail.com  wrote:






 I'm trying to get the IFrameCommTest example (from
 http://code.google.com/p/flex-iframe/) to work in Flex 4, and, while the
 IFrame itself works, the communication does not. In particular, I need to
 get the included HTML page to call functions from the flex app (I already
 have a way to get the Flex app to talk to the HTML).

 I've exported the project to facilitate your help.
 http://www.mediafire.com/file/172448jkkgva4ki/iframeCommTest.fxp

 The problem, is that the parent.FABridge doesn't exist. My guess is that
 something in flex4 changed with regard to how things are located in the DOM.

 (This post is directly related to the original.  I just thought this would
 be a clearer example of the problem. )

 Thanks,


 --
 Brian J. Ackermann
  brian.ackerm...@gmail.com http://brian.ackerm...@gmail.com
  952.373.1626

 --











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

  



Re: [flexcoders] Constraining one components location to another component

2010-08-27 Thread Haykel BEN JEMIA
Hi,

I think the best way is to create a new component that will hold the image
and the floating components and handle visibility of these components
through states.

Example:

?xml version=1.0 encoding=utf-8?
s:Group
xmlns:fx=http://ns.adobe.com/mxml/2009;
xmlns:s=library://ns.adobe.com/flex/spark
xmlns:mx=library://ns.adobe.com/flex/mx


s:states
s:State name=normal /
s:State name=loading /
s:State name=error /
/s:states

fx:Script
![CDATA[
[Bindable]
public var source:Object;
]]
/fx:Script

mx:Image
id=image
source={source}
complete={currentState = 'normal'}
progress={currentState = 'loading'}
ioError={currentState = 'error'}
/

s:Label top=0 right=0 text=Loading... includeIn=loading /
s:Label top=0 right=0 text=Error! includeIn=error /
/s:Group


Of course you can put any states you like and also set states from outside
with : mainImage.currentState = .

Hope this helps,

Haykel Ben Jemia

Allmas
Web  RIA Development
http://www.allmas-tn.com




On Thu, Aug 26, 2010 at 9:50 PM, dorkie dork from dorktown 
dorkiedorkfromdorkt...@gmail.com wrote:



 Is there a way to constrain one component to another component? I've looked
 at constraint rows and constrain columns in the past but I haven't got it to
 work myself. IE,

 Group id=imageContainer width=500 height=500
  Image id=mainImage width=100 height=100 verticalCenter=0
 horizontalCenter=0/
 /Group

 Image source=download.jpg toolTip=Download this image
right=[Right edge of main image] top=[Top edge of main image]/

 In this example the download icon would float in the upper right corner of
 the image component as the image component floats in the middle of the
 container it is in. FYI In this project there are additional components that
 will float relative to the location and size of the image as well.

 JP
  



[flexcoders] LCDS Deadlock, after upgrading to SDK 3.5

2010-08-27 Thread Shailesh M
We recently upgraded to SDK 3.5a (LCDS 2.6.1) and started to see sporadic 
deadlocks in LCDS's rtmp thread. These are difficult to reproduce in test 
environment but happens in production once every couple of days, sometimes even 
more frequently. 

Here is the thread dump of the threads in lock.


Found one Java-level deadlock 

my-rtmp-SocketServer-WorkerThread-300:
  waiting to lock monitor 0x6a949ba4 (object 0x0b27f6e0, a 
flex.data.SequenceManager),
  which is held by my-rtmp-SocketServer-Reactor4Writer
 my-rtmp-SocketServer-Reactor4Writer:
  waiting to lock monitor 0x6a90f2d4 (object 0x0b321d90, a java.util.ArrayList),
  which is held by my-rtmp-SocketServer-Reactor2Writer
 my-rtmp-SocketServer-Reactor2Writer:
  waiting to lock monitor 0x6a6304a4 (object 0x0b27fc88, a java.util.HashMap),
  which is held by my-rtmp-SocketServer-Reactor4Writer


 Java stack information for the threads listed above 

my-rtmp-SocketServer-WorkerThread-300:
at flex.data.SequenceManager.createSequence(SequenceManager.java:2245)
- waiting to lock 0x0b27f6e0 (a flex.data.SequenceManager)
at flex.data.SequenceManager.manageSequence(SequenceManager.java:786)
at flex.data.SequenceManager.manageSequence(SequenceManager.java:755)
at flex.data.DataService.serviceMessage(DataService.java:571)
at 
flex.messaging.MessageBroker.routeMessageToService(MessageBroker.java:1495)
at 
flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndpoint.java:882)
at 
flex.messaging.endpoints.RTMPConnection.handleTCCommand(RTMPConnection.java:722)
at 
flex.messaging.endpoints.RTMPConnection.serviceTCMessage(RTMPConnection.java:1021)
at 
flex.messaging.endpoints.RTMPConnection.doRead(RTMPConnection.java:514)
at 
flex.messaging.endpoints.RTMPProtocolHandler.doRead(RTMPProtocolHandler.java:123)
at 
flex.messaging.socketserver.Connection$ConnectionReader.run(Connection.java:778)
at 
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1061)
at 
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:575)
at java.lang.Thread.run(Thread.java:619)
 my-rtmp-SocketServer-Reactor4Writer:
at flex.data.SequenceManager.getSequence(SequenceManager.java:373)
- waiting to lock 0x0b321d90 (a java.util.ArrayList)
at 
flex.data.SequenceManager.removeItemIfNecessary(SequenceManager.java:3652)
at 
flex.data.SequenceManager.removeItemIdentityFromSequence(SequenceManager.java:3108)
- locked 0x0b27fc88 (a java.util.HashMap)
at 
flex.data.SequenceManager.unsafeRemoveItemIdentitiesFromSequence(SequenceManager.java:747)
at flex.data.SequenceManager.removeSequence(SequenceManager.java:639)
at flex.data.SequenceManager.removeSequence(SequenceManager.java:621)
at flex.data.SequenceManager.unsubscribeClient(SequenceManager.java:548)
- locked 0x0b27fc70 (a java.util.ArrayList)
- locked 0x0b27f6e0 (a flex.data.SequenceManager)
at 
flex.data.SequenceManager.messageClientDestroyed(SequenceManager.java:3950)
at flex.messaging.MessageClient.invalidate(MessageClient.java:764)
at flex.messaging.MessageClient.invalidate(MessageClient.java:716)
at flex.messaging.client.FlexClient.invalidate(FlexClient.java:480)
at 
flex.messaging.client.FlexClient.unregisterFlexSession(FlexClient.java:1286)
at flex.messaging.FlexSession.unregisterFlexClient(FlexSession.java:850)
at flex.messaging.FlexSession.invalidate(FlexSession.java:666)
at 
flex.messaging.endpoints.RTMPProtocolHandler$DirectRTMPConnection.close(RTMPProtocolHandler.java:306)
at 
flex.messaging.endpoints.RTMPConnection.close(RTMPConnection.java:212)
at 
flex.messaging.endpoints.RTMPProtocolHandler.closed(RTMPProtocolHandler.java:100)
at 
flex.messaging.socketserver.Connection.closeImmediate(Connection.java:422)
at 
flex.messaging.socketserver.Connection$ConnectionWriter.run(Connection.java:965)
at flex.messaging.socketserver.Reactor$Writer.run(Reactor.java:675)
at java.lang.Thread.run(Thread.java:619)
 my-rtmp-SocketServer-Reactor2Writer:
at 
flex.data.SequenceManager.isItemReferencedInternal(SequenceManager.java:3555)
- waiting to lock 0x0b27fc88 (a java.util.HashMap)
at flex.data.SequenceManager.isItemReferenced(SequenceManager.java:3540)
at 
flex.data.SequenceManager.isItemReferencedInternal(SequenceManager.java:3567)
- locked 0x0b321da8 (a java.util.HashMap)
at flex.data.SequenceManager.isItemReferenced(SequenceManager.java:3540)
at 
flex.data.SequenceManager.isItemReferencedInternal(SequenceManager.java:3567)
- locked 0x0b27bd10 (a java.util.HashMap)
at flex.data.SequenceManager.isItemReferenced(SequenceManager.java:3540)
at 

[flexcoders] Where To Declare CSS Style Name in AS Component

2010-08-27 Thread Angelo Anolin
Dear FlexCoders,

In Flex 3, you can simply name your CSS style to the name of the component you 
created.  For example, you created an AS component named MyNewButton, hence, in 
your CSS file, you can declare a style with name MyNewButton and the component 
automatically picks up that style.

But when you use Flex 4, you get an error saying: CSS type selectors are not 
supported in components: MyNewButton.

Modifying the CSS file, let us say the style name MyNewButton has been now 
declare as .MyNewButton{}.  How do I reference the new style name to be used by 
the component? How do I declare it in the AS file?

Thanks for your inputs.

Angelo



  

Re: [flexcoders] styles are ignored

2010-08-27 Thread Haykel BEN JEMIA
CSS in Flex 4 uses namespaces and you have to update your Flex 3 CSS files.
You can simply open the CSS files in Flash Builder, put the cursor directly
after every class name in the selectors and click 'Ctrl'-Space and Flash
Builder will add the namespaces.

Haykel Ben Jemia

Allmas
Web  RIA Development
http://www.allmas-tn.com




On Fri, Aug 27, 2010 at 4:53 PM, Angelo Anolin angelo_ano...@yahoo.comwrote:



 I must assume that you are using Flex SDK 4.

 I am currently having the same issues now.  Trying to port some Flex 3
 codes to Flex 4 and a lot of styling and CSS things are going haywire.

 I thought that developer and designer productivity has been greatly
 enhanced in SDK 4.0 but it seems that people who are both dev/designer at
 the same time are getting a hard time actually making the code work.

 Angelo

 --
 *From:* Jesse Warden jesse.war...@gmail.com
 *To:* flexcoders@yahoogroups.com
 *Sent:* Fri, 27 August, 2010 10:27:26
 *Subject:* [flexcoders] styles are ignored



 This Flex app loads in a module, and an external stylesheet (no, I can't
 get into why).  When I put my mx:Style source=defaults.css / in the app,
 they don't show up.  If I trace out the CSSStyleDeclaration in
 creationComplete it's null.  The code doesn't allow me to compile with
 -keep-generated-actionscript, so it's not easy for me to figure out why.

 So:
 1. why the hell is it ignoring my syles; I have things like Selectors that
 are unique, yet aren't in StyleManager at all...?
 2. If I load them in dynamically as a SWF, will that fix it?

  



[flexcoders] FB4: DataGroup not resizing when dataProvider is updated

2010-08-27 Thread Nick Middleweek
Hello,

I'm new to FB4 and am working with another chap creating a component. We've
got a DataGroup who's dataProvider is increased when a button is pressed.

When the DataGroup is set to a fixed height, i.e. 200 we can see the
itemRenderer components being added on screen but with the DataGroup.height
= 100%, the itemRenderers are being placed ontop of each other. The Layout
of the DataGroup is set to VerticalLayout.

Has anyone had any success with anything similar?


Thanks in advance and happy bank holiday!

Nick


[flexcoders] styles are ignored

2010-08-27 Thread Jesse Warden
This Flex app loads in a module, and an external stylesheet (no, I can't get
into why).  When I put my mx:Style source=defaults.css / in the app,
they don't show up.  If I trace out the CSSStyleDeclaration in
creationComplete it's null.  The code doesn't allow me to compile with
-keep-generated-actionscript, so it's not easy for me to figure out why.

So:
1. why the hell is it ignoring my syles; I have things like Selectors that
are unique, yet aren't in StyleManager at all...?
2. If I load them in dynamically as a SWF, will that fix it?


[flexcoders] Flex appli to Air.

2010-08-27 Thread Christophe
Hello,

Is it fast to convert a Flex appli to an Air Appli ? 

Did the database should be local to the client ?

Thank you,
Christophe, 




Re: [flexcoders] styles are ignored

2010-08-27 Thread Angelo Anolin
I must assume that you are using Flex SDK 4.

I am currently having the same issues now.  Trying to port some Flex 3 codes to 
Flex 4 and a lot of styling and CSS things are going haywire.

I thought that developer and designer productivity has been greatly enhanced in 
SDK 4.0 but it seems that people who are both dev/designer at the same time are 
getting a hard time actually making the code work.

Angelo




From: Jesse Warden jesse.war...@gmail.com
To: flexcoders@yahoogroups.com
Sent: Fri, 27 August, 2010 10:27:26
Subject: [flexcoders] styles are ignored

  
This Flex app loads in a module, and an external stylesheet (no, I can't get 
into why).  When I put my mx:Style source=defaults.css / in the app, they 
don't show up.  If I trace out the CSSStyleDeclaration in creationComplete it's 
null.  The code doesn't allow me to compile with -keep-generated-actionscript, 
so it's not easy for me to figure out why.

So:
1. why the hell is it ignoring my syles; I have things like Selectors that are 
unique, yet aren't in StyleManager at all...?
2. If I load them in dynamically as a SWF, will that fix it?
 


  

Re: [flexcoders] FB4: DataGroup not resizing when dataProvider is updated

2010-08-27 Thread Alex Harui
Try setting useVirtualLayout=false.  Also make sure the renderer measures 
correctly in one-pass.  If you are counting on images to load later that can 
mess things up.


On 8/27/10 8:25 AM, Nick Middleweek n...@middleweek.co.uk wrote:






Hello,

I'm new to FB4 and am working with another chap creating a component. We've got 
a DataGroup who's dataProvider is increased when a button is pressed.

When the DataGroup is set to a fixed height, i.e. 200 we can see the 
itemRenderer components being added on screen but with the DataGroup.height = 
100%, the itemRenderers are being placed ontop of each other. The Layout of the 
DataGroup is set to VerticalLayout.

Has anyone had any success with anything similar?


Thanks in advance and happy bank holiday!

Nick






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


Re: [flexcoders] styles are ignored

2010-08-27 Thread Alex Harui
It might be namespaces, but we’ve seen a few folks struggling with this sort of 
thing.  In Flex 4 styles are per-module.  When a module is loaded, if a type 
selector in the module doesn’t match the main app’s copy of the type-selector  
or it doesn’t exist in the main app, then the module’s copy of the 
type-selector is used, and loading a new type selector into the main app won’t 
be seen by the module.


On 8/27/10 9:12 AM, Haykel BEN JEMIA hayke...@gmail.com wrote:






CSS in Flex 4 uses namespaces and you have to update your Flex 3 CSS files. You 
can simply open the CSS files in Flash Builder, put the cursor directly after 
every class name in the selectors and click 'Ctrl'-Space and Flash Builder will 
add the namespaces.

Haykel Ben Jemia

Allmas
Web  RIA Development
http://www.allmas-tn.com




On Fri, Aug 27, 2010 at 4:53 PM, Angelo Anolin angelo_ano...@yahoo.com wrote:





I must assume that you are using Flex SDK 4.

I am currently having the same issues now.  Trying to port some Flex 3 codes to 
Flex 4 and a lot of styling and CSS things are going haywire.

I thought that developer and designer productivity has been greatly enhanced in 
SDK 4.0 but it seems that people who are both dev/designer at the same time are 
getting a hard time actually making the code work.

Angelo


From: Jesse Warden jesse.war...@gmail.com
To: flexcoders@yahoogroups.com
Sent: Fri, 27 August, 2010 10:27:26
Subject: [flexcoders] styles are ignored




This Flex app loads in a module, and an external stylesheet (no, I can't get 
into why).  When I put my mx:Style source=defaults.css / in the app, they 
don't show up.  If I trace out the CSSStyleDeclaration in creationComplete it's 
null.  The code doesn't allow me to compile with -keep-generated-actionscript, 
so it's not easy for me to figure out why.


So:
1. why the hell is it ignoring my syles; I have things like Selectors that are 
unique, yet aren't in StyleManager at all...?
2. If I load them in dynamically as a SWF, will that fix it?












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


Re: [flexcoders] Where To Declare CSS Style Name in AS Component

2010-08-27 Thread Angelo Anolin
Anybody?

Having so much hard time trying to move flex3 to flex4.

Basically this is a styling issue which is far beyond my expertise.

If you have a component created named myButton.as, and you created a CSS file 
with a style named myButton, that CSS declaration would span all instances 
where 
you used the myButton component.  But since Flex4 does not like that naming 
convention of CSS, I have had to rename my CSS declaration to .myButton{}.

Now, how do I declare the same in my AS component to utilize that style?

Thanks a lot for any inputs on this.




From: Angelo Anolin angelo_ano...@yahoo.com
To: flexcoders@yahoogroups.com
Sent: Fri, 27 August, 2010 10:51:02
Subject: [flexcoders] Where To Declare CSS Style Name in AS Component

  
Dear FlexCoders,

In Flex 3, you can simply name your CSS style to the name of the component you 
created.  For example, you created an AS component named MyNewButton, hence, in 
your CSS file, you can declare a style with name MyNewButton and the component 
automatically picks up that style.

But when you use Flex 4, you get an error saying: CSS type selectors are not 
supported in components: MyNewButton.

Modifying the CSS file, let us say the style name MyNewButton has been now 
declare as .MyNewButton{}.  How do I reference the new style name to be used by 
the component? How do I declare it in the AS file?

Thanks for your  inputs.

Angelo


 


  

Re: [flexcoders] Where To Declare CSS Style Name in AS Component

2010-08-27 Thread Wesley Acheson
I think the issue is that you need to namespace all of the styles. So
depending on which component your myButton was based off a spark component
or a Halo component.

See the following link for more details.

http://cookbooks.adobe.com/post_How_to_use_the_new_CSS_syntax_in_Flex_4-15726.html

Another good way to do this is to use the style manager built into flash
builder, you can apply a style to an instance of a button directly, click
the convert to css button and see what the markup for the css looks like.

Hope this has been some help,

Wes

On Fri, Aug 27, 2010 at 10:42 PM, Angelo Anolin angelo_ano...@yahoo.comwrote:



 Anybody?

 Having so much hard time trying to move flex3 to flex4.

 Basically this is a styling issue which is far beyond my expertise.

 If you have a component created named myButton.as, and you created a CSS
 file with a style named myButton, that CSS declaration would span all
 instances where you used the myButton component.  But since Flex4 does not
 like that naming convention of CSS, I have had to rename my CSS declaration
 to .myButton{}.

 Now, how do I declare the same in my AS component to utilize that style?

 Thanks a lot for any inputs on this.

 --
 *From:* Angelo Anolin angelo_ano...@yahoo.com
 *To:* flexcoders@yahoogroups.com
 *Sent:* Fri, 27 August, 2010 10:51:02
 *Subject:* [flexcoders] Where To Declare CSS Style Name in AS Component



 Dear FlexCoders,

 In Flex 3, you can simply name your CSS style to the name of the component
 you created.  For example, you created an AS component named MyNewButton,
 hence, in your CSS file, you can declare a style with name MyNewButton and
 the component automatically picks up that style.

 But when you use Flex 4, you get an error saying: CSS type selectors are
 not supported in components: MyNewButton.

 Modifying the CSS file, let us say the style name MyNewButton has been now
 declare as .MyNewButton{}.  How do I reference the new style name to be used
 by the component? How do I declare it in the AS file?

 Thanks for your inputs.

 Angelo



  



[flexcoders] Re: enterState exitState frustrations

2010-08-27 Thread striton_ca
--- In flexcoders@yahoogroups.com, striton_ca aa...@... wrote:

 I am a new Flex coder. So far I'm enjoying the flexibility of the framework, 
 but I am having a heck of a time with state changes. I'm using Flex 4.1. I'm 
 working on a basic GUI. You start with a welcome screen, followed by a state 
 change to a login screen, and a state change to a chat lobby. When the lobby 
 is displayed, there's a bunch of initialization that needs to happen. If the 
 user navigates away from this state/view, then they should be automatically 
 disconnected from the chat server and be brought back to the beginning. The 
 problem is, I cannot for the life of me get anything to trigger using 
 enterState and exitState. Even currentStateChanging appears to not be 
 triggered. I can make the init happen the first time using creationComplete, 
 but that's it. I am wondering if my using a custom event handler is causing 
 trouble.
 

I'm thinking now that the problem is that it's the parent container who's state 
is changing, so the child component trigger never gets called? So I thought 
maybe the hide trigger would get called when the component gets swapped out 
for a different one. It doesn't though. 

Frustrated,
Aaron




Re: [flexcoders] Re: FB4: Looping thru itemrenderers

2010-08-27 Thread Mandlem Nageswara Rao
You should control at the data provider level..not at the itemrenderer 
level..To make clear you first give 10 elements only to data provider and when 
user clicks then you update the data provider to give next 10 elements. This is 
more similar to our traditional approach of showing data in pagess, but here 
the difference is you already have the data here and you just manipulating it 
here..

THanks,
Nagesh

--- On Thu, 26/8/10, Amy amyblankens...@bellsouth.net wrote:

From: Amy amyblankens...@bellsouth.net
Subject: [flexcoders] Re: FB4: Looping thru itemrenderers
To: flexcoders@yahoogroups.com
Date: Thursday, 26 August, 2010, 3:25 AM







 



  



  
  
  Hm, I am not sure how you'd accomplish this with Flex 4, if you don't 
like the answers people have already given you.  However, you could extend 
SkinnableDataContainer to allow you to add a style callback function similar to 
what AdvancedDataGrid uses.  In Flex 3, I did similar with the 
TileList_withStyle and DataGrid_withStyle on flexdiary.blogspot.com.  You may 
find that one of these fits your needs if you're not commited to spark only.



HTH;



Amy



--- In flexcoders@yahoogroups.com, sdl1326 azsl1326-em...@... wrote:



 Here's some additional insight into what I am trying to do. 

 

 The user can click on one of the thumbnails(itemrenderer) which changes the 
 background color and launches a larger version of the image. Within that 
 larger image is a next and previous button which will navigate to the 
 next/previous image(itemrenderer). I need to be able to change the background 
 color of the next/previous thumbnail/itemrenderer. So, in essence, I need to 
 determine the next/previous itemrenderer and call the function that will 
 change the background color.

  

 Thanks.

 --- In flexcoders@yahoogroups.com, Amy amyblankenship@ wrote:

 

  You should never do this.  What is the end goal?

  

  --- In flexcoders@yahoogroups.com, sdl1326 azsl1326-email@ wrote:

  

   

   I have a scrollable SkinnableDataContainer which contains thumbnail

   images (in an itemrenderer). While there can be several hundred

   thumbnail images, only 10 itemrenderers are viewable on the screen at a

   time. If I need to loop through the 10 viewable itemrenderers, what's

   the best way to do it?

   

   

   

   

   Thanks, in advance.

  

 








 





 



  







[flexcoders] Re: FB4: Tabbing Problem on Popped Up Custom Components

2010-08-27 Thread Arik de Guzman

thanks alex for taking time to reply,

yes i tried this, the formitem-textinput has focus but upon tabbing, instead 
of going to the next formitem-textinput, the focus goes to the parent 
container which is the main container, the windowedapplication.

--- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote:

 Try setting focus on creationComplete, or even later than that by using 
 callLater
 
 
 On 8/24/10 11:30 PM, Arik de Guzman arik...@... wrote:
 
 
 
 
 
 
 Hi,
 
 just made a switch from Flex Builder 3 to FB 4, and encountered a problem in 
 tabbing when i create an instance of a custom component using the 
 PopUpManager. When i tab inside the fields of the pop up,
 it goes to the container under it.
 
 my scenario would be :
 
 WindowApplication initialize calls the custom pop-up that acts as a login 
 system
 
 username.setFocus on initialize of the custom component
 
 when i tab to go to set focus on the next component(Text-input), instead of 
 going to the next field, it goes to the component under the popup, which is 
 the main container.
 
 in FB3, i usually just set the tabIndex into a static hierarchy, already 
 tried that one but seems that it works differently in FB4.
 
 also tried the TabEnabled, TabChildren on the fields or the container, but no 
 luck.
 
 suggestions and inputs are very much appreciated. thanks in advance.
 
 
 
 
 
 
 --
 Alex Harui
 Flex SDK Team
 Adobe System, Inc.
 http://blogs.adobe.com/aharui





[flexcoders] Problem getting compiler to recognize a custom class

2010-08-27 Thread colin.ashe
Hi,

I've been banging my head on the wall for the last few days over this problem - 
hopefully one of you can help.

I'm writing a program to visualize the movement of some particles and I've 
written a class, which extends UIComponent as the main visual element.  This 
class then uses the Flint Particle System library to handle the actual particle 
dynamics.  I'm using Flash Builder 4 and spark components wherever possible.  
Here's the problem: every time I compile, I get:

1046: Type was not found or was not a compile-time constant: OilApp.

I've checked the compiler settings and told it to look in the appropriate 
package/folder for the class file.  I've set the appropriate XML namespace and 
the IDE knows about the class and will autocomplete code related to the class.  
However, evidently, the compiler doesn't know about it.  

Could anyone suggest what I could do to fix this.  My head (and wall) can only 
take so much more of this.

Thanks,
Colin




[flexcoders] Re: FB4: Tabbing Problem on Popped Up Custom Components

2010-08-27 Thread Arik de Guzman

Hi,

thanks alex for taking time to reply.

I tried that also, but when i set the creationComplete to setfocus on my text 
input which is located inside a form, When i Tab, instead of going to the next 
form item which is another textinput, the popup container loses focus, and next 
focus is the parent container that called it which is the main application 
container, windowedapplication.


--- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote:

 Try setting focus on creationComplete, or even later than that by using 
 callLater
 
 
 On 8/24/10 11:30 PM, Arik de Guzman arik...@... wrote:
 
 
 
 
 
 
 Hi,
 
 just made a switch from Flex Builder 3 to FB 4, and encountered a problem in 
 tabbing when i create an instance of a custom component using the 
 PopUpManager. When i tab inside the fields of the pop up,
 it goes to the container under it.
 
 my scenario would be :
 
 WindowApplication initialize calls the custom pop-up that acts as a login 
 system
 
 username.setFocus on initialize of the custom component
 
 when i tab to go to set focus on the next component(Text-input), instead of 
 going to the next field, it goes to the component under the popup, which is 
 the main container.
 
 in FB3, i usually just set the tabIndex into a static hierarchy, already 
 tried that one but seems that it works differently in FB4.
 
 also tried the TabEnabled, TabChildren on the fields or the container, but no 
 luck.
 
 suggestions and inputs are very much appreciated. thanks in advance.
 
 
 
 
 
 
 --
 Alex Harui
 Flex SDK Team
 Adobe System, Inc.
 http://blogs.adobe.com/aharui





Re: [flexcoders] Flex appli to Air.

2010-08-27 Thread Rob Parkhill
Christophe,

If you have a working Flex Application, it is simple to change the Project Type 
to an AIR application.  Changing the database is a little more involved, as you 
would have to create the tables etc. the first time the AIR app is installed. 
 There are some great samples in the Tour de Flex.

Cheers,

Rob




From: Christophe christophe_jacque...@yahoo.fr
To: flexcoders@yahoogroups.com
Sent: Fri, August 27, 2010 12:52:14 PM
Subject: [flexcoders] Flex appli to Air.

  
Hello,

Is it fast to convert a Flex appli to an Air Appli ? 

Did the database should be local to the client ?

Thank you,
Christophe, 


 



Re: [flexcoders] Re: Getting HTTP status codes from NetConnection

2010-08-27 Thread Mandlem Nageswara Rao
No you can get them... You need to add a NetStatusEvent to NetConnect object, 
when there is a status you will get informed automatically...

Nagesh

--- On Wed, 25/8/10, aaronius9er9er aaronius...@gmail.com wrote:

From: aaronius9er9er aaronius...@gmail.com
Subject: [flexcoders] Re: Getting HTTP status codes from NetConnection
To: flexcoders@yahoogroups.com
Date: Wednesday, 25 August, 2010, 10:11 PM







 



  



  
  
  I was afraid that was the case.  Thanks.



--- In flexcoders@yahoogroups.com, Gregor Kiddie gregor.kid...@... wrote:



 Can of worms...

 

  

 

 Short answer. You can't.

 

  

 

 Long answer. You can't and the way that was making you cringe is right.

 

  

 

 The browsers don't tend to pass back the http status code back to the

 Flash Player, so you have to make do with passing back a 200 with the

 code embedded inside.

 

  

 

 Gk.








 





 



  







Re: [flexcoders] Re: FB4: Tabbing Problem on Popped Up Custom Components

2010-08-27 Thread Alex Harui
Is the popup an IFocusManagerContainer?  Otherwise it won’t have its own focus 
loop.


On 8/26/10 4:46 PM, Arik de Guzman arik...@yahoo.com wrote:







Hi,

thanks alex for taking time to reply.

I tried that also, but when i set the creationComplete to setfocus on my text 
input which is located inside a form, When i Tab, instead of going to the next 
form item which is another textinput, the popup container loses focus, and next 
focus is the parent container that called it which is the main application 
container, windowedapplication.

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex 
Harui aha...@... wrote:

 Try setting focus on creationComplete, or even later than that by using 
 callLater


 On 8/24/10 11:30 PM, Arik de Guzman arik...@... wrote:






 Hi,

 just made a switch from Flex Builder 3 to FB 4, and encountered a problem in 
 tabbing when i create an instance of a custom component using the 
 PopUpManager. When i tab inside the fields of the pop up,
 it goes to the container under it.

 my scenario would be :

 WindowApplication initialize calls the custom pop-up that acts as a login 
 system

 username.setFocus on initialize of the custom component

 when i tab to go to set focus on the next component(Text-input), instead of 
 going to the next field, it goes to the component under the popup, which is 
 the main container.

 in FB3, i usually just set the tabIndex into a static hierarchy, already 
 tried that one but seems that it works differently in FB4.

 also tried the TabEnabled, TabChildren on the fields or the container, but no 
 luck.

 suggestions and inputs are very much appreciated. thanks in advance.






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







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


Re: [flexcoders] Re: Getting HTTP status codes from NetConnection

2010-08-27 Thread Srinivas S.M
Nagesh,

NetStatusEvent doesn't return HTTP Status codes, it would have info
objecthttp://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/events/NetStatusEvent.html#infowhich
has it's own code  different meanings. AARONIUS9er9er is asking about
404, 500, 200 etc.. HTTP codes..

 Srinivas

On Thu, Aug 26, 2010 at 7:31 AM, Mandlem Nageswara Rao 
nagesh.mand...@yahoo.co.in wrote:



 No you can get them... You need to add a NetStatusEvent to NetConnect
 object, when there is a status you will get informed automatically...

 Nagesh

 --- On *Wed, 25/8/10, aaronius9er9er aaronius...@gmail.com* wrote:


 From: aaronius9er9er aaronius...@gmail.com
 Subject: [flexcoders] Re: Getting HTTP status codes from NetConnection
 To: flexcoders@yahoogroups.com
 Date: Wednesday, 25 August, 2010, 10:11 PM




 I was afraid that was the case. Thanks.

 --- In 
 flexcoders@yahoogroups.comhttp://mc/compose?to=flexcoders%40yahoogroups.com,
 Gregor Kiddie gregor.kid...@... wrote:
 
  Can of worms...
 
 
 
  Short answer. You can't.
 
 
 
  Long answer. You can't and the way that was making you cringe is right.
 
 
 
  The browsers don't tend to pass back the http status code back to the
  Flash Player, so you have to make do with passing back a 200 with the
  code embedded inside.
 
 
 
  Gk.