Re: [flexcoders] Generating panels dynamically? How?

2010-02-22 Thread Fotis Chatzinikos
Depending on what you need to do you can use a repeater or a tilelist. Have
a look on google for some tutorials or post a bit more on what you need to
do ;-)

On Mon, Feb 22, 2010 at 3:53 AM, flexnewbie999
wgb.jobsearch@gmail.comwrote:



 I have a ArrayCollection of objects that contain an image and other fields.
 I need to dynamically created a panel for each image in succession as the
 collection is iterated over (at least that's the idea I've come up with). I
 can hard code each individual image via mxml into a panel but that doesn'
 suit my purposes as I never know how many items are in the collection. I've
 looked at itemRenderers but that doesn't seem to go since they only appear
 to work with grids and lists etc. I'm relatively new at this; is coding this
 type of thing the only solution to this problem or are there components I'm
 missing?

 Thanks!

  



[flexcoders] Webservice Random Faults

2010-02-22 Thread ArunKumar Madas
We have been encountering random SOAP Faults in our application. Definitely
something is going wrong.
We have a CF implementation for webservices (using coldspring) consumed by
the flex application.
The end users are randomly encountering Fault events. We are using FLEX SDK
3.5

Here are the details -

 faultCode = DecodingError
 faultString = SOAP Response cannot be decoded. Raw response: null
 faultDetail = null

The same webservice call works 99% of the time. Randomly we encounter some
faults.
I have gone through this URL http://www.judahfrangipane.com/blog/?p=87 and
some others with no resolution.

Monitoring the network SOAP packets using Fiddler, we get HTTP 200 OK
response without any error.
We enabled Flash Debug logging with all events to be logegd
into flashLog.txt and we found that the fault is generated internal to the
framework -

Here are the details -

2/17/2010 09:28:11.935 [INFO] mx.rpc.soap.Operation Creating SOAP Operation
for getCacheUpdates
2/17/2010 09:28:11.935 [DEBUG] mx.rpc.soap.Operation Invoking SOAP operation
getCacheUpdates
2/17/2010 09:28:11.935 [DEBUG] mx.rpc.soap.SOAPEncoder Encoding SOAP request
envelope
2/17/2010 09:28:11.945 [DEBUG] mx.rpc.soap.SOAPEncoder Encoding SOAP request
body
2/17/2010 09:28:11.945 [INFO] mx.messaging.Producer
'E62FB659-260E-FDD0-479B-DC8AAF12EE52' producer sending message
'FACB3D46-5745-E0B7-4F3C-DC8B26A9872C'
2/17/2010 09:28:11.945 [DEBUG] mx.messaging.Channel 'direct_http_channel'
channel sending message:
(mx.messaging.messages::SOAPMessage)#0
  body = SOAP-ENV:Envelope xmlns:SOAP-ENV=
http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=
http://www.w3.org/2001/XMLSchema; xmlns:xsi=
http://www.w3.org/2001/XMLSchema-instance;
  SOAP-ENV:Body SOAP-ENV:encodingStyle=
http://schemas.xmlsoap.org/soap/encoding/;
intf:getCacheUpdates xmlns:intf=http://webservices.com.webservices;
  adex xsi:type=xsd:stringlt;adexgt;
  lt;headergt;
lt;statusgt;truelt;/statusgt;
lt;operatorToken/gt;
lt;terminalToken/gt;
  lt;/headergt;
  lt;bodygt;
lt;data name=cacheStatus
dataType=objectgt;lt;![CDATA[{park:02/16/2010 06:02:07
PM,parkPass:01/01/2000 12:00:00 AM,country:02/16/2010 06:02:07
PM,site:02/16/2010 06:02:07 PM,loop:02/16/2010 06:02:07
PM,ticketType:02/16/2010 06:02:07 PM,discount:02/16/2010 06:02:07
PM,location:02/16/2010 06:02:07 PM,equipment:02/16/2010 06:02:07
PM,campground:02/17/2010 09:28:11 AM,asset:01/01/2000 12:00:00
AM,state:02/16/2010 06:02:07 PM,retail:02/16/2010 06:02:07
PM}]]gt;lt;/datagt;
lt;data name=parkId
dataType=numericgt;lt;![CDATA[511]]gt;lt;/datagt;
lt;data name=locationId
dataType=numericgt;lt;![CDATA[6558]]gt;lt;/datagt;
  lt;/bodygt;
lt;/adexgt;/adex
/intf:getCacheUpdates
  /SOAP-ENV:Body
/SOAP-ENV:Envelope
  clientId = DirectHTTPChannel0
  contentType = text/xml; charset=utf-8
  destination = DefaultHTTP
  headers = (Object)#1
  httpHeaders = (Object)#2
SOAPAction = 
  messageId = FACB3D46-5745-E0B7-4F3C-DC8B26A9872C
  method = POST
  recordHeaders = false
  timestamp = 0
  timeToLive = 0
  url = http://xyz/webservices/com/webservices/CachingWebServices.cfc;
2/17/2010 09:28:12.505 [INFO] mx.messaging.Producer
'E62FB659-260E-FDD0-479B-DC8AAF12EE52' producer acknowledge of
'FACB3D46-5745-E0B7-4F3C-DC8B26A9872C'.
*2/17/2010 09:28:12.505 [ERROR] mx.messaging.Producer
'E62FB659-260E-FDD0-479B-DC8AAF12EE52' producer fault for
'FACB3D46-5745-E0B7-4F3C-DC8B26A9872C'.*
**
*Its actually getting generated from Line 710 of
mx.messaging.MessageAgent.as*
**
**
*Here is the RAW Response in the fiddler (HTTP 200 OK)*

HTTP/1.1 200 OK
Connection: close
Date: Wed, 17 Feb 2010 15:22:46 GMT
Content-Type: text/xml; charset=utf-8
Server: Microsoft-IIS/6.0
PICS-Label: (PICS-1.0 http://www.rsac.org/ratingsv01.html; l on
2009.11.13T12:51-0600 exp 2015.11.13T12:00-0600 r (v 0 s 0 n 0 l 0))
X-Powered-By: ASP.NET
Vary: Accept-Encoding
Set-Cookie: Coyote-2-a0305b5=a030548:0; path=/
Content-Length: 1345

?xml version=1.0 encoding=utf-8?soapenv:Envelope xmlns:soapenv=
http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=
http://www.w3.org/2001/XMLSchema; xmlns:xsi=
http://www.w3.org/2001/XMLSchema-instance;
 soapenv:Body
  ns1:getCacheUpdatesResponse soapenv:encodingStyle=
http://schemas.xmlsoap.org/soap/encoding/; xmlns:ns1=
http://webservices.com.webservices;
   getCacheUpdatesReturn xsi:type=soapenc:string xmlns:soapenc=
http://schemas.xmlsoap.org/soap/encoding/;lt;?xmlhttp://schemas.xmlsoap.org/soap/encoding/%22%3Elt;?xmlversion=quot;1.0quot;
encoding=quot;UTF-8quot;?gt;
lt;adexgt;lt;headergt;lt;statusgt;truelt;/statusgt;lt;operatorTokengt;lt;/operatorTokengt;lt;terminalTokengt;lt;/terminalTokengt;lt;/headergt;lt;bodygt;lt;data
datatype=quot;queryquot;

Re: [flexcoders] how to implement bread crumbs in flex application

2010-02-22 Thread Andriy Panas
Hi all,

Here is the sample of one possible implementation of breadcumb navigation in
Flex 3:
http://www.smashedapples.com/2008/06/flex-breadcrumb.html

--
Best regards,
Andriy Panas



On 21 February 2010 01:50, talluri venkat talluri_venkat2...@yahoo.comwrote:



 Hi Satish,

 Do you have for flex breadcrumb. Please send me the code.

 If any one have flex breadcrumb working application. please let me know.

 Regards,
 Venkat

 --- On *Mon, 16/11/09, Satish Chowdary chinnu_...@yahoo.co.in* wrote:


 From: Satish Chowdary chinnu_...@yahoo.co.in
 Subject: [flexcoders] how to implement bread crumbs in flex application
 To: flexcoders flexcoders@yahoogroups.com
 Date: Monday, 16 November, 2009, 7:12 AM




 Hey Coders,

 give me a idea about how  to implement breadcrumbs in flex application

 Thanks inAdvance
 సతీష్

 --
 The INTERNET now has a personality. YOURS! See your Yahoo! 
 Homepagehttp://in.rd.yahoo.com/tagline_yyi_1/*http://in.yahoo.com/.



 --
 The INTERNET now has a personality. YOURS! See your Yahoo! 
 Homepagehttp://in.rd.yahoo.com/tagline_yyi_1/*http://in.yahoo.com/
 .

  



Re: [flexcoders] Strategies for switching between testing and deployment addresses

2010-02-22 Thread Peeyush Tuli
you can always read the ip address from an  xml file at application startup
and bind your service to it..

On Mon, Feb 22, 2010 at 6:30 AM, David Adams dpad...@gmail.com wrote:



 I've been writing some small programs that use HTTPService calls to
 fetch data from a back-end. During testing, I'm using 127.0.0.1 or an
 IP address on my subnet. When I deploy, I update the IP address in
 service definitions to the right external address and build the app.
 Or at least I mean to. It's all too easy to accidentally change the
 addresses for internal testing and then forget to switch them back
 before building.

 Is there a best practice or simple strategy for putting the IP address
 somewhere outside of the source code that it can easily be edited
 without a rebuild?

 Thanks for any advice.
  



Re: [flexcoders] SQL Question

2010-02-22 Thread Tim Romano
Hard to know for sure from the way you've put the question, but the IN 
lists seem malformed to me.


Correct:
IN (a, b, c)

Incorrect:
 (a, b, c)

Regards
Tim Romano




On 2/20/2010 6:04 PM, Wally Kolcz wrote:


I know this is out of the core topic, but I am banging my head on this
simple issue..or probably is...

I am trying to write a SQL query (in ColdFusion) for my database (MySQL
5) when I am looking for a passed in argument value in the column (which
is set as a varchar).

I am passing in '0' for the ageGroup and 'kids' for the accountType I
have 'kids'

My Query is:

Select CONCAT(roomDisplay, (National)) as roomDisplay,
CONCAT(cfqueryparam value=#arguments.ageGroup#,
-, roomDisplay, -, National) as roomID
FROM chatrooms
WHERE cfqueryparam value=#arguments.accountType# IN
(accountType)
AND cfqueryparam value=#arguments.ageGroup#
cfsqltype=cf_sql_integer / IN (ageGroups)
ORDER BY roomDisplay ASC

I have a record where 'ageGroups' is '0, 1, 2, 3, 4, 5, 6, 7, 8' and the
'accountType' is 'kids, siblings, parents'

I keep getting 0 returns but I know both values exist in at least 1 record

What am I doing wrong?





No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.435 / Virus Database: 271.1.1/2702 - Release Date: 02/21/10 
19:34:00

   




Re: [flexcoders] Generating panels dynamically? How?

2010-02-22 Thread Darrin Kay
I just built a carousel and had a lot of these issues, now the data for this
is comeing from an XML file, but that should not matter.  You can not make a
panel backgroundImage dynamic, instead add a image to the panel like I did
below.


mx:Repeater id=imageRepeater dataProvider={imageData.lastResult.panel}

mx:Panel id=MainPanel xmlns:mx=http://www.adobe.com/2006/mxml; layout=
absolute fontFamily=gunPlayCSS fontWeight=bold

title={imageRepeater.currentItem.title} width=450 height=253
themeColor=#C4BA88 borderColor=#C4BA88 headerColors=#C4BA88

roundedBottomCorners=true cornerRadius=15 horizontalScrollPolicy=off
verticalScrollPolicy=off

mx:Image id=backgroundImage source={imageRepeater.currentItem.background
} /

mx:Text id=panelSub x=109 y=24 width=316 height=33 htmlText={
imageRepeater.currentItem.sub} fontFamily=gunPlayCSS fontSize=20/

mx:TextArea id=panelBody editable=false alpha=0 x=109 y=56
width=316 height=141 text={imageRepeater.currentItem.body}
fontFamily=gunPlayCSS fontSize=15 textAlign=center themeColor=#C4BA88
/

mx:Text text={imageRepeater.currentItem.linkText} click={navigateToURL(*
new* URLRequest(event.currentTarget.getRepeaterItem().link), *'_self'*);}
x=109 y=195 fontFamily=gunPlayCSS fontSize=14 height=22 color=
#2034F6 width=216/

/mx:Panel

/mx:Repeater


On Mon, Feb 22, 2010 at 1:53 AM, flexnewbie999
wgb.jobsearch@gmail.comwrote:



 I have a ArrayCollection of objects that contain an image and other fields.
 I need to dynamically created a panel for each image in succession as the
 collection is iterated over (at least that's the idea I've come up with). I
 can hard code each individual image via mxml into a panel but that doesn'
 suit my purposes as I never know how many items are in the collection. I've
 looked at itemRenderers but that doesn't seem to go since they only appear
 to work with grids and lists etc. I'm relatively new at this; is coding this
 type of thing the only solution to this problem or are there components I'm
 missing?

 Thanks!

 



[flexcoders] Dynamically naming classes

