Re: [flexcoders] Need help dynamically modifying text displayed based on DB return

2012-01-30 Thread Haykel BEN JEMIA
I think the best way is to use states. Define the different states for your
component, e.g.







You have now to track changes to win.status and set the current state
accordingly, e.g. by listening to the property change event on win:

protected function win_propertyChangeHandler(event:PropertyChangeEvent):void
{
switch (event.property)
{
case "status":
imageStatus = event.newValue;
switch (event.newValue)
{
case "Available":
currentState = "available";
break;
case "Sold":
currentState = "sold";
break;
default:
currentState = "other";
break;
}
break;
}
}

and finally set the properties of the artPrice text based on the current
state:



I hope this helps.

Haykel Ben Jemia

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




On 30 January 2012 14:55, hermeszfineart  wrote:

> **
>
>
> Part of the functionality in the gallery app ia am working on for my wife
> is a popup window that displays information about the specific painting or
> drawing.
>
> I am trying to figure out how to do the following based on the value
> returned from the DB for the imageStatus field:
> 1) Change the text displayed for the Price to the {imageStatus)if that
> value is anything other than "Available".
> 2) Change the color of the above text to RED if the {imageStatus) == Sold.
>
>
>
> 
> 
> 
>
> 
>
> 
>
> 
>
> 
>
>  fontFamily="Times New Roman" fontSize="18" text="{imageStyle}"/>
>
>  fontSize="18" text="{imageMedium}"/>
>
> 
>
>  
>
> 
>
> I have tried several things with public functions, getters/setters, but
> have gotten no where.
>
> Could someone kindly point me in the right direction?
>
> Thanks,
>
> John
>  
>


Re: [flexcoders] Moving my command-line development to FlashBuilder4.6 - confused.

2012-01-30 Thread Srinivas Sandur Madhu Murthy
Rishi Tandon, Chill Bro, again you are proving me that you don't read your 
emails completely :)!!.  By the way as you said it's free forum, so I thought I 
can freely suggest someone & I did it for you! hope you understand. 

I guess this 4th time I have seen you suggesting something else where as the 
problem was something else & I have also seen that you have come back and gave 
proper answer later too. 

If you read my email properly I was just suggesting you read-up entire email so 
that you understand the problem and help more people!!! I never intended to be 
RUDE or HURT your ego!.. it's just suggestion, once again I honestly believe, 
if you read your emails completely, you will be more helpful to 
community!!:) :)

On Jan 30, 2012, at 10:43 PM, Tandon, Rishi wrote:

