[flexcoders] Re: Different approaches to Cairngorm view updates

2007-12-08 Thread mydarkspoon
Yes, it's even mentioned on Derrick's article, but it's just like
using binding, ChangeWatcher, only with compile time checking for
property's name.
On the bottom line, it requires the view to know more than it should.
Both approaches seems to solve it, but I'd like to see what other
people than me think of each...

Cheers,

Almog Kurtser.
http://www.kaltura.com

--- In flexcoders@yahoogroups.com, Richard Rodseth [EMAIL PROTECTED] wrote:

 Have you looked into the Observe tag?
 
 On Dec 7, 2007 4:28 PM, mydarkspoon [EMAIL PROTECTED] wrote:
 
Hi,
 
  I'm still new to cairngorm, and like almost everyone bumped into
  issues concerning updating the view when binding to the model won't be
  enough.
 
  I ran across 2 main approaches:
  1. Derrick Grigg / Firemoss - use a view controller which listens to
  the CairngormEventDispatcher and dispatches his own view events which
  causes the view to react:
 
 
http://www.dgrigg.com/post.cfm/04/12/2007/Cairngorm-Commands-Views-and-Harikiri
 
 
http://www.firemoss.com/blog/index.cfm?mode=entryentry=A6A76F5E-3048-55C9-4301E81D24A361B6
 
  2. Thomas Burleson - Thomas suggested that the view would send a proxy
  responder attached to the CairngormEvent. when the command's result()
  method is invoked by the business delegate, the command would simply
  call the proxy responder's onResult() / onFault() which in turn will
  invoke a call back function on the view which will response by
  changing the view:
 
http://www.thomasburleson.biz/2007/06/cairngorm_view_notifications.html
 
  I can't decide which approach is better. in terms of mvc, both keeps
  the separation, both can be extended and re-used with different views
  and also both requires an extra event to code.
  I also read Thomas talk-back on Derrick's blog, but that also left me
  with no insight...
 
  Before I pick one with no real understanding of the outcome, I'd like
  to hear what you think is the better one, also if you know any other
  approach beside model-binding which I try to use as much as possible
  but that just won't always work, then I'd be happy to hear about it.
 
  Thanks in advance,
 
  Almog Kurtser,
  http://www.kaltura.com
 
   
 





[flexcoders] How much can AIR and the OS interact?

2007-12-08 Thread justSteve
I'm looking for an overview:

Can AIR apps interact with services running locally? For example,
could I create a .net DLL that permitted interaction with the
clipboard at the native OS level?

thx
--steve...


[flexcoders] Re: programatically deselect cells in an AdvancedDataGrid (bump)

2007-12-08 Thread superabe superabe
On Dec 7, 2007 5:59 AM, superabe superabe [EMAIL PROTECTED] wrote:

 Anybody know how to programmatically deselect cells, in an
 AdvancedDataGrids (Flex 3 Beta2). ?

 I can successfully use the selectedCells property of the ADG, with
 selectionMode set to multipleCells to select cells programmatically.
 I cannot however seem to find a convenient way to deselect them. (without
 having to subclass the ADG)

 I have tried the following unsuccessfully :

 this.grid.selectedCells = new Array({rowIndex:-1, columnIndex:-1});
 this.grid.selectedCells = new Array();
 this.grid.selectedCells = null;

 TIA,
 - superabe



[flexcoders] Use browser's function keys (F1,F5,F11 etc) for your Flex web-application

2007-12-08 Thread flex.fusion
Hi Guys,

I want to provide keyboard support for my web-application. For normal 
keys I do not have any problem. 

But mainly I have 2 problems with flex implementation part:

1. I am unable to fire events on function keys. i.e. F1,F5 etc. I will 
appriciate any help from you guys. How can I block all of the browser 
events? 
If I will have to create some javascript for that, where shall I place 
javascript and how shall I call it from my .mxml or .as files?

Note: I just want to block browser events and fire my own events, not 
to kill them :).

2. I noticed that when I move from one window to another window, my 
focus is lost and keyDownEvents does not support anymore untill I 
click anywhere in application. 

Even When the application is loaded for first time, we need to click 
in order to get the keDownEvent work. So that is how flex-applications 
work? Do we have any solution for these kind of focus problems?

I came to know two ways those are:
 application.addEventListener(); and this.stage.addEventListener(); 
so what is main difference between these two and which one is mroe 
preferable? Please let me know.

Thanks  Regards,
Savan



RE: [SPAM] [flexcoders] Re: Loading Web Service from WebSphere

2007-12-08 Thread Randy Martin
My suggestion is that you use FB3 beta 2 and use the WSDL wizard to generate
the classes necessary to use the webservice. I did this for two of our
webservices, and I had to do only minor tweaks of the generated code to get
it to work flawlessly. Pick from the menu in FB or Eclipse, Data | Import
Web Service (WSDL) ..., then be sure you pick the SOAP 1.1 port in the
wizard. The wizard does not support SOAP 1.2 yet.
 
~randy


   _  

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of dafox_82
Sent: Saturday, December 08, 2007 9:46 AM
To: flexcoders@yahoogroups.com
Subject: [SPAM] [flexcoders] Re: Loading Web Service from WebSphere



Nobody with some helpful tips?

--- In HYPERLINK
mailto:flexcoders%40yahoogroups.com[EMAIL PROTECTED], dafox_82
[EMAIL PROTECTED] wrote:

 I'm playing around with Flex and want to call a custom made Web Service
 in WebSphere.
 
 When I run my application, It seems that a lot of requests are done to
 the Web Service repeatably requesting the same XSD's (complex types). It
 looks like the application is in an infinite loop, constantly doing the
 same requests.. No call the the web service is made yet at this point.
 
 If I call the requested XSD manually in my browser, it is resolved
 without problems.
 And if I call another very simple web service, everything is working as
 expected.
 
 My Web Service definition looks like this:
 
 mx:WebService
 id=CALS
 

wsdl=HYPERLINK
http://localhost:9080/CustomerModuleWeb/sca/CustomerDataServiceExphttp://l
ocalhost:-9080/CustomerMod-uleWeb/sca/-CustomerDataServ-iceExp\

ort/wsdl/CustomerDa-taServiceExport_-CustomerDataServ-iceHttp_Service.-wsdl

HYPERLINK
http://localhost:9080/CustomerModuleWeb/sca/CustomerDataServiceExport/whtt
p://localhost:-9080/CustomerMod-uleWeb/sca/-CustomerDataServ-iceExport/-w\
 sdl/CustomerDataSer-viceExport_-CustomerDataServ-iceHttp_Service.-wsdl 
 

endpointURI=-HYPERLINK
http://localhost:9080/CustomerModuleWeb/sca/CustomerDataSerhttp://localhos
t:-9080/CustomerMod-uleWeb/sca/-CustomerDataSer\
 viceExport
 HYPERLINK
http://localhost:9080/CustomerModuleWeb/sca/CustomerDataServiceExporthttp:
//localhost:-9080/CustomerMod-uleWeb/sca/-CustomerDataServ-iceExport
 
 service=CustomerDa-taServiceExport_-CustomerDataServ-iceHttpService
 port=CustomerDataS-erviceExport_-CustomerDataServ-iceHttpPort
 useProxy=false
 showBusyCursor=-true
 fault=Alert.-show(event.-fault.faultStrin-g), 'Error'
 mx:operation name=findAll-
 mx:request
 customerRequest
 Customer
 CustNo16/-CustNo
 Group/Group
 /Customer
 /customerRequest
 /mx:request
 /mx:operation
 /mx:WebService
 
 I'm using Flex Builder 3, Beta (also tried Flex Builder 2, hotfix3)
 
 What is going wrong here???




 


No virus found in this outgoing message.
Checked by AVG. 
Version: 7.5.503 / Virus Database: 269.16.17/1177 - Release Date: 12/7/2007
1:11 PM
 


Re: [flexcoders] Re: Sorting problem on date and numbers with null values, I think

2007-12-08 Thread George
[personal thoughts]
Working on Flex projects you have to overcome some 'bug' troubles 
yourself. Adobe developers couldn't has enough time to help everybody to 
find solutions, they have to work for tasks depending on priority like 
all software development teams.