2010-02-22 Thread Wally Kolcz
I am using Ruben Swieringa's flip book 
(http://www.rubenswieringa.com/blog/flex-book-component-beta) to create 
a journal for a project which has a Book class and Page Class and a 
really cool goToPage() method. I am using a loop to add Pages based on 
an ArrayCollection record (dateAdded) and would like to name the Page 
instance the rendered version of the date. Problem is I cannot find 
anywhere to name the class based on a dynamical element. I googled all 
around for it, but haven't come up with a working solution in the Flex 
enviornment. I want to do something like this:

[Bindable] public var entries:ArrayCollection;
...
 public function buildBook():void {
 for (var i:int = 0; i  entries.length; i ++){
 var entries.getItemAt(i).dateAdded:Page = new Page();
 ...Add content, define styles, etc...
 myBook.addChild(e.getItemAt(i).dateAdded);
 }
}

The end result would be a page with the id of 21220100345 and I can do 
the flip to it using the .goToPage(21220100345)



[flexcoders] Re: Flex doesn't appear to be using my services-config.xml file...

2010-02-22 Thread valdhor
You can either point Flex at the servces-config.xml file on the server (If you 
have file access to the server) or create two servces-config.xml files - one on 
the server and one in the src directory within Flex. You would need a Compiler 
directive that points at this local file (-locale en_US -services 
services-config.xml). Then you just keep both files synchronized.

This is how you would do it if you were using a hosting company. In my case it 
is a local intranet and my server is a Linux box. I don't have local file 
access to the server.

--- In flexcoders@yahoogroups.com, Laurence lmacne...@... wrote:

 You say within Flex.  Where, exactly?  I thought the only place 
 services-config.XML was supposed to be was in the WEB-INF folder?
 
 So maybe that's my problem -- Flex is looking for servces-config.xml 
 somewhere else.  But I did a search and it doesn't appear anywhere but in 
 WEB-INF...  So where should it be?
 
 Thanks,
 L.
 
 
 --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote:
 
  I don't know whether it is the same in ColdFusion or not but in my case 
  with WebORB I have to have the destination set in the services-config.xml 
  file in the WEB-INF directory on the server as well as within Flex.
  
  --- In flexcoders@yahoogroups.com, Laurence LMacNeill@ wrote:
  
   I've added a secure channel to my services-config.xml file, yet Flex 
   tells me the channel doesn't exist when I try to use it.  No Security 
   Sandbox errors or anything -- just Destination 'SecureColdFusion' either 
   does not exist or the destination has no channels defined
   
   But it does exist, and the channel is defined:
 destination id=SecureColdFusion
 channels
 channel ref=my-cfamf-secure/
 /channels
 properties
 source*/source
 /properties
 /destination
   
   channel-definition id=my-cfamf-secure 
   class=mx.messaging.channels.SecureAMFChannel
   endpoint 
   uri=https://{server.name}:{server.port}{context.root}/flex2gateway/cfamfsecure;
class=coldfusion.flash.messaging.SecureCFAMFEndPoint/
   properties
   polling-enabledfalse/polling-enabled
 
   add-no-cache-headersfalse/add-no-cache-headers
 serialization
 
   enable-small-messagesfalse/enable-small-messages
 /serialization
 coldfusion
 !-- define the resolution rules and access 
   level of the cfc being invoked --
 access
 !-- Use the ColdFusion 
   mappings to find CFCs--
 
   use-mappingstrue/use-mappings
 !-- allow public and remote 
   or just remote methods to be invoked --
 
   method-access-levelremote/method-access-level
 /access
   
 !-- Whether the Value Object CFC has 
   getters and setters. Set the value of use-accessors to true if there are 
   getters and setters in the Value Object CFC. --
 use-accessorstrue/use-accessors
 !--Set the value of use-structs to 
   true if you don't require any translation of ActionScript to CFCs. The 
   assembler can still return structures to Flex, even if the value is 
   false. The default value is false.--
 use-structsfalse/use-structs
 
 property-case
   !-- cfc property names --
   force-cfc-lowercasefalse/force-cfc-lowercase
   !-- Query column names --
   
   force-query-lowercasefalse/force-query-lowercase
   !-- struct keys --
   
   force-struct-lowercasefalse/force-struct-lowercase
   /property-case
 /coldfusion
   /properties
   /channel-definition
  
   So why is Flex telling me this destination has no defined channels?
  
 





[flexcoders] Re: Compile Error Under 3.5a but not 3.4

2010-02-22 Thread mcaplan_labnet
Hi Dmitri,

Thanks for pointing out that JIRA bug.  I haven't spent any time in design view 
to know if that is effecting me as well.

FYI, I went through the process of renaming my modules (with the understanding 
that the name of the module was my issue) in 3.5a.  No luck.  It seems that I 
could rename my modules to mud, and I wouldn't make a difference:

  Encountered errors or warnings while building project ManagerAlloys.mxml.
ManagerAlloys.mxml: Invalid component name 'modules.ManagerAlloys': 
component name must be legal ActionScript class name.
  Encountered errors or warnings while building project LabCase.mxml.
LabCase.mxml: Invalid component name 'modules.LabCase': component name must 
be legal ActionScript class name.


What I did figure out is the the compiler was chocking on a wildcard import:

  import modules.LabCase.*;

Where changing that to multiple individual import statements did the trick.

Seems like a bug.  I'll go JIRA hunting.

Thanks,

Mike




--- In flexcoders@yahoogroups.com, mitek17 mite...@... wrote:

 Seems like Adobe screwed up namespaces in 3.5
 
 Here is the bug I filed in regards to DesignView not understanding mx 
 namespace for components.
 https://bugs.adobe.com/jira/browse/FB-25994
 
 
 I wonder if *anyone* uses 3.5 SDK. I did 3 attempts to migrate from 3.4 and 
 they all failed.
 
 PS Probably Adobe needs more spanking from Steve Jobs :)
 
 Cheers,
 Dmitri.
 
 
 --- In flexcoders@yahoogroups.com, mcaplan_labnet mcaplan@ wrote:
 
  Hi There,
  
  I'm unsure what is going on, but I can't compile my project under 3.5.  
  Works fine under 3.4.  I get the following errors in 3.5:
  
  Encountered errors or warnings while building project Alloys.mxml.
  Alloys.mxml: Invalid component name 'modules.Alloys': component name 
  must be legal ActionScript class name.
  Encountered errors or warnings while building project Case.mxml.
  Case.mxml: Invalid component name 'modules.Case': component name must 
  be legal ActionScript class name.
  
  
  Any ideas?
  
  Thanks,
  
  Mike
 





Re: [flexcoders] Flex Builder build and search functions die on Vista

2010-02-22 Thread Tom McNeer
Hi,

First, let me apologize for the long delay in replying. Thank you, Peeyush
and Lee, for offering your help.

Lee,

In my case, the only linked libraries are pre-compiled .swcs, not projects
within the workspace. So I don't guess our problems are the same. Thank you,
though.

Peeyush,

All the linkages within each project are strictly to files within the
project, except of course for the linkage to the compiler.

As far as the possibility of some corruption in the workspace goes, you may
well be right; I just haven't had a chance to test it. I'll do so today and
report back. Thank you for your help.



-- 
Thanks,

Tom

Tom McNeer
MediumCool
http://www.mediumcool.com
1735 Johnson Road NE
Atlanta, GA 30306
404.589.0560


[flexcoders] vote for webservice bug

2010-02-22 Thread Peeyush Tuli
Has anybody else encountered this issue before?

http://bugs.adobe.com/jira/browse/SDK-25568

If yes, request you to vote for it so that it can get a priority to get
fixed. Any workarounds are welcome as this is kind of critical for our
project.

~Peeyush
http://www.mds.asia


Re: [flexcoders] Dynamically naming classes

2010-02-22 Thread claudiu ursica
When you iterate you can assign an id of item_ and the current iterated item. 
I haven't used the component but I'm sure you can assign that id somehow to the 
page.
C






From: Wally Kolcz wko...@isavepets.com
To: flexcoders@yahoogroups.com
Sent: Mon, February 22, 2010 4:14:43 PM
Subject: [flexcoders] Dynamically naming classes

   
I am using Ruben Swieringa's flip book 
(http://www.rubenswieringa.com/blog/flex-book-component-beta) to create 
a journal for a project which has a Book class and Page Class and a 
really cool goToPage() method. I am using a loop to add Pages based on 
an ArrayCollection record (dateAdded) and would like to name the Page 
instance the rendered version of the date. Problem is I cannot find 
anywhere to name the class based on a dynamical element. I googled all 
around for it, but haven't come up with a working solution in the Flex 
enviornment. I want to do something like this:

[Bindable] public var entries:ArrayCollec tion;
...
public function buildBook(): void {
for (var i:int = 0; i  entries.length; i ++){
var entries.getItemAt( i).dateAdded: Page = new Page();
...Add content, define styles, etc...
myBook.addChild( e.getItemAt( i).dateAdded) ;
}
}

The end result would be a page with the id of 21220100345 and I can do 
the flip to it using the .goToPage(212201003 45)


 


  

[flexcoders] Re: Modify context menu of TextArea

2010-02-22 Thread valdhor
Is there any specific reason you are replying to threads that are over a year 
old?

--- In flexcoders@yahoogroups.com, jaywood58 jayw...@... wrote:

 Here is a very simple example in MXML:
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute 
 contextMenu={cm}
   creationComplete=init()
   mx:TextArea id=myTA x=10 y=10 width=200 height=100/ 
   mx:Script
 ![CDATA[
 import flash.events.ContextMenuEvent;
 import flash.ui.ContextMenu;
 import flash.ui.ContextMenuItem;
 import mx.controls.Alert;
   
 [Bindable] private var cm:ContextMenu;
 private var labels:Array = [red,green,blue];
 
 private function init():void {
   cm = new ContextMenu();
   cm.addEventListener(ContextMenuEvent.MENU_SELECT,onMenuSelect);
 }
   
 private function onMenuSelect(event:ContextMenuEvent):void {
   cm.customItems = [];
   for each (var label:String in labels) {
 var item:ContextMenuItem = new ContextMenuItem(label);
 item.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, 
   onMenuItemSelect);
 cm.customItems.push(item);
   }
 }
 
 private function onMenuItemSelect(event:ContextMenuEvent):void {
   var item:ContextMenuItem = 
event.currentTarget as ContextMenuItem;
   Alert.show(item.caption);
 }
 ]]
   /mx:Script
 /mx:Application
 
 
 --- In flexcoders@yahoogroups.com, Alex Harui aharui@ wrote:
 
  I'm pretty sure you can't alter the context menu for a TextArea unless you 
  set both editable=false and selectable=false which sort of defeats its 
  utility
  
  From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
  Behalf Of cesarerocchi
  Sent: Saturday, November 22, 2008 6:30 AM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] Modify context menu of TextArea
  
  
  Hi,
  
  I am trying to modify the contextMenu which appears when I right-click a 
  TextArea.
  Can I do it? How?
  
  Thanks in advance,
  
  -c.
 





Re: [flexcoders] Re: Compile Error Under 3.5a but not 3.4

2010-02-22 Thread Peeyush Tuli
That is definitely not a bug in 3.5a. I have been using 3.5 for the past
week without any such issues. But I have been having this problem on and off
for around 3 years since flex builder 2. As far as I can recall, recreating
your workspace in  different location might be helpful since FB does a lot
of caching in the workspace folders which might interfere with your sdk
upgrade.

On Mon, Feb 22, 2010 at 8:08 AM, mitek17 mite...@gmail.com wrote:



 Seems like Adobe screwed up namespaces in 3.5

 Here is the bug I filed in regards to DesignView not understanding mx
 namespace for components.
 https://bugs.adobe.com/jira/browse/FB-25994

 I wonder if *anyone* uses 3.5 SDK. I did 3 attempts to migrate from 3.4 and
 they all failed.

 PS Probably Adobe needs more spanking from Steve Jobs :)

 Cheers,
 Dmitri.


 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 mcaplan_labnet mcap...@... wrote:
 
  Hi There,
 
  I'm unsure what is going on, but I can't compile my project under 3.5.
 Works fine under 3.4. I get the following errors in 3.5:
 
  Encountered errors or warnings while building project Alloys.mxml.
  Alloys.mxml: Invalid component name 'modules.Alloys': component name must
 be legal ActionScript class name.
  Encountered errors or warnings while building project Case.mxml.
  Case.mxml: Invalid component name 'modules.Case': component name must be
 legal ActionScript class name.
 
 
  Any ideas?
 
  Thanks,
 
  Mike
 

  



[flexcoders] Printing in Flex...

2010-02-22 Thread Laurence
1) Is there any way to control what printer a print job goes to?  Or will it 
always go to the default printer?

2) Is there any way to configure it so that the browser's Print window 
doesn't come up?  You know the one where you get to choose which printer you 
want to print to, and have to click OK to get it to print.

Thanks for any info you can provide,
Laurence MacNeill
Mableton, Georgia, USA




Re: [flexcoders] Dynamically naming classes

2010-02-22 Thread Wally Kolcz
I dont need the interation. I need the value of the record as the Class 
instance name (id). For example. Using the code example I sent I would 
need the first recond to be:


var 2202101034523:Page = new Page();

That would be 2/20/2010 at 3:45am (example). I can do the conversion but 
have no idea on how to assign that ID in AS. Can I have a holder 
variable such as:


..in the loop..
var date:String = df.format(entries.getItemAt(i).dateAdded).toString();
var date:Page = new Page();

On 2/22/2010 9:45 AM, claudiu ursica wrote:
When you iterate you can assign an id of item_ and the current 
iterated item. I haven't used the component but I'm sure you can 
assign that id somehow to the page.

C



*From:* Wally Kolcz wko...@isavepets.com
*To:* flexcoders@yahoogroups.com
*Sent:* Mon, February 22, 2010 4:14:43 PM
*Subject:* [flexcoders] Dynamically naming classes