> [Attachment(s) from Tandon, Rishi included below]
> 
> Srinivas, don't say other to do WHAT if they are following the basic 
> Netiquette?
> These are the following reason why you can't give tongue to community member:
> 1. You are not authorized as I think you are not the admin of the group.
> 2. I am not getting paid to deliver the solution.
> 3. This is a free forum and you are free to post solution or your opinion.
> 4. I love to debug the code and specify the exact solution if I am aware of.
> 
> Dan, 
> To be more specfic, please refer to the attach IntegratedEncoder.FXP project 
> where I have merged your controller logic into a single MXML file as the 
> basic rule to create a flex application is to have only one Applicatin 
> container as root.
> 
> About the Application container
> The first tag in an MXML application is either the  tag for 
> the Spark application container, or the 
> tag for an MX application container. The application container then becomes 
> the default container for any content that you add to your application.
> 
> In IntegratedEncoder.mxml, the  is the root tag, whereas 
> IntegratedEncoderController.as is extending the .
> 
> Regards,
> Rishi Tandon
> 
> From: Srinivas Sandur Madhu Murthy 
> To: flexcoders@yahoogroups.com 
> Sent: Tuesday, January 31, 2012 10:08 AM
> Subject: Re: [flexcoders] Moving my command-line development to 
> FlashBuilder4.6 - confused.
> 
>  
> Rishi,
> 
> Please read the complete email before you ask for something. I understand you 
> like to help, but please read-up completely, understand problem & then ask 
> for things to help more.
> 
> Dan,
> 
> Whether you use Command-line or Flex Builder it doesn't matter, you always 
> will try to compile 1 application in entire project, unless you have two or 
> more applications in the project. Correct me if I am wrong, as my 
> understanding goes you have EncoderController.as file which has class 
> definition for "EncoderController" class which extends I guess from 
> Application/Sprite. I guess this is the reason your project's main mxml file 
> has root node as . Now if you are using Flex 
> Builder, normally the main application mxml file which Flex Builder Template 
> creates has root node as s:Application. In your case, after that mxml is 
> created all you need to do just replace that default auto generated code by 
> your old mxml contents & include EncoderController.as in the src directory, 
> which should work fine for you.
> 
> FX:Script tag is used in mxml to just include AS scripts which doesn't have 
> class definitions. Normally these AS files would have methods, variables etc 
> required or used in MXML file. I hope you know that any MXML file can use 
> fx:script tag and write the AS scripts stuff required in that particular 
> MXML. Treat this MXML+AS script as class.
> 
> The reason why you getting error in first place is, the MXML file which you 
> have is extending from spark::Application [hence root tag as s:Application] & 
> included AS file has definition of a class which also extends from 
> spark:Application.
> 
> Writing code and compiling with SDK using compile time shouldn't be different 
> from using Flex Builder. In-fact it gives more flexibility & user 
> friendliness. Please read-up more on using Flex Builder, should help you 
> convert your application more easily.
> 
> Let me know if you need more help.
> 
> Thanks
> Srinivas
> 
> On Jan 30, 2012, at 4:11 AM, Tandon, Rishi wrote:
> 
>>  
>> 
>> Dan, send over your mxml and as file here.
>> There could be many reasons for the exception:
>> 1. Compatible with the sdk. Try to change to flex sdk 3.2 or 3.6
>> 2. Namespace inclusion.
>> In you code, the namespace is pointed to "http://www.adobe.com/2006/mxml";
>> Whereas, in sdk 4 onwards, we are using three namespace:
>>  xmlns:fx="http://ns.adobe.com/mxml/2009";
>>  xmlns:s="library://ns.adobe.com/flex/spark"
>>  xmlns:mx="library://ns.adobe.com/flex/mx" 
>> 
>> 
>> 
>> Regards,
>> Rishi Tandon
>> 
>> 
>> From: Dan M 
>> To: flexcoders@yahoogroups.com 
>> Sent: Saturday, January 28, 2012 12:54 AM
>> Subject: [flexcoders] Moving my command-line development to FlashBuilder4.6 
>> - confused.
>>

Re: [flexcoders] Moving my command-line development to FlashBuilder4.6 - confused. [1 Attachment]

2012-01-30 Thread Tandon, Rishi
Srinivas, don't say other to do WHAT if they are following the basic Netiquette?
These are the following reason why you can't give tongue to community member:
1. You are not authorized as I think you are not the admin of the group.
2. I am not getting paid to deliver the solution.
3. This is a free forum and you are free to post solution or your opinion.
4. I love to debug the code and specify the exact solution if I am aware of.

Dan, 
To be more specfic, please refer to the attach IntegratedEncoder.FXP project 
where I have merged your controller logic into a single MXML file as the basic 
rule to create a flex application is to have only one Applicatin container as 
root.

About the Application container
The first tag in an MXML application is either the  tag for the 
Spark application container, or the 
tag for an MX application container. The application container then becomes the 
default container for any content that you add to your application.

In IntegratedEncoder.mxml, the  is the root tag, whereas 
IntegratedEncoderController.as is extending the .

Regards,
Rishi Tandon



 From: Srinivas Sandur Madhu Murthy 
To: flexcoders@yahoogroups.com 
Sent: Tuesday, January 31, 2012 10:08 AM
Subject: Re: [flexcoders] Moving my command-line development to FlashBuilder4.6 
- confused.
 

  
Rishi,

Please read the complete email before you ask for something. I understand you 
like to help, but please read-up completely, understand problem & then ask for 
things to help more.

Dan,