Nothing can be perfect we have to trade-off. Performance can be a 
problem, but if there's a performance problem, you can still change your 
interface design to make it more acceptable for end users.

Your developers are lucky to work with you even don't have to waste time 
for sorting functions. I have to find trade-off solutions more than 
these small tasks, even have to think about how to change interface, and 
defend for myself. End users and bosses wouldn't care where's the 
problem, what they know is if there's a problem, it's my problem, I have 
to fix it or make it better at least.

For SDK code itself, I think we should let Adobe developers to judge 
whether it's a simple fix or not. They could have reasons we wouldn't know.

George



aceoohay wrote:
 
 
 The good news is I believe that the folks at Adobe are convinced this
 is a bug.
 
 The bad news is I was told that they aren't going to fix it anytime
 soon, what with the new release coming out and the fact that there is
 an easy workaround and all.
 
 opinion
 It is my opinion, after looking at the code that generates the error,
 it would be a relatively simple fix. I believe that all that would be
 needed is in the routine that determines the data type to sort on it
 should ignore nulls. As it loops through the column to find the data
 type should it find no non-null elements, it doesn't need to sort
 anything.
 
 The only performance impact would be on columns that contain lots of
 nulls, but I would rather have my users wait a few milliseconds
 rather than get an error, or have my developers waste time adding
 sort handlers for each column in each datagrid. Also I am sure that
 the sort handlers have a substantial performance impact at runtime.
 
 What I am trying to say is I believe that Adobe has made a mistake in
 offloading a significant amount of work onto developers, and has a
 poorer product, when with a small effort they can solve the problem.
 /opinion
 
 Paul
 



[flexcoders] Scale 9 Issues

2007-12-08 Thread polestar11
Hi there

We are trying to skin our app and have added skins for ComboBoxes and
Scrollbars. We have scale-9 set on the skin symbols for the arrow
buttons but for some reason it is not being picked up in our Flex app.
I have looked at the default AeonGraphical theme  seen that the right
side scale-9 for the ComboBoxArrow_editableUpSkin is set far to the
right, completely off the button. 

I've tried various cases of scale-9, like in the AeonGraphical theme 
how scale-9 should work, setting the scale area to exclude the arrow
portion of the drop-down button.

I have also tried explicitly setting the scale-9 in the .css, also to
no avail.

Cheers
Tracy



Re: [flexcoders] How much can AIR and the OS interact?

2007-12-08 Thread hank williams
 I'm looking for an overview:

  Can AIR apps interact with services running locally? For example,
  could I create a .net DLL that permitted interaction with the
  clipboard at the native OS level?


No. You cannot access DLLs.

Hank


[flexcoders] Re: Debugging code

2007-12-08 Thread aceoohay
I don't know how to say this gently, and perhaps I am wrong, but

I don't think many folks here have the time or inclination to read 
through an entire program and debug it. Based on a quick read of the 
problems, it appears that you are having 4 issues some of which seem 
to be fundemental problems.

If you were to post specific individual questions that are succinctly 
defined with small code snippets, you may have a better chance of 
getting answers than just saying here is a program, these things 
don't work would someone fix them.

I may be wrong, and if I am, I am sure I will be told so...

Paul