I am using Ruben Swieringa's flip book
(http://www.rubenswieringa.com/blog/flex-book-component-beta 
http://www.rubenswieringa.com/blog/flex-book-component-beta) to create

a journal for a project which has a Book class and Page Class and a
really cool goToPage() method. I am using a loop to add Pages based on
an ArrayCollection record (dateAdded) and would like to name the Page
instance the rendered version of the date. Problem is I cannot find
anywhere to name the class based on a dynamical element. I googled all
around for it, but haven't come up with a working solution in the Flex
enviornment. I want to do something like this:

[Bindable] public var entries:ArrayCollec tion;
...
public function buildBook(): void {
for (var i:int = 0; i  entries.length; i ++){
var entries.getItemAt( i).dateAdded: Page = new Page();
...Add content, define styles, etc...
myBook.addChild( e.getItemAt( i).dateAdded) ;
}
}

The end result would be a page with the id of 21220100345 and I can do
the flip to it using the .goToPage(212201003 45)







[flexcoders] Re: Security issues SOLVED. (Mostly...)

2010-02-22 Thread valdhor



From the Adobe Help files:
==
Each allow-access-from tag also has the optional secure attribute, which 
defaults to true. You can set the attribute to false if your policy file is on 
an HTTPS server, and you want to allow SWF files on a non-HTTPS server to load 
data from the HTTPS server.

Setting the secure attribute to false could compromise the security offered by 
HTTPS. In particular, setting this attribute to false opens secure content to 
snooping and spoofing attacks. Adobe strongly recommends that you not set the 
secure attribute to false.

If data to be loaded is on a HTTPS server, but the SWF file loading it is on an 
HTTP server, Adobe recommends that you move the loading SWF file to an HTTPS 
server so that you can keep all copies of your secure data under the protection 
of HTTPS.
==

If I needed secure access, I would move everything over to https.

The only other thing I could suggest is to use encryption. Check out AS3Crypto 
(http://code.google.com/p/as3crypto/). Of course, if you serve the SWF over 
HTTP, someone could analyze the SWF and find the encryption key. Again, for 
security reasons, I would move everything over to https.

--- In flexcoders@yahoogroups.com, Laurence lmacne...@... wrote:

 So, here's my crossdomain.xml in its final form:
 
 cross-domain-policy
   site-control permitted-cross-domain-policies=master-only /
 
   allow-http-request-headers-from domain=www.mydomain.com headers=* 
 secure=false/
   allow-access-from domain=www.mydomain.com secure=false /
 
 /cross-domain-policy
 
 This allows all the stuff on the SecureColdFusion channel I created to work 
 just fine, as long as I access the site from mydomain.com and not from 
 localhost or myserver01 (its NetBIOS name).
 
 Even if I put allow-access-from domain=localhost/ (or 
 domain=myserver01/) in there, it still won't allow access from localhost 
 (or myserver01), because the security certificate is issued to mydomain.com 
 -- the names don't match, so the browser/Flash/CF rejects it.  (I don't know 
 exactly which one is rejecting it, but somewhere along the line it's being 
 rejected because of the name-mismatch.)
 
 The only way that I can see to change that behavior is to create two more 
 virtual websites that point to the same location, and give each of those 
 virtual sites their own certificate (one assigned to myserver01 and one 
 assigned to localhost.  Otherwise, I can't access the app on my local 
 server if the Internet goes down.  Yuck.  (If anyone knows a better way, I'm 
 all ears.)
 
 The one thing that still bothers me about this setup is the 'secure=false' 
 tags.  I cannot get a straight answer as to exactly what this does to my 
 security.  It enables http .SWFs to access https data, sure.  But does that 
 mean it's disabling all https when it does that?  Or does it mean that it is 
 secure during transit over the Internet, but not when it's being held in the 
 Flex app?  Or does it mean something entirely different?  There is no site 
 that has a direct answer to this -- they all just say it's not recommended 
 due to security issues, or something along those lines.  But they don't 
 specify WHAT security issues there are.  I need to know -- I can't serve my 
 entire app over an https connection because it'll be too slow, but I must 
 have secure access to some of the data...
 
 So if anyone can answer the 'secure=false' question specifically, I would 
 be very grateful.
 
 Thanks,
 L.





[flexcoders] Re: Generating panels dynamically? How?

2010-02-22 Thread valdhor
I find the best way to do this is to create a custom component (In your
case a panel) and then use an MXML repeater with the data source set as
the ArrayCollection. You would create public propertie(s) in your custom
component to receive each of the items in your ArrayCollection.
Something like:

mx:Repeater id=imagePanelRepeater
dataProvider={imagesArrayCollection}
 CutomComponents:ImagePanel
theImageData={imagePanelRepeater.currentItem}/
/mx:Repeater



--- In flexcoders@yahoogroups.com, flexnewbie999
wgb.jobsearch@... wrote:

 I have a ArrayCollection of objects that contain an image and other
fields. I need to dynamically created a panel for each image in
succession as the collection is iterated over (at least that's the idea
I've come up with). I can hard code each individual image via mxml into
a panel but that doesn' suit my purposes as I never know how many items
are in the collection. I've looked at itemRenderers but that doesn't
seem to go since they only appear to work with grids and lists etc. I'm
relatively new at this; is coding this type of thing the only solution
to this problem or are there components I'm missing?

 Thanks!




[flexcoders] Re: Generating panels dynamically? How?

2010-02-22 Thread flexnewbie999
I'll try the repeater. It takes a datasource, which I have a handle on. Thanks 
everyone!

--- In flexcoders@yahoogroups.com, Darrin Kay dar...@... wrote:

 I just built a carousel and had a lot of these issues, now the data for this
 is comeing from an XML file, but that should not matter.  You can not make a
 panel backgroundImage dynamic, instead add a image to the panel like I did
 below.
 
 
 mx:Repeater id=imageRepeater dataProvider={imageData.lastResult.panel}
 
 mx:Panel id=MainPanel xmlns:mx=http://www.adobe.com/2006/mxml; layout=
 absolute fontFamily=gunPlayCSS fontWeight=bold
 
 title={imageRepeater.currentItem.title} width=450 height=253
 themeColor=#C4BA88 borderColor=#C4BA88 headerColors=#C4BA88
 
 roundedBottomCorners=true cornerRadius=15 horizontalScrollPolicy=off
 verticalScrollPolicy=off
 
 mx:Image id=backgroundImage source={imageRepeater.currentItem.background
 } /
 
 mx:Text id=panelSub x=109 y=24 width=316 height=33 htmlText={
 imageRepeater.currentItem.sub} fontFamily=gunPlayCSS fontSize=20/
 
 mx:TextArea id=panelBody editable=false alpha=0 x=109 y=56
 width=316 height=141 text={imageRepeater.currentItem.body}
 fontFamily=gunPlayCSS fontSize=15 textAlign=center themeColor=#C4BA88
 /
 
 mx:Text text={imageRepeater.currentItem.linkText} click={navigateToURL(*
 new* URLRequest(event.currentTarget.getRepeaterItem().link), *'_self'*);}
 x=109 y=195 fontFamily=gunPlayCSS fontSize=14 height=22 color=
 #2034F6 width=216/
 
 /mx:Panel
 
 /mx:Repeater
 
 
 On Mon, Feb 22, 2010 at 1:53 AM, flexnewbie999
 wgb.jobsearch@...wrote:
 
 
 
  I have a ArrayCollection of objects that contain an image and other fields.
  I need to dynamically created a panel for each image in succession as the
  collection is iterated over (at least that's the idea I've come up with). I
  can hard code each individual image via mxml into a panel but that doesn'
  suit my purposes as I never know how many items are in the collection. I've
  looked at itemRenderers but that doesn't seem to go since they only appear
  to work with grids and lists etc. I'm relatively new at this; is coding this
  type of thing the only solution to this problem or are there components I'm
  missing?
 
  Thanks!
 
  
 





[flexcoders] Re: Webservice Random Faults

2010-02-22 Thread valdhor
I came across multiple problems using Flex's built-in SOAP decoder. Instead I 
created a SOAP client on my server that makes all the calls and then returns 
the data to Flex using AMF. This also gets around any cross domain issues. It 
works for me 100% of the time ;-}

--- In flexcoders@yahoogroups.com, ArunKumar Madas arun.fle...@... wrote:

 We have been encountering random SOAP Faults in our application. Definitely
 something is going wrong.
 We have a CF implementation for webservices (using coldspring) consumed by
 the flex application.
 The end users are randomly encountering Fault events. We are using FLEX SDK
 3.5
 
 Here are the details -
 
  faultCode = DecodingError
  faultString = SOAP Response cannot be decoded. Raw response: null
  faultDetail = null
 
 The same webservice call works 99% of the time. Randomly we encounter some
 faults.
 I have gone through this URL http://www.judahfrangipane.com/blog/?p=87 and
 some others with no resolution.
 
 Monitoring the network SOAP packets using Fiddler, we get HTTP 200 OK
 response without any error.
 We enabled Flash Debug logging with all events to be logegd
 into flashLog.txt and we found that the fault is generated internal to the
 framework -
 
 Here are the details -
 
 2/17/2010 09:28:11.935 [INFO] mx.rpc.soap.Operation Creating SOAP Operation
 for getCacheUpdates
 2/17/2010 09:28:11.935 [DEBUG] mx.rpc.soap.Operation Invoking SOAP operation
 getCacheUpdates
 2/17/2010 09:28:11.935 [DEBUG] mx.rpc.soap.SOAPEncoder Encoding SOAP request
 envelope
 2/17/2010 09:28:11.945 [DEBUG] mx.rpc.soap.SOAPEncoder Encoding SOAP request
 body
 2/17/2010 09:28:11.945 [INFO] mx.messaging.Producer
 'E62FB659-260E-FDD0-479B-DC8AAF12EE52' producer sending message
 'FACB3D46-5745-E0B7-4F3C-DC8B26A9872C'
 2/17/2010 09:28:11.945 [DEBUG] mx.messaging.Channel 'direct_http_channel'
 channel sending message:
 (mx.messaging.messages::SOAPMessage)#0
   body = SOAP-ENV:Envelope xmlns:SOAP-ENV=
 http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=
 http://www.w3.org/2001/XMLSchema; xmlns:xsi=
 http://www.w3.org/2001/XMLSchema-instance;
   SOAP-ENV:Body SOAP-ENV:encodingStyle=
 http://schemas.xmlsoap.org/soap/encoding/;
 intf:getCacheUpdates xmlns:intf=http://webservices.com.webservices;
   adex xsi:type=xsd:stringlt;adexgt;
   lt;headergt;
 lt;statusgt;truelt;/statusgt;
 lt;operatorToken/gt;
 lt;terminalToken/gt;
   lt;/headergt;
   lt;bodygt;
 lt;data name=cacheStatus
 dataType=objectgt;lt;![CDATA[{park:02/16/2010 06:02:07
 PM,parkPass:01/01/2000 12:00:00 AM,country:02/16/2010 06:02:07
 PM,site:02/16/2010 06:02:07 PM,loop:02/16/2010 06:02:07
 PM,ticketType:02/16/2010 06:02:07 PM,discount:02/16/2010 06:02:07
 PM,location:02/16/2010 06:02:07 PM,equipment:02/16/2010 06:02:07
 PM,campground:02/17/2010 09:28:11 AM,asset:01/01/2000 12:00:00
 AM,state:02/16/2010 06:02:07 PM,retail:02/16/2010 06:02:07
 PM}]]gt;lt;/datagt;
 lt;data name=parkId
 dataType=numericgt;lt;![CDATA[511]]gt;lt;/datagt;
 lt;data name=locationId
 dataType=numericgt;lt;![CDATA[6558]]gt;lt;/datagt;
   lt;/bodygt;
 lt;/adexgt;/adex
 /intf:getCacheUpdates
   /SOAP-ENV:Body
 /SOAP-ENV:Envelope
   clientId = DirectHTTPChannel0
   contentType = text/xml; charset=utf-8
   destination = DefaultHTTP
   headers = (Object)#1
   httpHeaders = (Object)#2
 SOAPAction = 
   messageId = FACB3D46-5745-E0B7-4F3C-DC8B26A9872C
   method = POST
   recordHeaders = false
   timestamp = 0
   timeToLive = 0
   url = http://xyz/webservices/com/webservices/CachingWebServices.cfc;
 2/17/2010 09:28:12.505 [INFO] mx.messaging.Producer
 'E62FB659-260E-FDD0-479B-DC8AAF12EE52' producer acknowledge of
 'FACB3D46-5745-E0B7-4F3C-DC8B26A9872C'.
 *2/17/2010 09:28:12.505 [ERROR] mx.messaging.Producer
 'E62FB659-260E-FDD0-479B-DC8AAF12EE52' producer fault for
 'FACB3D46-5745-E0B7-4F3C-DC8B26A9872C'.*
 **
 *Its actually getting generated from Line 710 of
 mx.messaging.MessageAgent.as*
 **
 **
 *Here is the RAW Response in the fiddler (HTTP 200 OK)*
 
 HTTP/1.1 200 OK
 Connection: close
 Date: Wed, 17 Feb 2010 15:22:46 GMT
 Content-Type: text/xml; charset=utf-8
 Server: Microsoft-IIS/6.0
 PICS-Label: (PICS-1.0 http://www.rsac.org/ratingsv01.html; l on
 2009.11.13T12:51-0600 exp 2015.11.13T12:00-0600 r (v 0 s 0 n 0 l 0))
 X-Powered-By: ASP.NET
 Vary: Accept-Encoding
 Set-Cookie: Coyote-2-a0305b5=a030548:0; path=/
 Content-Length: 1345
 
 ?xml version=1.0 encoding=utf-8?soapenv:Envelope xmlns:soapenv=
 http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=
 http://www.w3.org/2001/XMLSchema; xmlns:xsi=
 http://www.w3.org/2001/XMLSchema-instance;
  soapenv:Body
   ns1:getCacheUpdatesResponse soapenv:encodingStyle=
 http://schemas.xmlsoap.org/soap/encoding/; xmlns:ns1=
 http://webservices.com.webservices;
getCacheUpdatesReturn xsi:type=soapenc:string xmlns:soapenc=
 http://schemas.xmlsoap.org/soap/encoding/;lt;?xmlhttp://schemas.xmlsoap.org/soap/encoding/%22%3Elt;?xmlversion=quot;1.0quot;
 

[flexcoders] Re: Dynamically naming classes

2010-02-22 Thread valdhor
I would create a new array collection that holds the dateAdded from your
entries ArrayCollection. Then to go to a specific page I would use
getItemIndex to find the page number and use goToPage with the int
returned.

private var datesAdded:ArrayCollection = new ArrayCollection();

public function buildBook():void
{
 for (var i:int = 0; i  entries.length; i ++)
 {
 myBook.addChild(entries.getItemAt(i).dateAdded);
 datesAdded.push(entries.getItemAt(i).dateAdded as String);
 }
}

// Go to page 21220100345
myBook.goToPage(datesAdded.getItemIndex(21220100345);

--- In flexcoders@yahoogroups.com, Wally Kolcz wko...@... wrote:

 I am using Ruben Swieringa's flip book
 (http://www.rubenswieringa.com/blog/flex-book-component-beta) to
create
 a journal for a project which has a Book class and Page Class and a
 really cool goToPage() method. I am using a loop to add Pages based on
 an ArrayCollection record (dateAdded) and would like to name the Page
 instance the rendered version of the date. Problem is I cannot find
 anywhere to name the class based on a dynamical element. I googled all
 around for it, but haven't come up with a working solution in the Flex
 enviornment. I want to do something like this:

 [Bindable] public var entries:ArrayCollection;
 ...
  public function buildBook():void {
  for (var i:int = 0; i  entries.length; i ++){
  var entries.getItemAt(i).dateAdded:Page = new Page();
  ...Add content, define styles, etc...
  myBook.addChild(e.getItemAt(i).dateAdded);
  }
 }

 The end result would be a page with the id of 21220100345 and I can do
 the flip to it using the .goToPage(21220100345)




[flexcoders] Re: Cleaning up source code

2010-02-22 Thread adebonis
Try http://sourceforge.net/projects/flexformatter/

We find it important to run Flex PMD to improve quality not just format
http://opensource.adobe.com/wiki/display/flexpmd/FlexPMD

CPD http://opensource.adobe.com/wiki/display/flexpmd/FlexCPD 
For detecting Copy Paste and duplicate code

You may as well start doing unit testing and TDD to raise the bar more..

Then we use Hudson to do our builds and run all the utils above to be sure we 
end up with the highest quality code we can produce.


--- In flexcoders@yahoogroups.com, Nick Middleweek n...@... wrote:

 Hello...
 
 Are there any utilities to help clean up project source code? Over the
 months, various VO's and Event Classes, etc have been added and things have
 changed making some redundant and I'd like to clean up my project.
 
 Rather than go through it all manually, are there any utilities to help?
 I've once read that it's possible to compile with a special switch to output
 some Verbose compiler messages, would this do the trick?
 
 
 Thanks!
 Nick





[flexcoders] Bitmap width/height 0 when loading image from hard drive

2010-02-22 Thread Aaron Hardy
Flexers,

We have an app that allows a user to upload images.  When the user selects
an image, we load the bitmap from the hard drive and create a thumbnail from
it.  However, every once in a while the bitmap will return 0 for both width
and height which causes issues later on.  That vast majority of the time the
width/height are returned correctly.

Here's the basic code of the image loading--it's nothing special:



override public function execute():void
{
file.addEventListener(Event.COMPLETE, fileLoadedHandler);
file.addEventListener(IOErrorEvent.IO_ERROR,
fileLoadErrorHandler);
file.load();
}

/**
 * The files bytes were loaded successfully.
 */
protected function fileLoadedHandler(event:Event):void
{
file.removeEventListener(Event.COMPLETE, fileLoadedHandler);
file.removeEventListener(IOErrorEvent.IO_ERROR,
fileLoadErrorHandler);

var ba:ByteArray = file.data;
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE,
bitmapLoadedHandler);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR,
bitmapLoadFailedHandler);
loader.loadBytes(ba);
}


/**
 * The bitmap was successfully loaded from the file's bytes.
 */
protected function bitmapLoadedHandler(event:Event):void
{
loader.contentLoaderInfo.removeEventListener(Event.COMPLETE,
bitmapLoadedHandler);

loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR,
bitmapLoadFailedHandler);

try
{
var fullSizeBitmap:Bitmap = Bitmap(loader.content);

if (fullSizeBitmap.width == 0 || fullSizeBitmap.height == 0)
{
// There's a problem.
}
...



Any idea why this would be the case?   Is it a Flash Player bug?  Any help
is much appreciated.

Aaron


[flexcoders] Re: Security issues SOLVED. (Mostly...)

2010-02-22 Thread Laurence
Yes but HTTPS is *so* much slower than HTTP...  Some of the data that we don't 
need secured can get as high as 50,000 records...  I only need one credit-card 
number per account secured.  Not much data at all...

So how, exactly, does setting the secure=false tag open it up to snooping or 
spoofing?  I still don't really get that...  I mean, it's still using HTTPS 
over the secure ColdFusion channel I created, right?  Wouldn't that still be 
secure?

And if setting the secure=false tag removes all HTTPS security, then why 
bother offering the ability to create secure channels in ColdFusion?  I mean, 
if you're serving the .SWF over HTTPS, then all channels are automatically 
secure, yes?  So the only point of having a separate secure channel is to do 
exactly what I'm trying to do...  Why offer that, if it's not truly secure?  
I'm still confused...

L.


--- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote:

 
 
 
 From the Adobe Help files:
 ==
 Each allow-access-from tag also has the optional secure attribute, which 
 defaults to true. You can set the attribute to false if your policy file is 
 on an HTTPS server, and you want to allow SWF files on a non-HTTPS server to 
 load data from the HTTPS server.
 
 Setting the secure attribute to false could compromise the security offered 
 by HTTPS. In particular, setting this attribute to false opens secure content 
 to snooping and spoofing attacks. Adobe strongly recommends that you not set 
 the secure attribute to false.
 
 If data to be loaded is on a HTTPS server, but the SWF file loading it is on 
 an HTTP server, Adobe recommends that you move the loading SWF file to an 
 HTTPS server so that you can keep all copies of your secure data under the 
 protection of HTTPS.
 ==
 
 If I needed secure access, I would move everything over to https.
 
 The only other thing I could suggest is to use encryption. Check out 
 AS3Crypto (http://code.google.com/p/as3crypto/). Of course, if you serve the 
 SWF over HTTP, someone could analyze the SWF and find the encryption key. 
 Again, for security reasons, I would move everything over to https.
 
 --- In flexcoders@yahoogroups.com, Laurence LMacNeill@ wrote:
 
  So, here's my crossdomain.xml in its final form:
  
  cross-domain-policy
  site-control permitted-cross-domain-policies=master-only /
  
  allow-http-request-headers-from domain=www.mydomain.com headers=* 
  secure=false/
  allow-access-from domain=www.mydomain.com secure=false /
  
  /cross-domain-policy
  
  This allows all the stuff on the SecureColdFusion channel I created to work 
  just fine, as long as I access the site from mydomain.com and not from 
  localhost or myserver01 (its NetBIOS name).
  
  Even if I put allow-access-from domain=localhost/ (or 
  domain=myserver01/) in there, it still won't allow access from localhost 
  (or myserver01), because the security certificate is issued to mydomain.com 
  -- the names don't match, so the browser/Flash/CF rejects it.  (I don't 
  know exactly which one is rejecting it, but somewhere along the line it's 
  being rejected because of the name-mismatch.)
  
  The only way that I can see to change that behavior is to create two more 
  virtual websites that point to the same location, and give each of those 
  virtual sites their own certificate (one assigned to myserver01 and one 
  assigned to localhost.  Otherwise, I can't access the app on my local 
  server if the Internet goes down.  Yuck.  (If anyone knows a better way, 
  I'm all ears.)
  
  The one thing that still bothers me about this setup is the 
  'secure=false' tags.  I cannot get a straight answer as to exactly what 
  this does to my security.  It enables http .SWFs to access https data, 
  sure.  But does that mean it's disabling all https when it does that?  Or 
  does it mean that it is secure during transit over the Internet, but not 
  when it's being held in the Flex app?  Or does it mean something entirely 
  different?  There is no site that has a direct answer to this -- they all 
  just say it's not recommended due to security issues, or something along 
  those lines.  But they don't specify WHAT security issues there are.  I 
  need to know -- I can't serve my entire app over an https connection 
  because it'll be too slow, but I must have secure access to some of the 
  data...
  
  So if anyone can answer the 'secure=false' question specifically, I would 
  be very grateful.
  
  Thanks,
  L.
 





[flexcoders] Submenu Opens Below Menubar on First Click (PROBLEM)

2010-02-22 Thread cjsteury2
the Submenu of the MenuBar opens Below the Menu Item on the First Click but 
there is no space at bottom... So it is not view-able.
Then on second click it open above the MenuBar Item, correctly.

Does anyone know how to fix this, please??

Craig




Re: [flexcoders] Submenu Opens Below Menubar on First Click (PROBLEM)

2010-02-22 Thread Alex Harui
I think we fixed that in 3.5


On 2/22/10 11:03 AM, cjsteury2 cra...@steury.com wrote:






the Submenu of the MenuBar opens Below the Menu Item on the First Click but 
there is no space at bottom... So it is not view-able.
Then on second click it open above the MenuBar Item, correctly.

Does anyone know how to fix this, please??

Craig






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


[flexcoders] Creating a settings class (Air, synchronous)

2010-02-22 Thread thedauntless_ff
Hi,

I've restarted writing my Settings class for over a dozen times now; I never 
like the result. The responsibilities for the Settings class are very easy:
- Be able to set (new/existing) settings
- Be able to get settings
- Has to sync with an xml file

I'm using it in an AIR app and I'm loading the data synchronously, so no events 
are involved (thank god for that, although I'm curious how to handle this if 
the xml file is loaded asynchronous) .

What I'm having trouble with, is finding a method that's easy to use and will 
notify me of typo's. Hence, something like 
'Settings.getInstance().g(mySettingName)' won't be possible.

I bet you're thinking: you can't have it both ways! Either you make it dynamic 
(/Proxy class) or you predefine every setting you will need in some sort of 
static var and end up with Settings.getInstance().g(Settings.MY_SETTINGS_NAME). 
Well, I'm hoping that there's a way to have the best of both worlds.

Since the class needs to be dynamic, compile-time errors probably won't be 
possible, but runtime errors surely should be?

Are there any popular classes out there, or is there a certain design pattern / 
architectural pattern that I can use? I've already tried a bunch of 
implementations that I wrote myself, but I'm curious what the Flash community 
has come up with so far.

Thanks for reading and if something's not clear, please let me know and I'll 
elaborate some more.

Cheers!



Re: [flexcoders] Bitmap width/height 0 when loading image from hard drive

2010-02-22 Thread Alex Harui
Is there a particular file that gives you trouble or wil it load successfully 
at some other point?


On 2/22/10 10:06 AM, Aaron Hardy aaronius...@gmail.com wrote:






Flexers,

We have an app that allows a user to upload images.  When the user selects an 
image, we load the bitmap from the hard drive and create a thumbnail from it.  
However, every once in a while the bitmap will return 0 for both width and 
height which causes issues later on.  That vast majority of the time the 
width/height are returned correctly.

Here's the basic code of the image loading--it's nothing special:



override public function execute():void
{
file.addEventListener(Event.COMPLETE, fileLoadedHandler);
file.addEventListener(IOErrorEvent.IO_ERROR, fileLoadErrorHandler);
file.load();
}

/**
 * The files bytes were loaded successfully.
 */
protected function fileLoadedHandler(event:Event):void
{
file.removeEventListener(Event.COMPLETE, fileLoadedHandler);
file.removeEventListener(IOErrorEvent.IO_ERROR, 
fileLoadErrorHandler);

var ba:ByteArray = file.data;
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, 
bitmapLoadedHandler);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, 
bitmapLoadFailedHandler);
loader.loadBytes(ba);
}


/**
 * The bitmap was successfully loaded from the file's bytes.
 */
protected function bitmapLoadedHandler(event:Event):void
{
loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, 
bitmapLoadedHandler);
loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, 
bitmapLoadFailedHandler);

try
{
var fullSizeBitmap:Bitmap = Bitmap(loader.content);

if (fullSizeBitmap.width == 0 || fullSizeBitmap.height == 0)
{
// There's a problem.
}
...



Any idea why this would be the case?   Is it a Flash Player bug?  Any help is 
much appreciated.

Aaron





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


Re: [flexcoders] Submenu Opens Below Menubar on First Click (PROBLEM)

2010-02-22 Thread Craig Steury
Alex, Can you fill me in on what I need to do to get to 3.5 from 3.0  is it
just a download?
(I know i can look this up pretty easy but it's always good to get any
upgrade tips from the 'insiders' if known!)
Thanks,
CS


On Mon, Feb 22, 2010 at 1:50 PM, Alex Harui aha...@adobe.com wrote:



 I think we fixed that in 3.5



 On 2/22/10 11:03 AM, cjsteury2 cra...@steury.com wrote:






 the Submenu of the MenuBar opens Below the Menu Item on the First Click but
 there is no space at bottom... So it is not view-able.
 Then on second click it open above the MenuBar Item, correctly.

 Does anyone know how to fix this, please??

 Craig






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



[flexcoders] Re: Security issues SOLVED. (Mostly...)

2010-02-22 Thread valdhor
An Idea...

Put the SWF on the HTTPS Server. There will be a one time hit as the user loads 
the SWF. Place your secure calls to the same HTTPS server. Place the other 
calls to an HTTP server.

I don't know how or even if that would work but it's worth a try.

--- In flexcoders@yahoogroups.com, Laurence lmacne...@... wrote:

 Yes but HTTPS is *so* much slower than HTTP...  Some of the data that we 
 don't need secured can get as high as 50,000 records...  I only need one 
 credit-card number per account secured.  Not much data at all...
 
 So how, exactly, does setting the secure=false tag open it up to snooping 
 or spoofing?  I still don't really get that...  I mean, it's still using 
 HTTPS over the secure ColdFusion channel I created, right?  Wouldn't that 
 still be secure?
 
 And if setting the secure=false tag removes all HTTPS security, then why 
 bother offering the ability to create secure channels in ColdFusion?  I mean, 
 if you're serving the .SWF over HTTPS, then all channels are automatically 
 secure, yes?  So the only point of having a separate secure channel is to do 
 exactly what I'm trying to do...  Why offer that, if it's not truly secure?  
 I'm still confused...
 
 L.
 
 
 --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote:
 
  
  
  
  From the Adobe Help files:
  ==
  Each allow-access-from tag also has the optional secure attribute, which 
  defaults to true. You can set the attribute to false if your policy file is 
  on an HTTPS server, and you want to allow SWF files on a non-HTTPS server 
  to load data from the HTTPS server.
  
  Setting the secure attribute to false could compromise the security offered 
  by HTTPS. In particular, setting this attribute to false opens secure 
  content to snooping and spoofing attacks. Adobe strongly recommends that 
  you not set the secure attribute to false.
  
  If data to be loaded is on a HTTPS server, but the SWF file loading it is 
  on an HTTP server, Adobe recommends that you move the loading SWF file to 
  an HTTPS server so that you can keep all copies of your secure data under 
  the protection of HTTPS.
  ==
  
  If I needed secure access, I would move everything over to https.
  
  The only other thing I could suggest is to use encryption. Check out 
  AS3Crypto (http://code.google.com/p/as3crypto/). Of course, if you serve 
  the SWF over HTTP, someone could analyze the SWF and find the encryption 
  key. Again, for security reasons, I would move everything over to https.
  
  --- In flexcoders@yahoogroups.com, Laurence LMacNeill@ wrote:
  
   So, here's my crossdomain.xml in its final form:
   
   cross-domain-policy
 site-control permitted-cross-domain-policies=master-only /
   
 allow-http-request-headers-from domain=www.mydomain.com headers=* 
   secure=false/
 allow-access-from domain=www.mydomain.com secure=false /
   
   /cross-domain-policy
   
   This allows all the stuff on the SecureColdFusion channel I created to 
   work just fine, as long as I access the site from mydomain.com and not 
   from localhost or myserver01 (its NetBIOS name).
   
   Even if I put allow-access-from domain=localhost/ (or 
   domain=myserver01/) in there, it still won't allow access from 
   localhost (or myserver01), because the security certificate is issued to 
   mydomain.com -- the names don't match, so the browser/Flash/CF rejects 
   it.  (I don't know exactly which one is rejecting it, but somewhere along 
   the line it's being rejected because of the name-mismatch.)
   
   The only way that I can see to change that behavior is to create two more 
   virtual websites that point to the same location, and give each of those 
   virtual sites their own certificate (one assigned to myserver01 and one 
   assigned to localhost.  Otherwise, I can't access the app on my local 
   server if the Internet goes down.  Yuck.  (If anyone knows a better way, 
   I'm all ears.)
   
   The one thing that still bothers me about this setup is the 
   'secure=false' tags.  I cannot get a straight answer as to exactly what 
   this does to my security.  It enables http .SWFs to access https data, 
   sure.  But does that mean it's disabling all https when it does that?  Or 
   does it mean that it is secure during transit over the Internet, but not 
   when it's being held in the Flex app?  Or does it mean something entirely 
   different?  There is no site that has a direct answer to this -- they all 
   just say it's not recommended due to security issues, or something 
   along those lines.  But they don't specify WHAT security issues there 
   are.  I need to know -- I can't serve my entire app over an https 
   connection because it'll be too slow, but I must have secure access to 
   some of the data...
   
   So if anyone can answer the 'secure=false' question specifically, I 
   

[flexcoders] Re: Submenu Opens Below Menubar on First Click (PROBLEM)

2010-02-22 Thread valdhor
Download the latest Adobe Flex SDK milestone release from 
http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+3 and place it 
wherever you want (I normally put it into your SDK's folder).

Refer to the instructions to Add a new Flex SDK to the list of available SDKs 
at http://livedocs.adobe.com/flex/3/html/help.html?content=build_6.html#162812.

Change your project settings to use the new SDK. Compile and go.

--- In flexcoders@yahoogroups.com, Craig Steury cra...@... wrote:

 Alex, Can you fill me in on what I need to do to get to 3.5 from 3.0  is it
 just a download?
 (I know i can look this up pretty easy but it's always good to get any
 upgrade tips from the 'insiders' if known!)
 Thanks,
 CS
 
 
 On Mon, Feb 22, 2010 at 1:50 PM, Alex Harui aha...@... wrote:
 
 
 
  I think we fixed that in 3.5
 
 
 
  On 2/22/10 11:03 AM, cjsteury2 cra...@... wrote:
 
 
 
 
 
 
  the Submenu of the MenuBar opens Below the Menu Item on the First Click but
  there is no space at bottom... So it is not view-able.
  Then on second click it open above the MenuBar Item, correctly.
 
  Does anyone know how to fix this, please??
 
  Craig
 
 
 
 
 
 
  --
  Alex Harui
  Flex SDK Team
  Adobe System, Inc.
  http://blogs.adobe.com/aharui

 





[flexcoders] Re: Security issues SOLVED. (Mostly...)

2010-02-22 Thread Laurence
So, you're saying that serving the .SWF via HTTPS won't automatically make all 
my ColdFusion calls through HTTPS?  Like, I can have the majority of my calls 
through HTTP, and just secure the couple of calls that need to be secured?

I thought if you served the .SWF via HTTPS, all the calls to CF were 
automatically sent through HTTPS?

L.


--- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote:

 An Idea...
 
 Put the SWF on the HTTPS Server. There will be a one time hit as the user 
 loads the SWF. Place your secure calls to the same HTTPS server. Place the 
 other calls to an HTTP server.
 
 I don't know how or even if that would work but it's worth a try.
 
 --- In flexcoders@yahoogroups.com, Laurence LMacNeill@ wrote:
 
  Yes but HTTPS is *so* much slower than HTTP...  Some of the data that we 
  don't need secured can get as high as 50,000 records...  I only need one 
  credit-card number per account secured.  Not much data at all...
  
  So how, exactly, does setting the secure=false tag open it up to snooping 
  or spoofing?  I still don't really get that...  I mean, it's still using 
  HTTPS over the secure ColdFusion channel I created, right?  Wouldn't that 
  still be secure?
  
  And if setting the secure=false tag removes all HTTPS security, then why 
  bother offering the ability to create secure channels in ColdFusion?  I 
  mean, if you're serving the .SWF over HTTPS, then all channels are 
  automatically secure, yes?  So the only point of having a separate secure 
  channel is to do exactly what I'm trying to do...  Why offer that, if it's 
  not truly secure?  I'm still confused...
  
  L.
  
  
  --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote:
  
   
   
   
   From the Adobe Help files:
   ==
   Each allow-access-from tag also has the optional secure attribute, 
   which defaults to true. You can set the attribute to false if your policy 
   file is on an HTTPS server, and you want to allow SWF files on a 
   non-HTTPS server to load data from the HTTPS server.
   
   Setting the secure attribute to false could compromise the security 
   offered by HTTPS. In particular, setting this attribute to false opens 
   secure content to snooping and spoofing attacks. Adobe strongly 
   recommends that you not set the secure attribute to false.
   
   If data to be loaded is on a HTTPS server, but the SWF file loading it is 
   on an HTTP server, Adobe recommends that you move the loading SWF file to 
   an HTTPS server so that you can keep all copies of your secure data under 
   the protection of HTTPS.
   ==
   
   If I needed secure access, I would move everything over to https.
   
   The only other thing I could suggest is to use encryption. Check out 
   AS3Crypto (http://code.google.com/p/as3crypto/). Of course, if you serve 
   the SWF over HTTP, someone could analyze the SWF and find the encryption 
   key. Again, for security reasons, I would move everything over to https.
   
   --- In flexcoders@yahoogroups.com, Laurence LMacNeill@ wrote:
   
So, here's my crossdomain.xml in its final form:

cross-domain-policy
site-control permitted-cross-domain-policies=master-only /

allow-http-request-headers-from domain=www.mydomain.com 
headers=* secure=false/
allow-access-from domain=www.mydomain.com secure=false /

/cross-domain-policy

This allows all the stuff on the SecureColdFusion channel I created to 
work just fine, as long as I access the site from mydomain.com and 
not from localhost or myserver01 (its NetBIOS name).

Even if I put allow-access-from domain=localhost/ (or 
domain=myserver01/) in there, it still won't allow access from 
localhost (or myserver01), because the security certificate is issued 
to mydomain.com -- the names don't match, so the browser/Flash/CF 
rejects it.  (I don't know exactly which one is rejecting it, but 
somewhere along the line it's being rejected because of the 
name-mismatch.)

The only way that I can see to change that behavior is to create two 
more virtual websites that point to the same location, and give each of 
those virtual sites their own certificate (one assigned to myserver01 
and one assigned to localhost.  Otherwise, I can't access the app on 
my local server if the Internet goes down.  Yuck.  (If anyone knows a 
better way, I'm all ears.)

The one thing that still bothers me about this setup is the 
'secure=false' tags.  I cannot get a straight answer as to exactly 
what this does to my security.  It enables http .SWFs to access https 
data, sure.  But does that mean it's disabling all https when it does 
that?  Or does it mean that it is secure during transit over the 
Internet, but not when it's being 

[flexcoders] Re: Dynamically naming classes

2010-02-22 Thread Amy


--- In flexcoders@yahoogroups.com, Wally Kolcz wko...@... wrote:

 I dont need the interation. I need the value of the record as the Class 
 instance name (id). For example. Using the code example I sent I would 
 need the first recond to be:
 
 var 2202101034523:Page = new Page();

Look at Object or Dictionary.

However, you may also want to consider just adding the date as a property of 
your Class that lives in the ArrayCollection, then just use a Filter or a 
Cursor to locate the appropriate item.

HTH;

Amy



Re: [flexcoders] Re: Security issues SOLVED. (Mostly...)

2010-02-22 Thread Warren
You are using the AMF protocols to transmit data back and forth between your 
swf and your cold fusion server. 

I dont' think they meant you can snoop the encrytpted data channel.  I'm 
thinking more like wsdl, parameter passing, etc -- thing more like normal HTML 
stuff.

That's why there's a services-config.xml file.  You have to configure the data 
channels independent of the web server..

I say this being really comfortable in the CF8 world.  CF9 and crossdomain may 
be another issue.  But in my world I have never had a cross domain issue since 
I never use localhost, etc.  since I keep everything in the same domain and 
never run local.  I can't believe things have changed that much between 
versions


  - Original Message - 
  From: Laurence 
  To: flexcoders@yahoogroups.com 
  Sent: Monday, February 22, 2010 3:16 PM
  Subject: [flexcoders] Re: Security issues SOLVED. (Mostly...)



  So, you're saying that serving the .SWF via HTTPS won't automatically make 
all my ColdFusion calls through HTTPS? Like, I can have the majority of my 
calls through HTTP, and just secure the couple of calls that need to be secured?

  I thought if you served the .SWF via HTTPS, all the calls to CF were 
automatically sent through HTTPS?

  L.

  --- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote:
  
   An Idea...
   
   Put the SWF on the HTTPS Server. There will be a one time hit as the user 
loads the SWF. Place your secure calls to the same HTTPS server. Place the 
other calls to an HTTP server.
   
   I don't know how or even if that would work but it's worth a try.
   
   --- In flexcoders@yahoogroups.com, Laurence LMacNeill@ wrote:
   
Yes but HTTPS is *so* much slower than HTTP... Some of the data that we 
don't need secured can get as high as 50,000 records... I only need one 
credit-card number per account secured. Not much data at all...

So how, exactly, does setting the secure=false tag open it up to 
snooping or spoofing? I still don't really get that... I mean, it's still using 
HTTPS over the secure ColdFusion channel I created, right? Wouldn't that still 
be secure?

And if setting the secure=false tag removes all HTTPS security, then 
why bother offering the ability to create secure channels in ColdFusion? I 
mean, if you're serving the .SWF over HTTPS, then all channels are 
automatically secure, yes? So the only point of having a separate secure 
channel is to do exactly what I'm trying to do... Why offer that, if it's not 
truly secure? I'm still confused...

L.


--- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote:

 
 
 
 From the Adobe Help files:
 ==
 Each allow-access-from tag also has the optional secure attribute, 
which defaults to true. You can set the attribute to false if your policy file 
is on an HTTPS server, and you want to allow SWF files on a non-HTTPS server to 
load data from the HTTPS server.
 
 Setting the secure attribute to false could compromise the security 
offered by HTTPS. In particular, setting this attribute to false opens secure 
content to snooping and spoofing attacks. Adobe strongly recommends that you 
not set the secure attribute to false.
 
 If data to be loaded is on a HTTPS server, but the SWF file loading it 
is on an HTTP server, Adobe recommends that you move the loading SWF file to an 
HTTPS server so that you can keep all copies of your secure data under the 
protection of HTTPS.
 ==
 
 If I needed secure access, I would move everything over to https.
 
 The only other thing I could suggest is to use encryption. Check out 
AS3Crypto (http://code.google.com/p/as3crypto/). Of course, if you serve the 
SWF over HTTP, someone could analyze the SWF and find the encryption key. 
Again, for security reasons, I would move everything over to https.
 
 --- In flexcoders@yahoogroups.com, Laurence LMacNeill@ wrote:
 
  So, here's my crossdomain.xml in its final form:
  
  cross-domain-policy
  site-control permitted-cross-domain-policies=master-only /
  
  allow-http-request-headers-from domain=www.mydomain.com 
headers=* secure=false/
  allow-access-from domain=www.mydomain.com secure=false /
  
  /cross-domain-policy
  
  This allows all the stuff on the SecureColdFusion channel I created 
to work just fine, as long as I access the site from mydomain.com and not 
from localhost or myserver01 (its NetBIOS name).
  
  Even if I put allow-access-from domain=localhost/ (or 
domain=myserver01/) in there, it still won't allow access from localhost (or 
myserver01), because the security certificate is issued to mydomain.com -- the 
names don't match, so the browser/Flash/CF rejects it. (I don't know exactly 
which one is rejecting 

[flexcoders] AdvancedDataGrid 2 Pixel Gap Between Rows

2010-02-22 Thread Daniel Swid
I'm really frustrated trying to eliminate the 2 pixel gap between rows. 

I've explored with FlexSpy, have subclassed the ADG, but can't figure out where 
its coming from. 

Does anyone have any ideas or pointers?



Thanks.



[flexcoders] Problem while updating tree control

2010-02-22 Thread Patil Yogesh

I am facing a problem while updating dataprovider for tree control.

DataProvider is dependent on two different data sources. Using which I
am building new collection which acts as a dataprovider to tree control.

I want to add/update/delete data in either one or both data sources. It
should get reflected in tree control. But I am facing problem while doing
so

I have expended nodes in tree and then if i try to update data source, tree
control does reflect the changes but it closes all expanded nodes.

Following is the sample prototype:
s:Application 
xmlns:fx=http://ns.adobe.com/mxml/2009; 
xmlns:s=library://ns.adobe.com/flex/spark 
xmlns:mx=library://ns.adobe.com/flex/halo
initialize=initTree(event)

fx:Script
![CDATA[
import mx.collections.ArrayCollection;
import mx.events.CollectionEvent;
import mx.events.FlexEvent;

[Bindable]
private var treeData : ArrayCollection = new 
ArrayCollection();

[Bindable]
private var testData : ArrayCollection;

[Bindable]
private var testData2 : ArrayCollection;

private var openItems : Object;

private var refresh : Boolean = false;


//---
protected function initTree(event:FlexEvent):void
{

treeData.addEventListener(CollectionEvent.COLLECTION_CHANGE, update);
testData = new ArrayCollection([{label:One}, 
{label:Two},
{label:Three}]);
testData2 = new ArrayCollection([{label:One}, 
{label:Two},
{label:Three}]);
updateData();

}


//---
protected function button_clickHandler(event : 
MouseEvent):void
{
openItems = treeControl.openItems;
testData.addItem({label:updating});
updateData();
}


//---
// Build data provider as per requirement
private function updateData() : void {
var tree : ArrayCollection = new 
ArrayCollection();
for(var i : int = 0; i  testData.length; i++) {
var col : ArrayCollection = new 
ArrayCollection();
for(var j : int = 0; j  
testData2.length; j++) {
if(testData.getItemAt(i).label 
== testData2.getItemAt(j).label) {

col.addItem({label:testData2.getItemAt(j).label});
}
}

tree.addItem({label:testData.getItemAt(i).label, children:col});
}
treeData = tree;
}


//---
private function update() : void {
refresh = true;
}


//---
protected function 
treeControl_renderHandler(event:Event):void
{
if(refresh) {
treeControl.invalidateList();
refresh = false;
treeControl.openItems = openItems;
treeControl.validateNow();
}
}

]]
/fx:Script
mx:VBox width=100%
s:Button id=button click=button_clickHandler(event) 
label=Click/
mx:Tree id=treeControl width=100% right=-1 left=-1 
bottom=-1
top=44 borderAlpha=0.75 dataProvider={treeData}
 render=treeControl_renderHandler(event)/
/mx:VBox

/s:Application

-
--
Regards,
Yogesh Patil.
-- 
View this message in context: 

Re: [flexcoders] Collapsible Panel

2010-02-22 Thread Jose adriano Alves
Any help please...



Em 19 de fevereiro de 2010 21:20, Jose adriano Alves 
alves.jadri...@gmail.com escreveu:

 Do you have a sample?

 I would like a lot...
 I have experience but in Delphi, but I going step by step in Flex...

 Em 19 de fevereiro de 2010 22:13, Jake Churchill reyna...@gmail.comescreveu:



 just make your layout th en look at animateProperty.  You can build one of
 those from scratch in about 10 minutes.

 2010/2/19 Jose adriano Alves alves.jadri...@gmail.com



 Hello,

 I need a collpsible panel, like ExtJS Panel [1].

 It´s been hard to find one... I am a newbee yet in Flex and I use Adobe
 Flash Builder 4.


 [1] http://www.extjs.com/deploy/dev/examples/layout/complex.html

 Take a look at West and East Side  Panels.

 --
 

 Att.
 José Adriano Alves
 Analista de Sistemas - Móveis Gazin.
 Cel..:  +55 44 8802 3994
 Fone: + 55 44 3663 8000 - 2319
 Mail: alves.jadri...@gazin.com.br
 MSN: jose.adri...@gazin.com.br



 Este e-mail, seu conteúdo e seus anexos estão sujeitos à privilégio de
 comunicação podendo este documento incluir informação confidencial e de
 propriedade restrita da GAZIN e apenas pode ser lido por aqueles a qual o
 mesmo tenha sido endereçado. Se você recebeu essa mensagem de e-mail
 indevidamente, por favor avise-nos imediatamente. Quaisquer dados, opiniões
 ou informações expressadas neste e-mail pertencem ao seu remetente e não
 necessariamente coincidem com aquelas da GAZIN, são de exclusiva
 responsabilidade do signatário. Este documento não pode ser reproduzido,
 copiado, distribuído, publicado ou modificado por terceiros, sem a prévia
 autorização por escrito da GAZIN.


 Antes de imprimir pense em seu compromisso com o Meio Ambiente


  




 --
 

 Att.
 José Adriano Alves
 Analista de Sistemas - Móveis Gazin.
 Cel..:  +55 44 8802 3994
 Fone: + 55 44 3663 8000 - 2319
 Mail: alves.jadri...@gazin.com.br
 MSN: jose.adri...@gazin.com.br



 Este e-mail, seu conteúdo e seus anexos estão sujeitos à privilégio de
 comunicação podendo este documento incluir informação confidencial e de
 propriedade restrita da GAZIN e apenas pode ser lido por aqueles a qual o
 mesmo tenha sido endereçado. Se você recebeu essa mensagem de e-mail
 indevidamente, por favor avise-nos imediatamente. Quaisquer dados, opiniões
 ou informações expressadas neste e-mail pertencem ao seu remetente e não
 necessariamente coincidem com aquelas da GAZIN, são de exclusiva
 responsabilidade do signatário. Este documento não pode ser reproduzido,
 copiado, distribuído, publicado ou modificado por terceiros, sem a prévia
 autorização por escrito da GAZIN.


 Antes de imprimir pense em seu compromisso com o Meio Ambiente




-- 


Att.
José Adriano Alves
Analista de Sistemas - Móveis Gazin.
Cel..:  +55 44 8802 3994
Fone: + 55 44 3663 8000 - 2319
Mail: alves.jadri...@gazin.com.br
MSN: jose.adri...@gazin.com.br



Este e-mail, seu conteúdo e seus anexos estão sujeitos à privilégio de
comunicação podendo este documento incluir informação confidencial e de
propriedade restrita da GAZIN e apenas pode ser lido por aqueles a qual o
mesmo tenha sido endereçado. Se você recebeu essa mensagem de e-mail
indevidamente, por favor avise-nos imediatamente. Quaisquer dados, opiniões
ou informações expressadas neste e-mail pertencem ao seu remetente e não
necessariamente coincidem com aquelas da GAZIN, são de exclusiva
responsabilidade do signatário. Este documento não pode ser reproduzido,
copiado, distribuído, publicado ou modificado por terceiros, sem a prévia
autorização por escrito da GAZIN.


Antes de imprimir pense em seu compromisso com o Meio Ambiente


[flexcoders] PDF and Flex

2010-02-22 Thread sderamon
Hi,

I'm new working with Air and flex and I have a question. If we have a pdf file, 
is possible to get the number of pages?

Thank You





Re: [flexcoders] Component Data Calls

2010-02-22 Thread Jukka Hämäläinen

Hi Dan,

as Tracy already said, it is possible to make service calls inside a
component. You might still want to think it through twice before you do this
because the service calls can very often be project specific. If the service
call is externalized, the same component could be more reusable. 

Of course this all depends the size of your component. If your component
is a view, then it's usually okay to keep its service calls inside it,
although it is still wise to isolate the calls in their own class.

- Jukka


Dan Pride wrote:
 
 Is it possible to make a service call from inside a component?
 In other words the component would be totally independent, getting its own
 data from the back end rather than passing it in from the parent mxml?
 Thanks
 Dan Pride
 
 
   
 
 

-- 
View this message in context: 
http://old.nabble.com/Component-Data-Calls-tp27584053p27694036.html
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] Flex 3 + Colfusion + LCDS 2.6.1 manual installation

2010-02-22 Thread lordali

Hi,

I am new to Flex and Coldfusion. I am working hard to learn it asap. I am
basically making a Game which needs to use

Flex calling a CFC that returns data of various types.
Subscribing to a real-time message feed using a Flex mx:Consumer.
Publishing real-time messages from Flex using mx:Producer.
Publishing real-time messages from ColdFusion using an Event Gateway
(DataServicesMessaging) and receiving them in Flex.

Now I have checked and know that ColdFusion 9 comes with or say manually
install LCDS 2.6.1. But I don't know how to do this. This forum is very
active and hoping that someone will help me.

The thing that I don't understand is

The following instructions use the term lcds_install_root to refer to the
installated home directory for LiveCycle Data Services ES 2.6.1.

lcds_install_root term is used in the below manual to install LCDS but I
don't understand the meaning of it. LiveCycle Data Services ES 2.6.1 is
basically a zip file which has one folder and some files and no installation
file. Is he talking about LiveCycle ES2 server installation which has
/resources/lib/flex-messaging*.jar folder to work with? . Do we need to
install Server inorder to work with Coldfusion 9 LCDS? . Someone please
explain to me what should I do because I have searched alot but couldn't
find anything.

One more question, Coldfusion 9 LCDS 2.6.1 is free to use with coldfusion
right? . We don't have to pay for that. Are there any restrictions on the
use?



INSTRUCTIONS FOR MANUAL INTEGRATION OF LCDS 2.6.1 WITH COLDFUSION 9

To be able to use LiveCycle Data Services ES 2.6.1 with ColdFusion 9, you
need to manually integrate it with ColdFusion installation.
Note: The following instructions use the term lcds_install_root to refer to
the installated home directory for LiveCycle Data Services ES 2.6.1.
1) Shutdown your ColdFusion 9 server if its running.
2) Copy the ColdFusion9/lib/flex-messaging*.jar files to a backup location.
If you are running a multiserver instance or a J2EE installation, these
files are in the WEB-INF/cfusion/lib
directory.
3) Copy the lcds_install_root/resources/lib/flex-messaging*.jar files and
overwrite them into the ColdFusion /lib directory.
4) Copy LCDS2.6.1_for_CF9/WEB-INF/flex/jars/cfdataservicesadapter.jar to
ColdFusion WEB-INF/flex/jars.
5) Also Copy the following SWC libraries from
lcds_install_root/resources/frameworks to the CF9 directory:
ï /libs/fds.swc file to the /WEB-INF/flex/libs directory
ï /libs/player/playerfds.swc file to the /WEB-INF/flex/libs/player/
directory
ï /locale/en_US/fds_rb.swc file over the /WEB-INF/flex/locale/en_US/
directory
-- 
View this message in context: 
http://old.nabble.com/Flex-3-%2B-Colfusion-%2B-LCDS-2.6.1-manual-installation-tp27688061p27688061.html
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] AdvancedDataGrid 2 Pixel Gap Between Rows

2010-02-22 Thread D
I'm really frustrated trying to eliminate the 2 pixel gap between rows.

I've explored with FlexSpy, have subclassed the ADG, but can't figure out where
its coming from.

Does anyone have any ideas or pointers?



Thanks.



Re: [flexcoders] Bitmap width/height 0 when loading image from hard drive

2010-02-22 Thread Aaron Hardy
It's not any particular photo or set of photos.  Sometimes we can run the
app and load the photos just fine then the next day we'll attempt to load
the same files and the width/height will return 0.  It seems that once the
issue starts to occur that any time we try to upload any photo within that
session it continues reporting width/height of 0. There's not a very
reproducible pattern though it seems to occur more frequently when the Flash
Player is under heavy stress like when it's trying to load in many files at
the same time.  It also seems to happen more frequently if we have two tabs
open with the same application loaded in both and we're attempting to load
the same images in both tabs (this may be related to the stress the Flash
Player is under rather than some sort of file locking issue).  Again, it
doesn't always happen, just more frequently under those scenarios.  We've
created a queue so only one photo is loading in at a time and we even threw
in the Grant Skinner hack of forcing garbage collection between each load to
see if that would help.  That did actually decrease the frequency of the
issue quite a bit but not sufficiently.

Since posting we've tweaked the code slightly to use the width/height
properties on the bitmapdata instead of the bitmap itself.  I doubt it will
make any difference but at least it narrows it down a bit.

Aaron

On Mon, Feb 22, 2010 at 1:05 PM, Alex Harui aha...@adobe.com wrote:



 Is there a particular file that gives you trouble or wil it load
 successfully at some other point?



 On 2/22/10 10:06 AM, Aaron Hardy aaronius...@gmail.com wrote:






 Flexers,

 We have an app that allows a user to upload images.  When the user selects
 an image, we load the bitmap from the hard drive and create a thumbnail from
 it.  However, every once in a while the bitmap will return 0 for both width
 and height which causes issues later on.  That vast majority of the time the
 width/height are returned correctly.

 Here's the basic code of the image loading--it's nothing special:

 

 override public function execute():void
 {
 file.addEventListener(Event.COMPLETE, fileLoadedHandler);
 file.addEventListener(IOErrorEvent.IO_ERROR,
 fileLoadErrorHandler);
 file.load();
 }

 /**
  * The files bytes were loaded successfully.
  */
 protected function fileLoadedHandler(event:Event):void
 {
 file.removeEventListener(Event.COMPLETE, fileLoadedHandler);
 file.removeEventListener(IOErrorEvent.IO_ERROR,
 fileLoadErrorHandler);

 var ba:ByteArray = file.data;
 loader = new Loader();
 loader.contentLoaderInfo.addEventListener(Event.COMPLETE,
 bitmapLoadedHandler);
 loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR,
 bitmapLoadFailedHandler);
 loader.loadBytes(ba);
 }


 /**
  * The bitmap was successfully loaded from the file's bytes.
  */
 protected function bitmapLoadedHandler(event:Event):void
 {
 loader.contentLoaderInfo.removeEventListener(Event.COMPLETE,
 bitmapLoadedHandler);
 
 loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR,
 bitmapLoadFailedHandler);

 try
 {
 var fullSizeBitmap:Bitmap = Bitmap(loader.content);

 if (fullSizeBitmap.width == 0 || fullSizeBitmap.height ==
 0)
 {
 // There's a problem.
 }
 ...

 

 Any idea why this would be the case?   Is it a Flash Player bug?  Any help
 is much appreciated.

 Aaron





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



[flexcoders] issue related to embedding a linkbar within a tabnavigator

2010-02-22 Thread sharath reddy
Hi,

We have a TabNavigator in our app, and we wanted to display a few links on the 
right of the Tab bar. I created a custom TabNavigator by extending it, and do 
the following:
1. over-ride 'createChildren', create my LinkBar
2. over-ride 'updateDisplayList', position my LinkBar to show up on the right 
of the Tab bar. 

The only problem is, I am trying to set the color of the separator:

linkBar = new LinkBar();
linkBar.setStyle(separatorColor, ..); 

This does not seem to have any effect. On a stand-alone LinkBar(), this works 
just fine

Any ideas? Thanks for the help!

Regards,
Sharath


  


Re: [flexcoders] Bitmap width/height 0 when loading image from hard drive

2010-02-22 Thread Aaron Hardy
I've gathered additional information.  It appears that it's due to bitmaps
that are over the supported size (16,777,215 pixels).  While the bitmaps
load in fine when the Flash Player isn't under much stress, the width/height
choke when there is stress.  Again, it isn't consistent, but that seems to
be the issue.  I read somewhere that when loading a bitmap in using Loader
that the maximum dimensions didn't apply, but that appears to not be the
case and from Adobe I've only heard that all bets are off with bitmaps over
16,777,215 pixels.

I'll update the thread if it turns out to be something different.

Aaron

On Mon, Feb 22, 2010 at 4:28 PM, Aaron Hardy aaronius...@gmail.com wrote:

 It's not any particular photo or set of photos.  Sometimes we can run the
 app and load the photos just fine then the next day we'll attempt to load
 the same files and the width/height will return 0.  It seems that once the
 issue starts to occur that any time we try to upload any photo within that
 session it continues reporting width/height of 0. There's not a very
 reproducible pattern though it seems to occur more frequently when the Flash
 Player is under heavy stress like when it's trying to load in many files at
 the same time.  It also seems to happen more frequently if we have two tabs
 open with the same application loaded in both and we're attempting to load
 the same images in both tabs (this may be related to the stress the Flash
 Player is under rather than some sort of file locking issue).  Again, it
 doesn't always happen, just more frequently under those scenarios.  We've
 created a queue so only one photo is loading in at a time and we even threw
 in the Grant Skinner hack of forcing garbage collection between each load to
 see if that would help.  That did actually decrease the frequency of the
 issue quite a bit but not sufficiently.

 Since posting we've tweaked the code slightly to use the width/height
 properties on the bitmapdata instead of the bitmap itself.  I doubt it will
 make any difference but at least it narrows it down a bit.

 Aaron


 On Mon, Feb 22, 2010 at 1:05 PM, Alex Harui aha...@adobe.com wrote:



 Is there a particular file that gives you trouble or wil it load
 successfully at some other point?



 On 2/22/10 10:06 AM, Aaron Hardy aaronius...@gmail.com wrote:






 Flexers,

 We have an app that allows a user to upload images.  When the user selects
 an image, we load the bitmap from the hard drive and create a thumbnail from
 it.  However, every once in a while the bitmap will return 0 for both width
 and height which causes issues later on.  That vast majority of the time the
 width/height are returned correctly.

 Here's the basic code of the image loading--it's nothing special:

 

 override public function execute():void
 {
 file.addEventListener(Event.COMPLETE, fileLoadedHandler);
 file.addEventListener(IOErrorEvent.IO_ERROR,
 fileLoadErrorHandler);
 file.load();
 }

 /**
  * The files bytes were loaded successfully.
  */
 protected function fileLoadedHandler(event:Event):void
 {
 file.removeEventListener(Event.COMPLETE, fileLoadedHandler);
 file.removeEventListener(IOErrorEvent.IO_ERROR,
 fileLoadErrorHandler);

 var ba:ByteArray = file.data;
 loader = new Loader();
 loader.contentLoaderInfo.addEventListener(Event.COMPLETE,
 bitmapLoadedHandler);
 loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR,
 bitmapLoadFailedHandler);
 loader.loadBytes(ba);
 }


 /**
  * The bitmap was successfully loaded from the file's bytes.
  */
 protected function bitmapLoadedHandler(event:Event):void
 {
 loader.contentLoaderInfo.removeEventListener(Event.COMPLETE,
 bitmapLoadedHandler);
 
 loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR,
 bitmapLoadFailedHandler);

 try
 {
 var fullSizeBitmap:Bitmap = Bitmap(loader.content);

 if (fullSizeBitmap.width == 0 || fullSizeBitmap.height ==
 0)
 {
 // There's a problem.
 }
 ...

 

 Any idea why this would be the case?   Is it a Flash Player bug?  Any help
 is much appreciated.

 Aaron





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





Re: [flexcoders] Problem while updating tree control

2010-02-22 Thread Alex Harui
Objects have UIDs assigned to them when used in Tree and other list components. 
 If you create new Objects, even if they have the same data, they will have 
different UIDs.  The openItems may not be matching correctly because of that.  
You can copy the UID if you want to, but be aware of the dangers of having 
mutiple objects with the same UID.


On 2/22/10 12:45 AM, Patil Yogesh patilyoge...@gmail.com wrote:







I am facing a problem while updating dataprovider for tree control.

DataProvider is dependent on two different data sources. Using which I
am building new collection which acts as a dataprovider to tree control.

I want to add/update/delete data in either one or both data sources. It
should get reflected in tree control. But I am facing problem while doing
so

I have expended nodes in tree and then if i try to update data source, tree
control does reflect the changes but it closes all expanded nodes.

Following is the sample prototype:
s:Application
xmlns:fx=http://ns.adobe.com/mxml/2009;
xmlns:s=library://ns.adobe.com/flex/spark
xmlns:mx=library://ns.adobe.com/flex/halo
initialize=initTree(event)

fx:Script
![CDATA[
import mx.collections.ArrayCollection;
import mx.events.CollectionEvent;
import mx.events.FlexEvent;

[Bindable]
private var treeData : ArrayCollection = new ArrayCollection();

[Bindable]
private var testData : ArrayCollection;

[Bindable]
private var testData2 : ArrayCollection;

private var openItems : Object;

private var refresh : Boolean = false;

//--
protected function initTree(event:FlexEvent):void
{
treeData.addEventListener(CollectionEvent.COLLECTION_CHANGE, update);
testData = new ArrayCollection([{label:One}, {label:Two},
{label:Three}]);
testData2 = new ArrayCollection([{label:One}, {label:Two},
{label:Three}]);
updateData();

}

//--
protected function button_clickHandler(event : MouseEvent):void
{
openItems = treeControl.openItems;
testData.addItem({label:updating});
updateData();
}

//--
// Build data provider as per requirement
private function updateData() : void {
var tree : ArrayCollection = new ArrayCollection();
for(var i : int = 0; i  testData.length; i++) {
var col : ArrayCollection = new ArrayCollection();
for(var j : int = 0; j  testData2.length; j++) {
if(testData.getItemAt(i).label == testData2.getItemAt(j).label) {
col.addItem({label:testData2.getItemAt(j).label});
}
}
tree.addItem({label:testData.getItemAt(i).label, children:col});
}
treeData = tree;
}

//--
private function update() : void {
refresh = true;
}

//--
protected function treeControl_renderHandler(event:Event):void
{
if(refresh) {
treeControl.invalidateList();
refresh = false;
treeControl.openItems = openItems;
treeControl.validateNow();
}
}

]]
/fx:Script
mx:VBox width=100%
s:Button id=button click=button_clickHandler(event) label=Click/
mx:Tree id=treeControl width=100% right=-1 left=-1 bottom=-1
top=44 borderAlpha=0.75 dataProvider={treeData}
 render=treeControl_renderHandler(event)/
/mx:VBox

/s:Application

-
--
Regards,
Yogesh Patil.

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


Re: [SPAM] [flexcoders] Component Data Calls

2010-02-22 Thread David Adams
On Mon, Feb 15, 2010 at 3:28 AM, Dan Pride danielpr...@yahoo.com wrote:

   Thank you for your answer.
 Question if you would, I have been asking it everywhere and get NO
 satisfactory answers.
 How to approach a multi-windowed application, particurarly in FB4?
 1) Different Urls?
 2) ViewStacks?
 3) States?
 4) ViewStacks of States (Master-Detail in one ViewStack as two states)?
 5) Do States initialize in Flash Builder 4? I had heard they do not?