Whether you use Command-line or Flex Builder it doesn't matter, you always will 
try to compile 1 application in entire project, unless you have two or more 
applications in the project. Correct me if I am wrong, as my understanding goes 
you have EncoderController.as file which has class definition for 
"EncoderController" class which extends I guess from Application/Sprite. I 
guess this is the reason your project's main mxml file has root node as 
. Now if you are using Flex Builder, normally 
the main application mxml file which Flex Builder Template creates has root 
node as s:Application. In your case, after that mxml is created all you need to 
do just replace that default auto generated code by your old mxml contents & 
include EncoderController.as in the src directory, which should work fine for 
you.

FX:Script tag is used in mxml to just include AS scripts which doesn't have 
class definitions. Normally these AS files would have methods, variables etc 
required or used in MXML file. I hope you know that any MXML file can use 
fx:script tag and write the AS scripts stuff required in that particular MXML. 
Treat this MXML+AS script as class.

The reason why you getting error in first place is, the MXML file which you 
have is extending from spark::Application [hence root tag as s:Application] & 
included AS file has definition of a class which also extends from 
spark:Application.

Writing code and compiling with SDK using compile time shouldn't be different 
from using Flex Builder. In-fact it gives more flexibility & user friendliness. 
Please read-up more on using Flex Builder, should help you convert your 
application more easily.

Let me know if you need more help.

Thanks
Srinivas

On Jan 30, 2012, at 4:11 AM, Tandon, Rishi wrote:

  
>
>
>Dan, send over your mxml and as file here.
>There could be many reasons for the exception:
>1. Compatible with the sdk. Try to change to flex sdk 3.2 or 3.6
>2. Namespace inclusion.
>In you code, the namespace is pointed to "http://www.adobe.com/2006/mxml";
>Whereas, in sdk 4 onwards, we are using three namespace:
> xmlns:fx="http://ns.adobe.com/mxml/2009";
> xmlns:s="library://ns.adobe.com/flex/spark"
> xmlns:mx="library://ns.adobe.com/flex/mx" 
>
>
>
>
>
>
>Regards,
>Rishi Tandon
>
>
>
>
>
>
> From: Dan M 
>To: flexcoders@yahoogroups.com 
>Sent: Saturday, January 28, 2012 12:54 AM
>Subject: [flexcoders] Moving my command-line development to FlashBuilder4.6 - 
>confused.
> 
>
>  
>I downloaded and installed the Mac version of Flash Builder 4.6. There 
>is enough development work yet to be done on my project I figured that 
>having an IDE to work in might make life easier.
>
>The project was originally written as an mxml file (Encoder.mxml) and an 
>ActionScript file (EncoderController.as). The mxml file refers to the 
>ActionScript file by starting out with :
>http://www.adobe.com/2006/mxml"; 
>layout="absolute"
>xmlns:local="*"
>height="800" width="800"
>backgroundColor="#FF"
>backgroundAlpha="0">
>
>On the Mac I selected "New" then "Flex Project" and named the project 
>"IntegratedEncoder". That got me an mxml file. I then copied the .as 
>file over from my other working environment, renamed it 
>"IntegratedEncoderController.as", changed the class name appropriately, 
>and modified the new mxml file Flash Builder made for me to include 
>""
>
>When I save the file the editor windows for 
>IntegratedEncoderCon

Re: [flexcoders] Moving my command-line development to FlashBuilder4.6 - confused.

2012-01-30 Thread Srinivas Sandur Madhu Murthy
Rishi,

Please read the complete email before you ask for something. I understand you 
like to help, but please read-up completely, understand problem & then ask for 
things to help more.

Dan,

Whether you use Command-line or Flex Builder it doesn't matter, you always will 
try to compile 1 application in entire project, unless you have two or more 
applications in the project. Correct me if I am wrong, as my understanding goes 
you have EncoderController.as file which has class definition for 
"EncoderController" class which extends I guess from Application/Sprite. I 
guess this is the reason your project's main mxml file has root node as 
. Now if you are using Flex Builder, normally 
the main application mxml file which Flex Builder Template creates has root 
node as s:Application. In your case, after that mxml is created all you need to 
do just replace that default auto generated code by your old mxml contents & 
include EncoderController.as in the src directory, which should work fine for 
you.