--- In flexcoders@yahoogroups.com, markcavins [EMAIL PROTECTED] 
wrote:

 Hello everyone,
 
 I have been working on this little project and it is almost complete
 but I am running into some problems
 
 I will show you the code.
 
 [CODE]
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
 layout=absolute backgroundGradientAlphas=[1.0, 1.0]
 backgroundGradientColors=[#040404, #040404]
   initialize=getDaysUntil()
 mx:XML id=tempXML
 source=http://misitenet/interface.php?
username=adminamp;password=passamp;customer=63amp;action=showopena
mp;operation=defectsamp;format=xmlamp;critcal=both
 /
 
 mx:Image source=@Embed('../images/title.jpg') width=210
 height=65 top=4 left=15/
   mx:Image source=@Embed('../images/title1.jpg') id=image1
 horizontalAlign=right verticalAlign=top right=0
 scaleContent=true y=0/
   
   mx:states
   mx:State name=Logged In
   mx:SetProperty target={panel1} 
name=width value=98%/
   mx:SetProperty target={panel1} 
name=height value=75%/
   mx:RemoveChild target={password}/
   mx:RemoveChild target={customer}/
   mx:RemoveChild target={username}/
   mx:RemoveChild target={customerlbl}/
   mx:RemoveChild target={label1}/
   mx:RemoveChild target={Submit}/
   mx:RemoveChild target={label2}/
   mx:SetProperty target={panel1} 
name=title value=Current Red
 Board Information/
   mx:AddChild relativeTo={panel1} 
position=lastChild
 
 
 mx:TileList dataProvider={tempXML.defect.asset}
 width=100% backgroundColor=#00 color=#ff fontSize=27
 borderColor=#00 columnWidth=300 rowHeight=50
 themeColor=#808080 fontWeight=bold 
allowMultipleSelection=true /
 mx:XMLListCollection id=defectXMLList 
source={tempXML.defect} /
   
 mx:Script
   ![CDATA[
   
 
private function getDaysUntil():void {
   // creates a new five-minute Timer
   var minuteTimer:Timer = new Timer(1000, 300);
 
 // designates listeners for the interval and completion 
events
minuteTimer.addEventListener(TimerEvent.TIMER, onTick);
minuteTimer.addEventListener(TimerEvent.TIMER_COMPLETE,
 onTimerComplete);
 
 // starts the timer ticking
minuteTimer.start();
 
   }
   
   public function onTick(evt:TimerEvent):void {
   var minuteTimer:Timer = evt.target as Timer;
   lblTimeUntil.text = minuteTimer.currentCount.toString
();
   }
   
 public function onTimerComplete(evt:TimerEvent):void
 {
   var minuteTimer:Timer = evt.target as Timer;
   minuteTimer.reset();
 
   minuteTimer.start();
 }
 
 
 
 
 
   ]]
   /mx:Script
   /mx:AddChild  
   mx:AddChild relativeTo={panel1} position=lastChild

   mx:HBox horizontalGap=4 width=800 
   mx:Label id=lblTimeUntilRefresh text=Current Time:
 color=#ff fontSize=19 fontWeight=bold /
   mx:Label id=lblTimeUntil color=#ff fontSize=22
 fontWeight=bold toolTip=Page refreshes every 300 seconds
 fontFamily=Arial width=300/
   /mx:HBox  
   /mx:AddChild  
   /mx:State
   /mx:states
   
   
   mx:Script
   ![CDATA[
   import mx.rpc.events.ResultEvent;
   
   ]]
   /mx:Script
   
   
   mx:Script
   
 
 ![CDATA[
 
 private function checkLogin(evt:ResultEvent):void
 {
 
   if(evt.result.code == 200)
 
   {
 
   mx.controls.Alert.show('The page is not responding please try 
again');
 
   }
 
   if(evt.result.code == 108)
 
   {
   
   mx.controls.Alert.show('Invalid customer 
code/username/password');
 
   }   
   
   
   if(evt.result.code == 104)
 
   {
   
   mx.controls.Alert.show('The page is not responding 
please try again');
 
   }else{
   
   currentState = Logged In;
   

Re: SPAM-LOW: Re: [flexcoders] How much can AIR and the OS interact?

2007-12-08 Thread Jeffry Houser

  WebORB offers this functionality:

  http://www.themidnightcoders.com/blog/2007/07/weborb-air-edition.html

  However, if you're going to tie yourself into Windows anyway, perhaps 
WPF is a better solution?

hank williams wrote:
 
 
   I'm looking for an overview:
  
   Can AIR apps interact with services running locally? For example,
   could I create a .net DLL that permitted interaction with the
   clipboard at the native OS level?
  
 
 No. You cannot access DLLs.
 
 Hank



-- 
Jeffry Houser, Technical Entrepreneur, Software Developer, Author, 
Recording Engineer
AIM: Reboog711  | Phone: 1-203-379-0773
--
My Company: http://www.dot-com-it.com
My Podcast: http://www.theflexshow.com
My Blog: http://www.jeffryhouser.com



[flexcoders] Re: Sorting problem on date and numbers with null values, I think

2007-12-08 Thread aceoohay
The good news is I believe that the folks at Adobe are convinced this 
is a bug.

The bad news is I was told that they aren't going to fix it anytime 
soon, what with the new release coming out and the fact that there is 
an easy workaround and all.

opinion
It is my opinion, after looking at the code that generates the error, 
it would be a relatively simple fix. I believe that all that would be 
needed is in the routine that determines the data type to sort on it 
should ignore nulls. As it loops through the column to find the data 
type should it find no non-null elements, it doesn't need to sort 
anything.

The only performance impact would be on columns that contain lots of 
nulls, but I would rather have my users wait a few milliseconds 
rather than get an error, or have my developers waste time adding 
sort handlers for each column in each datagrid. Also I am sure that 
the sort handlers have a substantial performance impact at runtime.

What I am trying to say is I believe that Adobe has made a mistake in 
offloading a significant amount of work onto developers, and has a 
poorer product, when with a small effort they can solve the problem.
/opinion

Paul

--- In flexcoders@yahoogroups.com, aceoohay [EMAIL PROTECTED] wrote:

 I agree that you cannot tell what type of data a null is. 
 
 The sort routine(s) has no problem sorting nulls when the non-null 
 data is string. It also works for completely null columns. 
 
 I think a reasonable solution would be a new column 
 attribute, sortDataType (values: ascii, number, date) for 
datagrid 
 columns. If you wanted to go crazy, add another 
 attribute, nullCollateOrder (values: low, high). Modifying the 
 existing sort routines to handle nulls should be fairly trivial. 
This 
 may improve performance for columns where these attributes are 
 specified since the routine doesn't need to read data to determine 
 the type of sort to perform.
 
 A different approach might be an attribute nvl(value), where any 
 nulls would be converted to the value specified. Examples might be 
nvl
 (0), nvl(9), nvl(01/01/0001), or nvl(12/31/5600)
 
 I realize I must deal with the here and now, so how would you write 
a 
 generic function to hande this? 
 
 It is my understanding that the sortCompareFunction wants a 
function 
 like mySort(obj1:Object,obj2:Object). obj1 and obj2 are two 
objects  
 that represent two rows, and to access the column to compare you 
need 
 to know the property such as obj1.myDate, or obj[4]. In order to 
 write a generic routine I need to know know what column has been 
 clicked.
 
 Paul
 
 --- In flexcoders@yahoogroups.com, Alex Harui aharui@ wrote:
 
  because null can be assigned to anything is does not have 
a type 
 so we
  can't tell by examining the data if you want to sort by date, 
 number,
  etc.
   
  Where do you want nulls to appear in a sort?  Could go anywhere 
 right?
  That's why you'll have to write your own compare function with 
the 
 null
  handling rules you want.
   
  I haven't tried writing a generic compare function, but I don't 
see 
 why
  it wouldn't be possible.
  
  
  
  From: flexcoders@yahoogroups.com 
 [mailto:[EMAIL PROTECTED] On
  Behalf Of aceoohay
  Sent: Friday, November 30, 2007 1:15 PM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] Re: Sorting problem on date and numbers 
with 
 null
  values, I think
  
  
  
  The data is fully populated at the time the column header is 
  clicked. However some of the cells are null.
  
  We certainly disagree on this:-) 
  
  Since a null is a valid result for all data types, it seems to me 
  that any sort algorithm should handle the universe of valid data 
  elements for that type. 
  
  Additionally there appears to be no way to write a generic 
  sortCompareFunction handler that will handle any column from any 
  datagrid. If this is true then the developer needs to decide what 
  type of data is being stored in each column, can nulls ever exist 
 in 
  this column and then write a custom sort routine for that column.
  
  If in fact Flex cannot sort columns with nulls, and every column 
  that could contain a null requires the developer to write a 
 separate 
  custom sort handler, I think that serious shortcoming is a 
polite 
  way of stating the issue.
  
  Is there a way of working around this feature?
  
  Paul
  --- In flexcoders@yahoogroups.com mailto:flexcoders%
 40yahoogroups.com
  , Alex Harui aharui@ wrote:
  
   Well, I don't see it as a shortcoming that we default to 
 efficient 
  sort
   algorithms that assume that all values are of the same type. 
  Seems like
   all you need is a comparefunction for dates and one for numbers 
 and
   assign the correct function to the appropriate column. Also 
note 
  that
   if you sort with nulls for data that hasn't arrived yet, you'll 
  probably
   have to re-sort as the data arrives. The collections generally 
  wait
   until all data has arrived to do the sort 

[flexcoders] Re: Loading Web Service from WebSphere

2007-12-08 Thread dafox_82
Nobody with some helpful tips?

--- In flexcoders@yahoogroups.com, dafox_82 [EMAIL PROTECTED] wrote:

 I'm playing around with Flex and want to call a custom made Web Service
 in WebSphere.
 
 When I run my application, It seems that a lot of requests are done to
 the Web Service repeatably requesting the same XSD's (complex types). It
 looks like the application is in an infinite loop, constantly doing the
 same requests.. No call the the web service is made yet at this point.
 
 If I call the requested XSD manually in my browser, it is resolved
 without problems.
 And if I call another very simple web service, everything is working as
 expected.
 
 My Web Service definition looks like this:
 
 mx:WebService
   id=CALS
  

wsdl=http://localhost:9080/CustomerModuleWeb/sca/CustomerDataServiceExp\
 ort/wsdl/CustomerDataServiceExport_CustomerDataServiceHttp_Service.wsdl

http://localhost:9080/CustomerModuleWeb/sca/CustomerDataServiceExport/w\
 sdl/CustomerDataServiceExport_CustomerDataServiceHttp_Service.wsdl 
  

endpointURI=http://localhost:9080/CustomerModuleWeb/sca/CustomerDataSer\
 viceExport
 http://localhost:9080/CustomerModuleWeb/sca/CustomerDataServiceExport
 
   service=CustomerDataServiceExport_CustomerDataServiceHttpService
   port=CustomerDataServiceExport_CustomerDataServiceHttpPort
   useProxy=false
   showBusyCursor=true
   fault=Alert.show(event.fault.faultString), 'Error'
  mx:operation name=findAll
  mx:request
  customerRequest
  Customer
CustNo16/CustNo
Group/Group
  /Customer
  /customerRequest
  /mx:request
  /mx:operation
 /mx:WebService
 
 I'm using Flex Builder 3, Beta (also tried Flex Builder 2, hotfix3)
 
 What is going wrong here???





[flexcoders] Re: Actionscript: Copy an Object or Dictionary

2007-12-08 Thread polestar11
Hi Tom

That wouldn't work because item is the assigned object in the
dictionary not the key, so what you would actually be saying is:
newDict[item]=myDict[item], where item would be the key reference in
newDict, while myDic[item] is undefined.

I eventually gave up trying to iterate through a dictionary  assign
its child values. The other alternative was to create an array of
keys, iterate those  assign the dictionary values to the new dictionary.

Cheers
Tracy



--- In flexcoders@yahoogroups.com, Tom Chiverton [EMAIL PROTECTED]
wrote:

 On Friday 30 Nov 2007, polestar11 wrote:
  for each(item in myDictionary) {
  newDict[?] = item;
  }
 
 newDict[item]=myDict[item];
 





SPAM-LOW: Re: [flexcoders] How much can AIR and the OS interact?

2007-12-08 Thread zcsibi
FluorineFx (www.fluorinefx.com) also offers similar functionality 
with the FluorineFx windows service. As the service itself has 
no .NET, MFC etc. dependency it is easy to deploy (of course you 
need .NET installed after deployment to do anything useful). The plan 
is to allow in future releases to use a branding text so one can 
setup one service per product.

Zoli

PS: as Jeffry wrote you should consider whether a Windows solution 
would be more beneficial then AIR


--- In flexcoders@yahoogroups.com, Jeffry Houser [EMAIL PROTECTED] wrote:

 
   WebORB offers this functionality:
 
   http://www.themidnightcoders.com/blog/2007/07/weborb-air-
edition.html
 
   However, if you're going to tie yourself into Windows anyway, 
perhaps 
 WPF is a better solution?
 
 hank williams wrote:
  
  
I'm looking for an overview:
   
Can AIR apps interact with services running locally? For 
example,
could I create a .net DLL that permitted interaction with the
clipboard at the native OS level?
   
  
  No. You cannot access DLLs.
  
  Hank
 
 
 
 -- 
 Jeffry Houser, Technical Entrepreneur, Software Developer, Author, 
 Recording Engineer
 AIM: Reboog711  | Phone: 1-203-379-0773
 --
 My Company: http://www.dot-com-it.com
 My Podcast: http://www.theflexshow.com
 My Blog: http://www.jeffryhouser.com





Re: [flexcoders] Simple Code to load a jpg from a website, then load again and replace needed

2007-12-08 Thread Daniel Freiman
What error are you getting.  My guess is that the addChild() is blowing up
because you're trying to add 'content' to the application when 'content' is
already a child of the loader.  A displayobject can only be a child of one
displayobjectcontainer.  Loaders are fairly low memory usage.  I would just
add loader itself to the application and not worry about it.  If you're
loading hundreds of images and you start to notice a problem, only then
would I would about optimizing memory management.

What are you trying to make.  Based on what I see here, It's possible that
using a flex project as opposed to an Actionscript project will cut
development time significantly.

- Dan Freiman

On Dec 7, 2007 2:42 PM, lowerpower [EMAIL PROTECTED] wrote:


 I've been trying to figure this out, but actionscript is new to me.

 I want the code to not blow up memory too, so the old image after done
 with use should be freed. This is one of my attempts but it only
 displays one image and memory gets out of control:

 package {
 import flash.display.Sprite;
 import flash.display.Loader;
 import flash.events.Event;
 import flash.net.URLRequest;
 import flash.system.System;

 public class Application extends Sprite{

 private var currentLdr:Loader;
 private var request:URLRequest;
 private var i:int;

 function Application(){
 i=0;
 //this.request = new URLRequest(http://10.10.11.105/usr/yoics3.jpg;);
 this.loadNextImage();
 }

 private function loadNextImage(){
 this.currentLdr = new Loader();
 this.currentLdr.contentLoaderInfo.addEventListener(Event.COMPLETE,
 this.loadCompleteHandler,false,0,true);
 this.currentLdr.contentLoaderInfo.addEventListener(Event.UNLOAD,
 this.unloadCompleteHandler,false,0,true);
 this.request = new URLRequest(http://10.10.11.105/usr/yoics3.jpg?+i);
 this.currentLdr.load(this.request);

 trace(Current mem:  + System.totalMemory);
 }

 private function loadCompleteHandler(event:Event):void
 {
 // Display first
 this.addChild(this.currentLdr.content);
 this.currentLdr.unload();
 }

 private function unloadCompleteHandler(event:Event):void
 {
 this.loadNextImage();
 }

 }
 }

  



[flexcoders] Re: Loading Web Service from WebSphere

2007-12-08 Thread dafox_82
When I try to use the WSDL import wizard, I could see my operations
resolved correctly, but when clicking Finish, I get the following error:

The WSDL definition could not be parsed. The wizard cannot complete
successfully.

--- In flexcoders@yahoogroups.com, Randy Martin [EMAIL PROTECTED] wrote:

 My suggestion is that you use FB3 beta 2 and use the WSDL wizard to
generate
 the classes necessary to use the webservice. I did this for two of our
 webservices, and I had to do only minor tweaks of the generated code
to get
 it to work flawlessly. Pick from the menu in FB or Eclipse, Data |
Import
 Web Service (WSDL) ..., then be sure you pick the SOAP 1.1 port in the
 wizard. The wizard does not support SOAP 1.2 yet.
  
 ~randy
 
 
_  
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of dafox_82
 Sent: Saturday, December 08, 2007 9:46 AM
 To: flexcoders@yahoogroups.com
 Subject: [SPAM] [flexcoders] Re: Loading Web Service from WebSphere
 
 
 
 Nobody with some helpful tips?
 
 --- In HYPERLINK
 mailto:flexcoders%40yahoogroups.com[EMAIL PROTECTED], dafox_82
 dafox_82@ wrote:
 
  I'm playing around with Flex and want to call a custom made Web
Service
  in WebSphere.
  
  When I run my application, It seems that a lot of requests are done to
  the Web Service repeatably requesting the same XSD's (complex
types). It
  looks like the application is in an infinite loop, constantly
doing the
  same requests.. No call the the web service is made yet at this point.
  
  If I call the requested XSD manually in my browser, it is resolved
  without problems.
  And if I call another very simple web service, everything is
working as
  expected.
  
  My Web Service definition looks like this:
  
  mx:WebService
  id=CALS
  
 
 wsdl=HYPERLINK

http://localhost:9080/CustomerModuleWeb/sca/CustomerDataServiceExphttp://l
 ocalhost:-9080/CustomerMod-uleWeb/sca/-CustomerDataServ-iceExp\
 

ort/wsdl/CustomerDa-taServiceExport_-CustomerDataServ-iceHttp_Service.-wsdl
 
 HYPERLINK

http://localhost:9080/CustomerModuleWeb/sca/CustomerDataServiceExport/whtt

p://localhost:-9080/CustomerMod-uleWeb/sca/-CustomerDataServ-iceExport/-w\
 
sdl/CustomerDataSer-viceExport_-CustomerDataServ-iceHttp_Service.-wsdl 
  
 
 endpointURI=-HYPERLINK

http://localhost:9080/CustomerModuleWeb/sca/CustomerDataSerhttp://localhos
 t:-9080/CustomerMod-uleWeb/sca/-CustomerDataSer\
  viceExport
  HYPERLINK

http://localhost:9080/CustomerModuleWeb/sca/CustomerDataServiceExporthttp:
 //localhost:-9080/CustomerMod-uleWeb/sca/-CustomerDataServ-iceExport
  
  service=CustomerDa-taServiceExport_-CustomerDataServ-iceHttpService
  port=CustomerDataS-erviceExport_-CustomerDataServ-iceHttpPort
  useProxy=false
  showBusyCursor=-true
  fault=Alert.-show(event.-fault.faultStrin-g), 'Error'
  mx:operation name=findAll-
  mx:request
  customerRequest
  Customer
  CustNo16/-CustNo
  Group/Group
  /Customer
  /customerRequest
  /mx:request
  /mx:operation
  /mx:WebService
  
  I'm using Flex Builder 3, Beta (also tried Flex Builder 2, hotfix3)
  
  What is going wrong here???
 
 
 
 
  
 
 
 No virus found in this outgoing message.
 Checked by AVG. 
 Version: 7.5.503 / Virus Database: 269.16.17/1177 - Release Date:
12/7/2007
 1:11 PM





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 


Re: [flexcoders] Warning 1096: Illogical comparison with null. Variables of type Boolean cannot be null.

2007-12-08 Thread Daniel Freiman
What adobe does is declare the property as type Object and then uses it as a
Boolean.  Thus is can be null, but you loose the strict typing of that
object.  Other than that, a boolean is either true or false, the default
being false.  There's no concept of an uninitialized boolean.

- Dan Freiman

On Dec 7, 2007 3:07 PM, Peter Connolly [EMAIL PROTECTED] wrote:

   They say that we should deal with warnings, but I'm not seeing how to
 get around this one...

 I have an AS3 object and several Boolean properties in it that may or
 may not be initialized. So I check to see if they are 'null' before
 using them. This is a typical Java check that I'm carrying over. Is
 there some other way to check for proper initialization of a Boolean
 property? One that won't kick off the warning sirens?
  



[flexcoders] Re: Sorting problem on date and numbers with null values, I think

2007-12-08 Thread aceoohay
George:

additional commentary
We are not sitting around waiting for Adobe to hand us a fix. We are 
doing what needs to be done to get the applications finished.

We like Flex, but if the level of effort to work around bugs becomes 
so time consuming as to make it easier or faster to switch to 
something less buggy, what do you think we should do?

Personally I think that my comments, if internalized by Adobe, can be 
beneficial to them as well as us developers. 

Regarding this specific issue, I suspect that the folks at Adobe took 
one look at the problem, determined that it was a problem (which was 
good), but then made an internal decision to postpone anyone looking 
for the solution until after the new release comes out of beta. I 
also believe that because of the discussion here (specifically 
comments by Alex Haruri), and in another thread that it was 
determined to be more of an enhancement than a bug fix, which pushes 
it way down the priority list.

In summary I think we do a disservice to ourselves, and to Adobe if 
we go silently into the good night... by working around problems 
and not holding Adobe's feet to the fire to fix problems in their 
code.
/additional commentary

Paul

--- In flexcoders@yahoogroups.com, George [EMAIL PROTECTED] wrote:

 [personal thoughts]
 Working on Flex projects you have to overcome some 'bug' troubles 
 yourself. Adobe developers couldn't has enough time to help 
everybody to 
 find solutions, they have to work for tasks depending on priority 
like 
 all software development teams.
 
 Nothing can be perfect we have to trade-off. Performance can be a 
 problem, but if there's a performance problem, you can still change 
your 
 interface design to make it more acceptable for end users.
 
 Your developers are lucky to work with you even don't have to waste 
time 
 for sorting functions. I have to find trade-off solutions more than 
 these small tasks, even have to think about how to change 
interface, and 
 defend for myself. End users and bosses wouldn't care where's the 
 problem, what they know is if there's a problem, it's my problem, I 
have 
 to fix it or make it better at least.
 
 For SDK code itself, I think we should let Adobe developers to 
judge 
 whether it's a simple fix or not. They could have reasons we 
wouldn't know.
 
 George
 
 
 
 aceoohay wrote:
  
  
  The good news is I believe that the folks at Adobe are convinced 
this
  is a bug.
  
  The bad news is I was told that they aren't going to fix it 
anytime
  soon, what with the new release coming out and the fact that 
there is
  an easy workaround and all.
  
  opinion
  It is my opinion, after looking at the code that generates the 
error,
  it would be a relatively simple fix. I believe that all that 
would be
  needed is in the routine that determines the data type to sort on 
it
  should ignore nulls. As it loops through the column to find the 
data
  type should it find no non-null elements, it doesn't need to sort
  anything.
  
  The only performance impact would be on columns that contain lots 
of
  nulls, but I would rather have my users wait a few milliseconds
  rather than get an error, or have my developers waste time adding
  sort handlers for each column in each datagrid. Also I am sure 
that
  the sort handlers have a substantial performance impact at 
runtime.
  
  What I am trying to say is I believe that Adobe has made a 
mistake in
  offloading a significant amount of work onto developers, and has a
  poorer product, when with a small effort they can solve the 
problem.
  /opinion
  
  Paul
 





Re: [flexcoders] Warning 1096: Illogical comparison with null. Variables of type Boolean cannot be null.

2007-12-08 Thread Peter Connolly

 What adobe does is declare the property as type Object and then uses it as a
 Boolean.  Thus is can be null, but you loose the strict typing of that
 object.  Other than that, a boolean is either true or false, the default
 being false.  There's no concept of an uninitialized boolean.

 - Dan Freiman

Thanks, that helps.


[flexcoders] ICAL Recurrence rules

2007-12-08 Thread kuroiryu42
I am wondering if there are any AS libraries that help with handling
ICAL feeds.



Re: [flexcoders] trying to get flex + php + firebird to work

2007-12-08 Thread suomaf

Hello all,

Again, please disregard, I found another example to follow and this time it
works now. **note to self..must remember to commit after add new rows.

cheers,

suomaf

Hello all,

Please disregard the previous post, i found another example to follow this
one at
http://www.onlamp.com/pub/a/onlamp/2007/07/19/introduction-to-flex-using-php.html
 
and i am happy to report I have made contact with the database. I am now
able to update and show the contents of the database. However one problem
remains,

if you go to http://202.160.32.83:/email/bin/list.php there is 11 data
but when i go to http://202.160.32.83:/email/bin/email.html it only
shows 3 data
These 3 were available at the time of compile and if i were to recompile it
will show the rest ..
Is there something that I am doing wrong? Should i be refreshing the
datagrid or perhaps some setting to apache or php?

Please help

suomaf

suomaf wrote:
 
 Hello all,
 
 I am new to flex and am just starting out. Please forgive me if i am
 asking noob questions.
 I looked at the example at
 http://devzone.zend.com/article/11-Integrating-Adobe-Flex-and-PHP and
 tried to make it work for firebird.
 
 I have a linux box at 192.168.0.238 which has apache and also php and
 firebird. I know that they work together. 
 
 following the example I have changed the request.php, trial.mxml and my
 firebird database as below. I am using flex3 beta 2 and when i move
 everything to the linux box and try to run it at
 http://192.168.0.238/trial/bin/trial.html, it loads but an error pops up
 which is :
 
 An action script error has occured
 [RPC Fault faultString=Security error accessing url
 faultCode=Channel.Security.Error faultDetail=Destination: DefaultHTTP]
   at
 mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()[E:\dev\flex_3_beta2\sdk\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:211]
   at
 mx.rpc::Responder/fault()[E:\dev\flex_3_beta2\sdk\frameworks\projects\rpc\src\mx\rpc\Responder.as:56]
   at
 mx.rpc::AsyncRequest/fault()[E:\dev\flex_3_beta2\sdk\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:110]
   at
 DirectHTTPMessageResponder/securityErrorHandler()[E:\dev\flex_3_beta2\sdk\frameworks\projects\rpc\src\mx\messaging\channels\DirectHTTPChannel.as:368]
   at flash.events::EventDispatcher/dispatchEventFunction()
   at flash.events::EventDispatcher/dispatchEvent()
   at flash.net::URLLoader/redirectEvent()
 
 so i followed instructions and placed a crossdomain.xml file at
 192.168.0.238/crossdomain.xml
 and when that still did not work, i placed it in all the subdirectories..
 restarting the http service and I see no change and am still getting the
 error.
 
 Is this an issue with the flex_3 sdk or am i doing something really
 noobish?
 
 Can anyone please help?
 
 suomaf
 

-- 
View this message in context: 
http://www.nabble.com/trying-to-get-flex-%2B-php-%2B-firebird-to-work-tf4950235.html#a14225804
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] Question regarding textareas.

2007-12-08 Thread leech2k4
We are wanting to write a chat application in flash that needs to have
very unique requirements so its a one off type of thing that an
existing off the shelf wont help with.

What we are looking for is each line of chat should have something
like the following:

x x 10:00pm - How are you today?

The x's would be checkboxes. When one of those two boxes are checked
we would highlight the How are you today? row of text a specific
color.  From what I have seen this is not possible, am I wrong?

Basically the checkboxes when clicked will just perform a simple send
to the flash media server application we are running to perform a
simple call on the server.  Where we are struggling is trying to find
how we might do the following:

1. Add the checkboxes to the html text area.
2. Change the color of the text for that specific line.

Any help or light you folks can shed on this for us would be great.
Thank you very much.



[flexcoders] Simple game question with Flex

2007-12-08 Thread pirzadaz_ali
Hi,

I have board and pieces in PNG format (images) set in Flash 8 
(downloaded trial version of Flash CS3 pro) . Now instead of using 
flash I want to use Flex (as developer in other languages) to code AS 
files to move my pieces etc. 

So basically I want to use Flash to set up my board with images and 
Flex to code the behavior of game somehow calling the pieces etc from 
Flash SWF file which has board and pieces?

any suggestion will be helpful

Thanks 




[flexcoders] Re: Combining Menu, List, Form

2007-12-08 Thread jerlogan
Thanks for the response.

My thinking was along the lines : If a menu allows a checkbox, it 
allows a flag to be set, so entering data for a form would not be 
inconsistent. This just allows user to look at the contents of the 
form and glide over to other menu items without actually entering the 
form... (The form should seamlessly disappear as user gets back to 
parent menu...)
I wanted a list to be part of a menu so that it can offer multiple 
selections. (Again one could just navigate to the list while the rest 
of the menu is open and glide over without actually selecting the 
list elements...)..

I needed Menu--list/form as i also had the need for submenus..

Can i not capture Menu's event listener for Hide event and unhide it? 
(could anyone tell me how to unhide a menu this way...)

-jaihari

--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:

 It is probably possible, but is likely to be quite difficult.  Is 
this a
 common UI pattern somewhere?  I would think most users would not 
expect
 to enter information in submenus.
 
  
 
 If you don't need the fact that menus float over other things, you 
could
 probably take an easier route of having a list whose selection 
causes a
 form to be positioned near it.
 
  
 
 
 
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
 Behalf Of jerlogan
 Sent: Friday, December 07, 2007 3:28 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Combining Menu, List, Form
 
  
 
 I am new to flexworld. I apologize if this question sounds strange.
 Is it possible to combine a menu to lead to a form or a list.
 In otherwords can a submenu be a form or a list?
 
 I attempted to have a menu selection open up a form, but the effect
 is that the original menu disappears leaving the form open etc. I
 understand that one could prevent the menu from hiding in this case
 etc. I just want to know if there is some other way to achieve the 
same.
 
 Thanks in advance for any response,
 -jer





[flexcoders] Re: DS - Data synchronization between 2 destinations?

2007-12-08 Thread gabrysb
--- In flexcoders@yahoogroups.com, Jeff Vroom [EMAIL PROTECTED] wrote:

 We are working on improving the ability to do these types of
 master/detail relationships in future LC DS versions with a single
 destination.   Using one destination is obviously how you'd like to do
 it but you do run into some performance problems for large collections
 and object graphs with how it is implemented today.   In the future
 we'll have additional metadata to specify on association properties (at
 least) which let you specify one or more properties are unfetched until
 the client tries to access them.  
 

That is great! I can't wait to see next LC DS version.


  
 
 I take it you are turning off auto-sync so you can use the paged fill
 stuff -i.e. the fill methods which return a page at a time?   (We hope
 to also remove that limitation in the next release as well).
 

Yes, that is exactly why i turned off auto-sync. I saw in an archive
post that in future DS version it will by possible to auto-sync paged
fill (one more feature I'm looking forward to :)


  
 
 The simple answer for keeping data between two destinations in sync is
 that in your assembler's updateItem method for one destination you use
 the DataServiceTransaction.updateItem method for the other destination
 (or similarly for createItem and deleteItem)
 

 But when auto-sync is turned off, clients using that destination won't
 receive those pushed changes.   You can however use manual
 synchronization.   Clients can subscribe to one or more subtopics or use
 a selector expression which specifies which messages they want to
 receive.  Clients or server code which publishes changes can specify
 which subtopics those messages go to.  
 
  

Thanks! I will try to do this like that.

Gabriel 




[flexcoders] SoundChannel position misreporting

2007-12-08 Thread bryter_daze
I have been unable to find anyone else who has come across this issue.
I have checked through my code again and again, and have been unable
to find the flaw. I am using a subclass of HSlider to control the
position of an mp3. This, as you might know, involves calling
channel.stop() and then channel = sound.play(new position)

To be brief, setting the sound to play at anything other than 0 causes
the channel.position variable to report an earlier time than is
actually playing.The effects appear to be increased with distance from
zero and will finish immediately if played from half way through.

] finished at 26584.943310657596 of 41795.91836734694

I'm most eager to get this issue fixed, any help is most appreciated



[flexcoders] Extending the RichTextEditor

2007-12-08 Thread Dave
I was just wondering if anyone had a sample of extending the 
RichTextEditor to support inserting images?

I am looking at it and it seems you have to insert the html img tag
into the HTML and you can figure out where by the selection property,
but I also want to just add a button to the tool bar for images and I
am getting stumped.

Thanks for any and all help.

Dave Finnerty



Re: [flexcoders] Re: Scan document using Flex 2 or 3. Help please

2007-12-08 Thread jeff
On Fri, Dec 07, 2007 at 09:25:47PM -, Abyss Knight wrote:

 I don't believe you can access other applications on the system
 directly unless they are other AIR/Flex applications that you've
 written. If you were able to do this, it would be a very large
 security concern.  

I like that solution that some other guy posted in the barcode reader thread: 
write a 
client-side server to do the intra-app communication and the Flex portion can 
commuicate 
with it via sockets.

Jeff



[flexcoders] flex newbie

2007-12-08 Thread Enrico Hofmann
hi i am new to flex,

i include an run.as in my mx:script tag

so like mx:Script source=run.as


how can i set the application that it runs after the application is
loaded?

i allready include in the Windowed Applcation part an
applicationComplete(callmyFunction())

but i get for all components that this is an null object whats
going wrong

using flex3 beta and this is an air application

regards enrico hofmann



[flexcoders] Creating a game in Flex

2007-12-08 Thread pirzadaz_ali
Hi,

 I have Chess board  and pieces images in png format separately. Now I 
want to use those images and create a chess game. Is it possible in 
Flex that I can make chess game from above images?

like this game http://www.newsandentertainment.com/zfchess.html

 thanks



[flexcoders] Not able to load movie

2007-12-08 Thread tallak

Hi,

I'm trying to develope a flex based h.264 movie player,  but I have ran into
some problems. I have followed the online tutorial
http://www.adobe.com/devnet/flashplayer/articles/hd_video_flash_player.html
but the movie does not start and there is an error returned called
NetStream.Play.FileStructureInvalid. I quite sure that the movie files
that I have tested are valid h.264 and they are playable in movie players,
so I am thinking that it is something else. In fact, when I use a non
existing file name, the same error is returned.

BTW, I'm compiling using -use-network=false as it is using a local
filesystem

Thanks,
Tallak

mxml:
*
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; 
layout=absolute
verticalAlign=middle
horizontalAlign=center
backgroundColor=black
width=512
height=360
xmlns:video=video.*
video:H264Video id=video_h264 filePath=test.mov/
/mx:Application
*

video/H264Video.as
*
package video
{
import mx.core.UIComponent;
import flash.events.NetStatusEvent;
import flash.net.NetConnection;
import flash.net.NetStream;
import mx.controls.Alert
import flash.media.Video;

public class H264Video extends UIComponent {
private var _video:Video;  
private var _connection_nc:NetConnection;  
private var _stream_ns:NetStream;  
private var _client:Object;  
private var _filePath:String; 

public function H264Video()
{
 super();  
 init();
} 

public function init():void  
{  
 _video = new Video();   
 _connection_nc = new NetConnection();  
 _connection_nc.connect(null);   
  
 _stream_ns = new NetStream(_connection_nc);   
 _client = new Object();  
 _stream_ns.client = _client;  
 _stream_ns.addEventListener(NetStatusEvent.NET_STATUS, onStatus);

 _video.attachNetStream(_stream_ns);
 
 this.addChild(_video);
_filePath=mic.mov;
  if(_filePath)  
 {  
 _stream_ns.play(_filePath);  
 }  
} 

private function onStatus(p_evt:NetStatusEvent):void
{
if(p_evt.info.code == NetStream.Play.FileStructureInvalid)
{
 Alert.show(The MP4's file structure is invalid., 
Status);
}
else if(p_evt.info.code == 
NetStream.Play.NoSupportedTrackFound)
{
 Alert.show(The MP4 doesn't contain any supported tracks,
Status);
}
else if(p_evt.info.level == error)
{
 Alert.show(There was some sort of error with the 
NetStream,
Error);
}
}

[Bindable]
public function get filePath():String  
{  
 return _filePath;  
}  

public function set filePath(p_path:String):void
  
{  
 _filePath = p_path;  
 _stream_ns.play(_filePath);  
} 
}
}
*
-- 
View this message in context: 
http://www.nabble.com/Not-able-to-load-movie-tf4967711.html#a14230372
Sent from the FlexCoders mailing list archive at Nabble.com.



[flexcoders] Re: programatically deselect cells in an AdvancedDataGrid (bump)

2007-12-08 Thread David Spurr
In the standard datagrid (so I assume it's not different for the 
AdvancedDataGrid as I haven't played with it yet,) you just need to set 
the selected indices to an empty array. To all select all and select 
none as a global feature in our app I simply made a DataGridUtil class 
with static methods of selectAll( dataGrid:DataGrid )  selectNone( 
dataGrid:DataGrid )


Re: [flexcoders] Creating a game in Flex

2007-12-08 Thread Jeffry Houser

  I have no doubt that this is possible.
  I envision this to be a big project, though.  Did you have any 
specific questions?

pirzadaz_ali wrote:
 
 
 Hi,
 
 I have Chess board and pieces images in png format separately. Now I
 want to use those images and create a chess game. Is it possible in
 Flex that I can make chess game from above images?
 
 like this game http://www.newsandentertainment.com/zfchess.html 
 http://www.newsandentertainment.com/zfchess.html
 
 thanks
 

-- 
Jeffry Houser, Technical Entrepreneur, Software Developer, Author, 
Recording Engineer
AIM: Reboog711  | Phone: 1-203-379-0773
--
My Company: http://www.dot-com-it.com
My Podcast: http://www.theflexshow.com
My Blog: http://www.jeffryhouser.com



Re: [flexcoders] Creating a game in Flex

2007-12-08 Thread Paul Decoursey
[Embed(source=path/to/image.png)]
private var image:Class;

or

reference the image with an Image component.

or

... well, look through the docs, there are a lot of ways to use images  
in flex.


On Dec 8, 2007, at 1:28 PM, pirzadaz_ali wrote:

 Hi,

 I have Chess board  and pieces images in png format separately. Now I
 want to use those images and create a chess game. Is it possible in
 Flex that I can make chess game from above images?

 like this game http://www.newsandentertainment.com/zfchess.html

 thanks



 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
 Yahoo! Groups Links






[flexcoders] Re: How can we use TransitionManager in Flex ... It is an ActionScript 3.0 Class

2007-12-08 Thread helihobby
Anyone ?

Regards,

Sean.

--- In flexcoders@yahoogroups.com, helihobby [EMAIL PROTECTED] wrote:

 Its even documented in Adobe Air:
 

http://livedocs.adobe.com/labs/air/1/aslr/fl/transitions/TransitionManager.html
 
 So why can't we use it in Flex 2/3 ?
 
 
 :(
 
 The Pixelate and Blinds are real cool ...
 
 Sean.
 
 --- In flexcoders@yahoogroups.com, helihobby helihobby@ wrote:
 
  Hello all,
  
  TransitionManager is in ActionScript 3.0 so how can we access it.
  It has lots of cool transitions such as Pixilate , Blinds and more ..
  
  You can see an example here ...
  
 

http://www.adobe.com/devnet/flash/articles/creating_animation_as3_02.html
  
  So how can we access it ...
  
  Regards,
  
  Sean - HeliHobby.com
 





RE: [flexcoders] Strange Behaviour

2007-12-08 Thread Alex Harui
Flex prefers that you call removeChild on the old container before
calling addChild on the new container.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Parjan Arjan
Sent: Saturday, December 08, 2007 6:37 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Strange Behaviour

 

I HAVE TWO PANEL AND ONE BUTTON IN AN APPLIACTION ONE PANEL CONTAINS
VBOX WHICH CONTAINS A DATAGRID

SECOND PANEL IS EMPTY 

 

I WANT TO PLACE VBOX OF PANEL ONE TO BE COPIED  IN PANEL TWO BUT I
OBSEVE A STRANGE BEHAVIOUR ITS IS REMOVED FROM PANEL ONE CAN U TELL ME
WHY HERE IS MY CODE.

 

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml 

 mx:Panel id=PANEL1 title=Panel One
  mx:VBox id=vbx
   mx:DataGrid 
mx:ArrayCollection
 mx:Object
  mx:ArtistPavement/mx:Artist
  mx:Price11.99/mx:Price
  mx:AlbumSlanted and Enchanted/mx:Album
 /mx:Object
/mx:ArrayCollection
   /mx:DataGrid  
  /mx:VBox

 /mx:Panel
  
 mx:Panel id=PANEL2 title=Panel Two
 /mx:Panel

 mx:Button label=Copy VBOX click= {PANEL2.addChild( vbx ) } /
  
/mx:Application

 



Never miss a thing. Make Yahoo your homepage.
http://us.rd.yahoo.com/evt=51438/*http:/www.yahoo.com/r/hs  

 



RE: [flexcoders] Re: Combining Menu, List, Form

2007-12-08 Thread Alex Harui
Menu inherits from List.  The struggle will be about eliminating the
click-and-dismiss and roll over behaviors of Menu.  If you look into
states, you can probably get what you want by having Lists and Forms
appear as needed.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of jerlogan
Sent: Friday, December 07, 2007 8:58 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Combining Menu, List, Form

 

Thanks for the response.

My thinking was along the lines : If a menu allows a checkbox, it 
allows a flag to be set, so entering data for a form would not be 
inconsistent. This just allows user to look at the contents of the 
form and glide over to other menu items without actually entering the 
form... (The form should seamlessly disappear as user gets back to 
parent menu...)
I wanted a list to be part of a menu so that it can offer multiple 
selections. (Again one could just navigate to the list while the rest 
of the menu is open and glide over without actually selecting the 
list elements...)..

I needed Menu--list/form as i also had the need for submenus..

Can i not capture Menu's event listener for Hide event and unhide it? 
(could anyone tell me how to unhide a menu this way...)

-jaihari

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Alex Harui [EMAIL PROTECTED] wrote:

 It is probably possible, but is likely to be quite difficult. Is 
this a
 common UI pattern somewhere? I would think most users would not 
expect
 to enter information in submenus.
 
 
 
 If you don't need the fact that menus float over other things, you 
could
 probably take an easier route of having a list whose selection 
causes a
 form to be positioned near it.
 
 
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com

[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of jerlogan
 Sent: Friday, December 07, 2007 3:28 PM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Combining Menu, List, Form
 
 
 
 I am new to flexworld. I apologize if this question sounds strange.
 Is it possible to combine a menu to lead to a form or a list.
 In otherwords can a submenu be a form or a list?
 
 I attempted to have a menu selection open up a form, but the effect
 is that the original menu disappears leaving the form open etc. I
 understand that one could prevent the menu from hiding in this case
 etc. I just want to know if there is some other way to achieve the 
same.
 
 Thanks in advance for any response,
 -jer


 



[flexcoders] Re: Strange Behaviour

2007-12-08 Thread reflexactions
Hmm,
Well in general I have always assumed it wasnt necessary to do that 
becuase the Container addChildAt method specifically calls 
removeChild on the old container for you:

override public function addChildAt (child:DisplayObject, 
index:int):DisplayObject
{
var formerParent:DisplayObjectContainer = child.parent;
if (formerParent  !(formerParent is Loader))
 formerParent.removeChild(child);


What extra does calling removeChild in you own code first do then?

tks

--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:

 Flex prefers that you call removeChild on the old container before
 calling addChild on the new container.
 
  
 
 
 
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
 Behalf Of Parjan Arjan
 Sent: Saturday, December 08, 2007 6:37 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Strange Behaviour
 
  
 
 I HAVE TWO PANEL AND ONE BUTTON IN AN APPLIACTION ONE PANEL CONTAINS
 VBOX WHICH CONTAINS A DATAGRID
 
 SECOND PANEL IS EMPTY 
 
  
 
 I WANT TO PLACE VBOX OF PANEL ONE TO BE COPIED  IN PANEL TWO BUT I
 OBSEVE A STRANGE BEHAVIOUR ITS IS REMOVED FROM PANEL ONE CAN U TELL 
ME
 WHY HERE IS MY CODE.
 
  
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml
 http://www.adobe.com/2006/mxml 
 
  mx:Panel id=PANEL1 title=Panel One
   mx:VBox id=vbx
mx:DataGrid 
 mx:ArrayCollection
  mx:Object
   mx:ArtistPavement/mx:Artist
   mx:Price11.99/mx:Price
   mx:AlbumSlanted and Enchanted/mx:Album
  /mx:Object
 /mx:ArrayCollection
/mx:DataGrid  
   /mx:VBox
 
  /mx:Panel
   
  mx:Panel id=PANEL2 title=Panel Two
  /mx:Panel
 
  mx:Button label=Copy VBOX click= {PANEL2.addChild( vbx ) } /
   
 /mx:Application
 
  
 
 
 
 Never miss a thing. Make Yahoo your homepage.
 http://us.rd.yahoo.com/evt=51438/*http:/www.yahoo.com/r/hs





RE: [flexcoders] Re: Strange Behaviour

2007-12-08 Thread Alex Harui
Didn't know we'd gotten around to fixing that.

 

Anyway, I ran the app and don't see any strange behavior.  addChild is a
'move' and not a 'copy' as the button label implies.

 

The best way to make a copy is to put the whole VBox sequence in its
own MXML file and add a new instance of it.  

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of reflexactions
Sent: Saturday, December 08, 2007 9:53 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Strange Behaviour

 

Hmm,
Well in general I have always assumed it wasnt necessary to do that 
becuase the Container addChildAt method specifically calls 
removeChild on the old container for you:

override public function addChildAt (child:DisplayObject, 
index:int):DisplayObject
{
var formerParent:DisplayObjectContainer = child.parent;
if (formerParent  !(formerParent is Loader))
formerParent.removeChild(child);

What extra does calling removeChild in you own code first do then?

tks

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Alex Harui [EMAIL PROTECTED] wrote:

 Flex prefers that you call removeChild on the old container before
 calling addChild on the new container.
 
 
 
 
 
 From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com

[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of Parjan Arjan
 Sent: Saturday, December 08, 2007 6:37 AM
 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com 
 Subject: [flexcoders] Strange Behaviour
 
 
 
 I HAVE TWO PANEL AND ONE BUTTON IN AN APPLIACTION ONE PANEL CONTAINS
 VBOX WHICH CONTAINS A DATAGRID
 
 SECOND PANEL IS EMPTY 
 
 
 
 I WANT TO PLACE VBOX OF PANEL ONE TO BE COPIED IN PANEL TWO BUT I
 OBSEVE A STRANGE BEHAVIOUR ITS IS REMOVED FROM PANEL ONE CAN U TELL 
ME
 WHY HERE IS MY CODE.
 
 
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml 
 http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml  
 
 mx:Panel id=PANEL1 title=Panel One
 mx:VBox id=vbx
 mx:DataGrid 
 mx:ArrayCollection
 mx:Object
 mx:ArtistPavement/mx:Artist
 mx:Price11.99/mx:Price
 mx:AlbumSlanted and Enchanted/mx:Album
 /mx:Object
 /mx:ArrayCollection
 /mx:DataGrid 
 /mx:VBox
 
 /mx:Panel
 
 mx:Panel id=PANEL2 title=Panel Two
 /mx:Panel
 
 mx:Button label=Copy VBOX click= {PANEL2.addChild( vbx ) } /
 
 /mx:Application
 
 
 
 
 
 Never miss a thing. Make Yahoo your homepage.
 http://us.rd.yahoo.com/evt=51438/*http:/www.yahoo.com/r/hs
http://us.rd.yahoo.com/evt=51438/*http:/www.yahoo.com/r/hs 


 



RE: [flexcoders] Re: Using DateField as itemEditor for DataGrid column

2007-12-08 Thread Alex Harui
What version of Flex are you using?  Flex 3 Beta 2 and Flex 2.0.1
HotFix2 (which are the only versions you should be using) both throw
exceptions with this example.

 

DateField isn't really set up to handle XML when it is an item renderer.
I sort of got it working like this:

 

mx:DataGridColumn headerText=Date dataField=date

width=100 editable=true

editorDataField=selectedDate rendererIsEditor=true

mx:itemRenderer

mx:Component

mx:DateField

mx:Script

![CDATA[

import
mx.controls.listClasses.BaseListData;

import
mx.controls.dataGridClasses.DataGridListData;

// block the underlying
DateFields listData so it

// doesn't think it is
in a DataGrid

private var
_ld:BaseListData;

override public function
get listData():BaseListData

{

return _ld;

}

 

override public function
set listData(value:BaseListData):void

{

_ld = value;

}

 

private var _dd:Object;

override public function
get data():Object

{

return _dd;

}

 

override public function
set data(value:Object):void

{

_dd = value;

 

if (_ld 
_ld is DataGridListData)

{

 
var s:String = value[DataGridListData(_ld).dataField].toString();

 
trace(s);

 
super.data = new Date(Date.parse(s));

}

}

 

]]

/mx:Script

/mx:DateField

/mx:Component

/mx:itemRenderer

/mx:DataGridColumn

 

Note that the first date in your example is not a valid format for
Date.parse().

 

HTH,

-Alex

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of carl_steinhilber
Sent: Tuesday, December 04, 2007 9:42 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Using DateField as itemEditor for DataGrid
column

 

Hi Alex,

Sure. (Holiday-themed) example below. :-) XML inline, of course,
rather than loaded from external doc as in my final app. As is, it
works (all data is shown, and clicking in the date field opens the
DateField editor... there's a coercion error on click in debug, but
it's silent when not in debug).

Changing the date DataGridColumn to 
mx:DataGridColumn headerText=Date dataField=date
width=100 editable=true
itemRenderer=mx.controls.DateField
editorDataField=selectedDate rendererIsEditor=true / 

prevents any data from being shown. In debug, the coercion error
occurs immediately on creation... which makes perfect sense.

So the issue is definitely that Flex can't parse the date from the XML
node. But I'm at a loss as to how to define the date in the XML to fix
the problem. Am I going to have to step through the XML and convert it
to an Object, converting the date along the way? Or is there a more
straight-forward solution I'm missing? Would there be a way to wrap
the DateField in a custom renderer that can convert the date on the fly?

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml 
layout=vertical creationComplete=init() 
mx:Script
![CDATA[
import mx.collections.XMLListCollection;

[Bindable]
private var xmlChristmas:XMLListCollection;

private function init():void
{
xmlChristmas = new
XMLListCollection(xmlDaysOfChristmas.day.copy());
}

private var xmlDaysOfChristmas:XML = 
root
day
nameFirst Day of Christmas/name
date2007-12-25T00:00:00.000-05:00/date
giftPartridge in a pear tree/gift
/day
day
nameSecond Day of Christmas/name
date12/26/2007/date
giftTwo turtle doves/gift
/day
day
nameThird Day of Christmas/name
dateThu Dec 27 00:00:00 GMT-0800 2007/date
giftThree french hens/gift
/day
/root;
]]
/mx:Script

mx:DataGrid 

RE: [flexcoders] How to disable menubar in Flex 2

2007-12-08 Thread Alex Harui
Can you call getMenuAt() and set enabled=false?

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Paul Steven
Sent: Thursday, November 29, 2007 1:38 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How to disable menubar in Flex 2

 

 Can someone please let me know how to disable a menubar in Flex 2

 

Here is a snippet of my code. Basically at certain points I need to
disable all items in the menu.

 

mx:MenuBar labelField=@label itemClick=menuHandler(event) 

dataProvider={menuBarCollection}  width=250 x=520
color=#ff  id=menubar1  alpha=0.0 fillColors=[#ff,
#ff]/



 

[Bindable]

 public var menuBarCollection:XMLListCollection;



private var menubarXML:XMLList =

 

menuitem label=File 

menuitem label=Archive
data=Archive/

menuitem label=Update data=Update/


menuitem label=Exit data=Exit/


/menuitem



menuitem label=Configure

menuitem label=Settings
data=Settings/  

/menuitem



menuitem label=View 

menuitem label=Qualifications
data=Qualifications/ 

/menuitem



menuitem label=Help 

menuitem label=Help data=Help/


/menuitem

/;

 

 

private function menuHandler(event:MenuEvent):void  {

   

if ([EMAIL PROTECTED] == Qualifications) {




_session.addPreviousState(currentState);


navigateToState(SummaryScreen);



} else if ([EMAIL PROTECTED] == Archive) {   



_session.addPreviousState(currentState);


navigateToState(ArchiveScreen);

 


} else if ([EMAIL PROTECTED] == Update) {



onUpdateButtonClicked();



} else if ([EMAIL PROTECTED] == Exit) {



onExitButtonClicked();



} else if ([EMAIL PROTECTED] == Settings) {   



_session.addPreviousState(currentState);


navigateToState(ConfigureScreen);

 


} else if ([EMAIL PROTECTED] == Help) {   

_session.addPreviousState(currentState);


navigateToState(HelpScreen);

 }




}