Dan,

You might like the following video from near the end of Adobe's Learn Flex
in a Week training:

http://www.adobe.com/devnet/flex/videotraining/xml/vid41.html

It's a pretty nice, simple example of building and then lazy-loading a
module only once (and if) it's needed.


Re: [flexcoders] Bitmap width/height 0 when loading image from hard drive

2010-02-22 Thread Aaron Hardy
And yet another update.  Sorry for the large number of emails.  It looks
like the more and more I use the application and add stress to the Flash
Player the smaller the image must be in order to avoid the 0 dimensions
issue.  In other words, if the Flash Player doesn't have much stress I can
load an image that's 24 million pixels just fine.  As I add more stress and
then attempt to load the same image, I'll start to get 0 width and height,
but I'll be able to load a 14 million pixel image (4350x3263=14.1 million
pixels) just fine.  If I continue adding stress to the Flash Player and I
continue to load the same 14 million pixel image I'll start to get 0 width
and height for that image, even if it's under the bitmap limits.  At that
point I can load a 12 million pixel image fine.  If I continue to use the
app and add stress, I'll soon not be not even be able to load the same 12
million pixel image.  This imaginary limit seems to get smaller and smaller
over time and has very little, if anything, to do with Flash's max bitmap
dimensions.

Aaron

On Mon, Feb 22, 2010 at 5:12 PM, Aaron Hardy aaronius...@gmail.com wrote:

 I've gathered additional information.  It appears that it's due to bitmaps
 that are over the supported size (16,777,215 pixels).  While the bitmaps
 load in fine when the Flash Player isn't under much stress, the width/height
 choke when there is stress.  Again, it isn't consistent, but that seems to
 be the issue.  I read somewhere that when loading a bitmap in using Loader
 that the maximum dimensions didn't apply, but that appears to not be the
 case and from Adobe I've only heard that all bets are off with bitmaps over
 16,777,215 pixels.

 I'll update the thread if it turns out to be something different.

 Aaron


 On Mon, Feb 22, 2010 at 4:28 PM, Aaron Hardy aaronius...@gmail.comwrote:

 It's not any particular photo or set of photos.  Sometimes we can run the
 app and load the photos just fine then the next day we'll attempt to load
 the same files and the width/height will return 0.  It seems that once the
 issue starts to occur that any time we try to upload any photo within that
 session it continues reporting width/height of 0. There's not a very
 reproducible pattern though it seems to occur more frequently when the Flash
 Player is under heavy stress like when it's trying to load in many files at
 the same time.  It also seems to happen more frequently if we have two tabs
 open with the same application loaded in both and we're attempting to load
 the same images in both tabs (this may be related to the stress the Flash
 Player is under rather than some sort of file locking issue).  Again, it
 doesn't always happen, just more frequently under those scenarios.  We've
 created a queue so only one photo is loading in at a time and we even threw
 in the Grant Skinner hack of forcing garbage collection between each load to
 see if that would help.  That did actually decrease the frequency of the
 issue quite a bit but not sufficiently.

 Since posting we've tweaked the code slightly to use the width/height
 properties on the bitmapdata instead of the bitmap itself.  I doubt it will
 make any difference but at least it narrows it down a bit.

 Aaron


 On Mon, Feb 22, 2010 at 1:05 PM, Alex Harui aha...@adobe.com wrote:



 Is there a particular file that gives you trouble or wil it load
 successfully at some other point?



 On 2/22/10 10:06 AM, Aaron Hardy aaronius...@gmail.com wrote:






 Flexers,

 We have an app that allows a user to upload images.  When the user
 selects an image, we load the bitmap from the hard drive and create a
 thumbnail from it.  However, every once in a while the bitmap will return 0
 for both width and height which causes issues later on.  That vast majority
 of the time the width/height are returned correctly.

 Here's the basic code of the image loading--it's nothing special:

 

 override public function execute():void
 {
 file.addEventListener(Event.COMPLETE, fileLoadedHandler);
 file.addEventListener(IOErrorEvent.IO_ERROR,
 fileLoadErrorHandler);
 file.load();
 }

 /**
  * The files bytes were loaded successfully.
  */
 protected function fileLoadedHandler(event:Event):void
 {
 file.removeEventListener(Event.COMPLETE, fileLoadedHandler);
 file.removeEventListener(IOErrorEvent.IO_ERROR,
 fileLoadErrorHandler);

 var ba:ByteArray = file.data;
 loader = new Loader();
 loader.contentLoaderInfo.addEventListener(Event.COMPLETE,
 bitmapLoadedHandler);
 loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR,
 bitmapLoadFailedHandler);
 loader.loadBytes(ba);
 }


 /**
  * The bitmap was successfully loaded from the file's bytes.
  */
 protected function bitmapLoadedHandler(event:Event):void
   