FX:Script tag is used in mxml to just include AS scripts which doesn't have 
class definitions. Normally these AS files would have methods, variables etc 
required or used in MXML file. I hope you know that any MXML file can use 
fx:script tag and write the AS scripts stuff required in that particular MXML. 
Treat this MXML+AS script as class.

The reason why you getting error in first place is, the MXML file which you 
have is extending from spark::Application [hence root tag as s:Application] & 
included AS file has definition of a class which also extends from 
spark:Application.

Writing code and compiling with SDK using compile time shouldn't be different 
from using Flex Builder. In-fact it gives more flexibility & user friendliness. 
Please read-up more on using Flex Builder, should help you convert your 
application more easily.

Let me know if you need more help.

Thanks
Srinivas

On Jan 30, 2012, at 4:11 AM, Tandon, Rishi wrote:

> 
> Dan, send over your mxml and as file here.
> There could be many reasons for the exception:
> 1. Compatible with the sdk. Try to change to flex sdk 3.2 or 3.6
> 2. Namespace inclusion.
> In you code, the namespace is pointed to "http://www.adobe.com/2006/mxml";
> Whereas, in sdk 4 onwards, we are using three namespace:
>  xmlns:fx="http://ns.adobe.com/mxml/2009";
>  xmlns:s="library://ns.adobe.com/flex/spark"
>  xmlns:mx="library://ns.adobe.com/flex/mx" 
> 
> 
> 
> Regards,
> Rishi Tandon
> 
> 
> From: Dan M 
> To: flexcoders@yahoogroups.com 
> Sent: Saturday, January 28, 2012 12:54 AM
> Subject: [flexcoders] Moving my command-line development to FlashBuilder4.6 - 
> confused.
> 
>  
> I downloaded and installed the Mac version of Flash Builder 4.6. There 
> is enough development work yet to be done on my project I figured that 
> having an IDE to work in might make life easier.
> 
> The project was originally written as an mxml file (Encoder.mxml) and an 
> ActionScript file (EncoderController.as). The mxml file refers to the 
> ActionScript file by starting out with :
> http://www.adobe.com/2006/mxml"; 
> layout="absolute"
> xmlns:local="*"
> height="800" width="800"
> backgroundColor="#FF"
> backgroundAlpha="0">
> 
> On the Mac I selected "New" then "Flex Project" and named the project 
> "IntegratedEncoder". That got me an mxml file. I then copied the .as 
> file over from my other working environment, renamed it 
> "IntegratedEncoderController.as", changed the class name appropriately, 
> and modified the new mxml file Flash Builder made for me to include 
> ""
> 
> When I save the file the editor windows for 
> IntegratedEncoderController.as shows an error on the line in which I 
> import flash.media.Camera. The line with the error and the lines 
> surrounding it are:
> 
> import flash.display.*;
> import flash.events.MouseEvent;
> import flash.events.NetStatusEvent;
> import flash.external.ExternalInterface;
> -->import flash.media.Camera; <---
> import flash.media.Microphone;
> import flash.media.Video;
> import flash.net.navigateToURL;
> import flash.net.NetConnection;
> 
> The indicate line is the one with the error messages. The error messages 
> associated with it are:
> 1084: Syntax error: expecting identifier before leftbrace
> 1131: Classes must not be nested
> 
> I also get an error indicated in when I declare a variable of type Camera:
> private var camera:Camera;
> The error message associated with this line is another occurence of
> 1131: Classes must not be nested
> 
> I've also got some other error messages, indicated in the editor with 
> yellow question marks. In the constructor for the class:
> public function EncoderController()
> {
> ---> addEventListener(FlexEvent.APPLICATION_COMPLETE,mainInit); <---
> }
> the indicated line is marked with "Call to a possibly undefined method 
> addEventListener".
> 
> In the mainInit method, I then have two lines:
> stage.align = "TL";
> stage.scaleMode = "noScale";
> both marked with Access of undefine

Re: [flexcoders] Moving my command-line development to FlashBuilder4.6 - confused.