[flexcoders] Interaction with Content behind Transparent Flex App

2010-02-22 Thread Karthik Kailash
Hi,

 

I have a Flex application with wmode=transparent and a transparent section
that allows whatever is underneath it on the HTML page to show through.  In
this case, what's showing through is another Flash application.  This works
fine, but I can't interact with the Flash application showing through.

 

I tried setting the z-index of the Flash app to something greater than my
Flex app, and that worked, but unfortunately that solution doesn't work for
my case because the Flex application has components that occasionally
overlay in that area, and setting the z-index of the Flash app to be higher
means those components are always stuck behind it.  Also unfortunately I
don't control the loading of that Flash app, so I can't load/embed it into
my app to get around this problem.

 

Are there any other ways to do this?

 

Cheers,

Karthik

 

Karthik Kailash | Product

SocialVision, Online Television Becomes a Social Experience

CELL . 408.768.7704  | WEB . www.socialvisioninc.com | FACEBOOK .
facebook.com/socialvision http://www.facebook.com/socialvision  | TWITTER
. twitter.com/socialvision

 



Re: [SPAM] [flexcoders] Component Data Calls

2010-02-22 Thread Dan Pride
Thanks Dave, the word I seem to be getting lately is that the modules tend to 
be a bit buggy at the moment. Decided to go with the old reliable viewstacks 
and change urls if I have too. There seem to be so many different ways to 
approach this issue, someone should write a book on it. I know I would buy it.
:)
Dan Pride


--- On Mon, 2/22/10, David Adams dpad...@gmail.com wrote:

From: David Adams dpad...@gmail.com
Subject: Re: [SPAM] [flexcoders] Component Data Calls
To: flexcoders@yahoogroups.com
Date: Monday, February 22, 2010, 7:23 PM







 



  



  
  
  

On Mon, Feb 15, 2010 at 3:28 AM, Dan Pride danielpride@ yahoo.com wrote:

















 Thank you for your answer.
Question if you would, I have been asking it everywhere and get NO satisfactory 
answers.


How to approach a multi-windowed application, particurarly in FB4?
1) Different Urls?
2) ViewStacks?
3) States?
4) ViewStacks of States (Master-Detail in one ViewStack as two states)?
5) Do States initialize in Flash Builder 4? I had heard they do not?



Dan,
You might like the following video from near the end of Adobe's Learn Flex in 
a Week training:


http://www.adobe. com/devnet/ flex/videotraini ng/xml/vid41. html
It's a pretty nice, simple example of building and then lazy-loading a module 
only once (and if) it's needed.









 





 



  






  

Re: [SPAM] [flexcoders] Component Data Calls

2010-02-22 Thread David Adams
On Tue, Feb 23, 2010 at 12:52 PM, Dan Pride danielpr...@yahoo.com wrote:



 There seem to be so many different ways to approach this issue, someone
 should write a book on it. I know I would buy it.