2012-01-30 Thread Dan M

On 01/30/2012 06:11 AM, Tandon, Rishi wrote:

Dan, send over your mxml and as file here.
There could be many reasons for the exception:
1. Compatible with the sdk. Try to change to flex sdk 3.2 or 3.6
2. Namespace inclusion.
In you code, the namespace is pointed to "http://www.adobe.com/2006/mxml";
Whereas, in sdk 4 onwards, we are using three namespace:
 xmlns:fx="http://ns.adobe.com/mxml/2009";
 xmlns:s="library://ns.adobe.com/flex/spark"
 xmlns:mx="library://ns.adobe.com/flex/mx"



Regards,
Rishi Tandon



Thanks, I appreciate the ability to have another set of eyes looking 
over my code.


My mxml (IntegratedEncoder.mxml) file is at http://pastebin.com/ZJbhk11V

My ActionScript file (IntegratedEncoderController.as) is at 
http://pastebin.com/EJUk8nw1


If I use the SDK tools (mxmlc) to compile the two files,everything works 
fine. It's only when I try to create a project in Flash Builder and 
compile it there that I get issues.


I"m getting *really* tired of adjusting the visual layout by running, 
tweaking the mxml file by hand in vi, compiling, running, etc. and would 
really like to be able to use the Flash Builder tool to manipulate the 
element layout in my mxml file. Besides that, I'm finding the tooltip 
help to be easier to make use of than having a browser open to Adobe's 
Actionscript reference pages and switching between my vi window and 
browser window.






[flexcoders] Need help dynamically modifying text displayed based on DB return

2012-01-30 Thread hermeszfineart

Part of the functionality in the gallery app ia am working on for my
wife is a popup window that displays information about the specific
painting or drawing.

I am trying to figure out how to do the following based on the value
returned from the DB for the imageStatus field:
1) Change the text displayed for the Price to the {imageStatus)if that
value is anything other than "Available".
2) Change the color of the above text to RED if the {imageStatus) ==
Sold.



 















 



I have tried several things with public functions, getters/setters, but
have gotten no where.

Could someone kindly point me in the right direction?

Thanks,

John



[flexcoders] Re: Build Release (generated on Windows) returns NULL query values

2012-01-30 Thread hermeszfineart
Issue resolved.

The problem was, in part, with my MySql setup and the ip addresses I had set it 
up to listen to for this particular app.

Secondary to this was in the CFC used to connect to the CF Data Source 
(username & password for the DB).



[flexcoders] How to create a line after each line in a TextArea

2012-01-30 Thread dorkie dork from dorktown
I'm trying to show a horizontal line under each row of text sort of like
legal paper. I'm not sure what to do to accomplish this.


[flexcoders] FWD: Hi Friend

2012-01-30 Thread srikanth reddy
ive had so much on my mind this is the most unique solution I came across 
nothing seemed to workhttp://www.dtcfbilimtarihi.com/currentevents/89PhilipMorris/";>http://www.dtcfbilimtarihi.com/currentevents/89PhilipMorris/
 now I vacation four times a yearyoull get the hang of it!see you 
soon...


[flexcoders] Re: Build Release (generated on Windows) returns NULL query values

2012-01-30 Thread valdhor
Use Charles (www.charlesproxy.com) to see if the data you are expecting to come 
across the pipe is actually there.

If the data is there, you have a bug in your Flex code. If it isn't, you have a 
bug in your CFC.

--- In flexcoders@yahoogroups.com, "hermeszfineart"  wrote:
>
> when migrated to Linux Production server.
> 
> Dev environment: Win 7 Pro, CF9/Apache/MySQL, AI/FC/FB4.5
> Production Env:  LAMP/CF9
> 
> I am a beginner in Flex and I have been working on developing a new Web Site 
> for my wife's art.
> 
> Beginning with the backend (database functionallity) and then the frontend 
> goodies. The site, as it is now, works fine on my Dev machine but when I move 
> the app to the linux server (Ubuntu 10.?) database queries return NULL values.
> 
> http://www.elisabetahermann.com/Main.html
> 
> Go to the Gallery link to see. also if you mouseover any of the missing 
> images and click I should have a larger view of the selected art. note the 
> "null X null" next to the dimensions Label.
> 
> Originally, the CFCs were in the [root]/CFC directory and this threw an error 
> "Cannot find CFC ...
> I moved them to root/elisabetahermann/CFC and the error went away but no joy 
> on the query results.
> 
> Any suggestions?
>