So would I.


Re: [flexcoders] issue related to embedding a linkbar within a tabnavigator

2010-02-22 Thread Peeyush Tuli
try placing a debug point in the set style method of the linkbar class and
investigate.
Also check the set styleChanged method. I suspect an inherited style might
be a causing a problem here.

On Mon, Feb 22, 2010 at 2:42 PM, sharath reddy sharathre...@yahoo.comwrote:



 Hi,

 We have a TabNavigator in our app, and we wanted to display a few links on
 the right of the Tab bar. I created a custom TabNavigator by extending it,
 and do the following:
 1. over-ride 'createChildren', create my LinkBar
 2. over-ride 'updateDisplayList', position my LinkBar to show up on the
 right of the Tab bar.

 The only problem is, I am trying to set the color of the separator:

 linkBar = new LinkBar();
 linkBar.setStyle(separatorColor, ..);

 This does not seem to have any effect. On a stand-alone LinkBar(), this
 works just fine

 Any ideas? Thanks for the help!

 Regards,
 Sharath

  



Re: [SPAM] [flexcoders] Component Data Calls

2010-02-22 Thread Dan Pride
Wait a minute...
After that very excellent book you wrote on 4D,... we are NOT going to get a 
command performance for Flash Builder?
I am dissappointed.
Dan