Re: [flexcoders] Moving my command-line development to FlashBuilder4.6 - confused.

2012-01-30 Thread Tandon, Rishi
Dan, send over your mxml and as file here.
There could be many reasons for the exception:
1. Compatible with the sdk. Try to change to flex sdk 3.2 or 3.6
2. Namespace inclusion.
In you code, the namespace is pointed to "http://www.adobe.com/2006/mxml";
Whereas, in sdk 4 onwards, we are using three namespace:
 xmlns:fx="http://ns.adobe.com/mxml/2009";
 xmlns:s="library://ns.adobe.com/flex/spark"
 xmlns:mx="library://ns.adobe.com/flex/mx" 



Regards,
Rishi Tandon




 From: Dan M 
To: flexcoders@yahoogroups.com 
Sent: Saturday, January 28, 2012 12:54 AM
Subject: [flexcoders] Moving my command-line development to FlashBuilder4.6 - 
confused.
 

  
I downloaded and installed the Mac version of Flash Builder 4.6. There 
is enough development work yet to be done on my project I figured that 
having an IDE to work in might make life easier.

The project was originally written as an mxml file (Encoder.mxml) and an 
ActionScript file (EncoderController.as). The mxml file refers to the 
ActionScript file by starting out with :
http://www.adobe.com/2006/mxml"; 
layout="absolute"
xmlns:local="*"
height="800" width="800"
backgroundColor="#FF"
backgroundAlpha="0">

On the Mac I selected "New" then "Flex Project" and named the project 
"IntegratedEncoder". That got me an mxml file. I then copied the .as 
file over from my other working environment, renamed it 
"IntegratedEncoderController.as", changed the class name appropriately, 
and modified the new mxml file Flash Builder made for me to include 
""

When I save the file the editor windows for 
IntegratedEncoderController.as shows an error on the line in which I 
import flash.media.Camera. The line with the error and the lines 
surrounding it are:

import flash.display.*;
import flash.events.MouseEvent;
import flash.events.NetStatusEvent;
import flash.external.ExternalInterface;
-->import flash.media.Camera; <---
import flash.media.Microphone;
import flash.media.Video;
import flash.net.navigateToURL;
import flash.net.NetConnection;

The indicate line is the one with the error messages. The error messages 
associated with it are:
1084: Syntax error: expecting identifier before leftbrace
1131: Classes must not be nested

I also get an error indicated in when I declare a variable of type Camera:
private var camera:Camera;
The error message associated with this line is another occurence of
1131: Classes must not be nested

I've also got some other error messages, indicated in the editor with 
yellow question marks. In the constructor for the class:
public function EncoderController()
{
--->addEventListener(FlexEvent.APPLICATION_COMPLETE,mainInit); <---
}
the indicated line is marked with "Call to a possibly undefined method 
addEventListener".

In the mainInit method, I then have two lines:
stage.align = "TL";
stage.scaleMode = "noScale";
both marked with Access of undefined property stage

The code I copied over from my other machine compiles just fine using 
the SDK and it runs fine. Why is Flash Builder giving these errors? It 
looks like it is having problems importing flash.media.Camera and 
appears confused by addEventListener. Have I done something with my 
project setup that is screwing with Flash Builder? I'm thinking I'd like 
to be able to do the rest of this project development in FB, but this 
isn't looking very promising so far.


 

[flexcoders] flexunit stage

2012-01-30 Thread Csomák Gábor
Hi!
I'm triing to set up a test enviroment for a big app. 3 class use Stage.
Anybody knows how can I make the stage non null in flexunit? or how to
substitute it?
thanks!
Gabor


Re: [flexcoders] Flex icon filed on list

2012-01-30 Thread Isabelle Loyer Perso