--- On Mon, 2/22/10, David Adams dpad...@gmail.com wrote:

From: David Adams dpad...@gmail.com
Subject: Re: [SPAM] [flexcoders] Component Data Calls
To: flexcoders@yahoogroups.com
Date: Monday, February 22, 2010, 9:57 PM







 



  



  
  
  

On Tue, Feb 23, 2010 at 12:52 PM, Dan Pride danielpride@ yahoo.com wrote:

















 



  



  
  
  There seem to be so many different ways to approach this issue, someone 
should write a book on it. I know I would buy it.



So would I.



 





 



  






  

[flexcoders] Re: Compile Error Under 3.5a but not 3.4

2010-02-22 Thread mitek17
Thanks, Peeyush!
I will try to re-create the workspace.

Cheers,
Dmitri.

--- In flexcoders@yahoogroups.com, Peeyush Tuli peeyus...@... wrote:

 That is definitely not a bug in 3.5a. I have been using 3.5 for the past
 week without any such issues. But I have been having this problem on and off
 for around 3 years since flex builder 2. As far as I can recall, recreating
 your workspace in  different location might be helpful since FB does a lot
 of caching in the workspace folders which might interfere with your sdk
 upgrade.
 
 On Mon, Feb 22, 2010 at 8:08 AM, mitek17 mite...@... wrote:
 
 
 
  Seems like Adobe screwed up namespaces in 3.5
 
  Here is the bug I filed in regards to DesignView not understanding mx
  namespace for components.
  https://bugs.adobe.com/jira/browse/FB-25994
 
  I wonder if *anyone* uses 3.5 SDK. I did 3 attempts to migrate from 3.4 and
  they all failed.
 
  PS Probably Adobe needs more spanking from Steve Jobs :)
 
  Cheers,
  Dmitri.
 
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
  mcaplan_labnet mcaplan@ wrote:
  
   Hi There,
  
   I'm unsure what is going on, but I can't compile my project under 3.5.
  Works fine under 3.4. I get the following errors in 3.5:
  
   Encountered errors or warnings while building project Alloys.mxml.
   Alloys.mxml: Invalid component name 'modules.Alloys': component name must
  be legal ActionScript class name.
   Encountered errors or warnings while building project Case.mxml.
   Case.mxml: Invalid component name 'modules.Case': component name must be
  legal ActionScript class name.
  
  
   Any ideas?
  
   Thanks,
  
   Mike
  
 
   
 





Re: [flexcoders] Bitmap width/height 0 when loading image from hard drive

2010-02-22 Thread Alex Harui
How much process memory is the browser using when you run into trouble?

How many images have you loaded?

How many of those images are still around?


On 2/22/10 4:48 PM, Aaron Hardy aaronius...@gmail.com wrote:






And yet another update.  Sorry for the large number of emails.  It looks like 
the more and more I use the application and add stress to the Flash Player the 
smaller the image must be in order to avoid the 0 dimensions issue.  In other 
words, if the Flash Player doesn't have much stress I can load an image that's 
24 million pixels just fine.  As I add more stress and then attempt to load the 
same image, I'll start to get 0 width and height, but I'll be able to load a 14 
million pixel image (4350x3263=14.1 million pixels) just fine.  If I continue 
adding stress to the Flash Player and I continue to load the same 14 million 
pixel image I'll start to get 0 width and height for that image, even if it's 
under the bitmap limits.  At that point I can load a 12 million pixel image 
fine.  If I continue to use the app and add stress, I'll soon not be not even 
be able to load the same 12 million pixel image.  This imaginary limit seems to 
get smaller and smaller over time and has very little, if anything, to do with 
Flash's max bitmap dimensions.

Aaron

On Mon, Feb 22, 2010 at 5:12 PM, Aaron Hardy aaronius...@gmail.com wrote:
I've gathered additional information.  It appears that it's due to bitmaps that 
are over the supported size (16,777,215 pixels).  While the bitmaps load in 
fine when the Flash Player isn't under much stress, the width/height choke when 
there is stress.  Again, it isn't consistent, but that seems to be the issue.  
I read somewhere that when loading a bitmap in using Loader that the maximum 
dimensions didn't apply, but that appears to not be the case and from Adobe 
I've only heard that all bets are off with bitmaps over 16,777,215 pixels.

I'll update the thread if it turns out to be something different.

Aaron


On Mon, Feb 22, 2010 at 4:28 PM, Aaron Hardy aaronius...@gmail.com wrote:
It's not any particular photo or set of photos.  Sometimes we can run the app 
and load the photos just fine then the next day we'll attempt to load the same 
files and the width/height will return 0.  It seems that once the issue starts 
to occur that any time we try to upload any photo within that session it 
continues reporting width/height of 0. There's not a very reproducible pattern 
though it seems to occur more frequently when the Flash Player is under heavy 
stress like when it's trying to load in many files at the same time.  It also 
seems to happen more frequently if we have two tabs open with the same 
application loaded in both and we're attempting to load the same images in both 
tabs (this may be related to the stress the Flash Player is under rather than 
some sort of file locking issue).  Again, it doesn't always happen, just more 
frequently under those scenarios.  We've created a queue so only one photo is 
loading in at a time and we even threw in the Grant Skinner hack of forcing 
garbage collection between each load to see if that would help.  That did 
actually decrease the frequency of the issue quite a bit but not sufficiently.

Since posting we've tweaked the code slightly to use the width/height 
properties on the bitmapdata instead of the bitmap itself.  I doubt it will 
make any difference but at least it narrows it down a bit.

Aaron


On Mon, Feb 22, 2010 at 1:05 PM, Alex Harui aha...@adobe.com wrote:





Is there a particular file that gives you trouble or wil it load successfully 
at some other point?



On 2/22/10 10:06 AM, Aaron Hardy aaronius...@gmail.com 
http://aaronius...@gmail.com  wrote:






Flexers,

We have an app that allows a user to upload images.  When the user selects an 
image, we load the bitmap from the hard drive and create a thumbnail from it.  
However, every once in a while the bitmap will return 0 for both width and 
height which causes issues later on.  That vast majority of the time the 
width/height are returned correctly.

Here's the basic code of the image loading--it's nothing special:



override public function execute():void
{
file.addEventListener(Event.COMPLETE, fileLoadedHandler);
file.addEventListener(IOErrorEvent.IO_ERROR, fileLoadErrorHandler);
file.load();
}

/**
 * The files bytes were loaded successfully.
 */
protected function fileLoadedHandler(event:Event):void
{
file.removeEventListener(Event.COMPLETE, fileLoadedHandler);
file.removeEventListener(IOErrorEvent.IO_ERROR, 
fileLoadErrorHandler);

var ba:ByteArray = file.data;
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, 
bitmapLoadedHandler);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, 

RE: [flexcoders] Strategies for switching between testing and deployment addresses

2010-02-22 Thread Tracy Spratt
Or pass the IP address in via flashvars from the wrapper.  You just need one
wrapper for production and one for development.

 

Tracy Spratt,

Lariat Services, development services available

  _  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Peeyush Tuli
Sent: Monday, February 22, 2010 6:47 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Strategies for switching between testing and
deployment addresses

 

  

you can always read the ip address from an  xml file at application startup
and bind your service to it..

On Mon, Feb 22, 2010 at 6:30 AM, David Adams dpad...@gmail.
mailto:dpad...@gmail.com com wrote:

  

I've been writing some small programs that use HTTPService calls to
fetch data from a back-end. During testing, I'm using 127.0.0.1 or an
IP address on my subnet. When I deploy, I update the IP address in
service definitions to the right external address and build the app.
Or at least I mean to. It's all too easy to accidentally change the
addresses for internal testing and then forget to switch them back
before building.

Is there a best practice or simple strategy for putting the IP address
somewhere outside of the source code that it can easily be edited
without a rebuild?

Thanks for any advice.

 





[flexcoders] Streaming videos

2010-02-22 Thread chandruflex
Hi,

I am using Amazon CloudFront that uses Adobe Flash Media Server to stream flv 
files.

In my Flex Application, I am using the VideoDisplay component. This component 
has a autoBandWidthDetection property. The documentation says that, if I set 
this property to a value of true, I have to write a Server-side ActionScript 
file - main.asc, writing in some essential functions.

What I do not know is, where I should place this main.asc file in Amazon 
CloudFront. Does anybody have some idea related to this?

-Kumar



Re: [flexcoders] Streaming videos

2010-02-22 Thread p...@vin Uttarwar
Hi,
As far as my knowledge is concern the main.asc file is related to Flash
Media Server,
and we need to deploy this file on this server only.
Amazon support there in built streaming and does not provide any faciliity
of FMS server.


Thanks  Regards,

Pravin Uttarwar | Perennial Systems
pravin.uttar...@perennialsys.com | Cell: +91 9371288080 | Tel: +91 (020)
2421 1286 Ext:2007


On 23 February 2010 11:57, chandruflex chandruf...@yahoo.com wrote:



 Hi,

 I am using Amazon CloudFront that uses Adobe Flash Media Server to stream
 flv files.

 In my Flex Application, I am using the VideoDisplay component. This
 component has a autoBandWidthDetection property. The documentation says
 that, if I set this property to a value of true, I have to write a
 Server-side ActionScript file - main.asc, writing in some essential
 functions.

 What I do not know is, where I should place this main.asc file in Amazon
 CloudFront. Does anybody have some idea related to this?

 -Kumar