[flexcoders] Re: dynamic image gallery

2009-07-04 Thread stinasius
any help guys?



[flexcoders] How to pass Query String in Url

2009-07-04 Thread balaji
Hi all,

  I am a newbie to flex , I am trying to pass the querystring to URL but it is 
not working . 

  The url : http://base_url/?login=loginnamepassword=password

  I tried to pass the arguments like this

  mx:HTTPService id=loginService url=base_url method=POST 
  resultFormat=text result={handleLogin(event)} fault=
  {handleFault(event)}
  mx:request
login{username.text}/login
password{password.text}/password
  /mx:request
  /mx:HTTPService
  
  I need your help in fixing the issue , 

Thanks in Advance

Balaji  
   

   



Re: [flexcoders] How to pass Query String in Url

2009-07-04 Thread Charles Parcell
Instead of POST perhaps you want GET for your method.

CP


On Sat, Jul 4, 2009 at 2:50 AM, balaji mcabal...@gmail.com wrote:

 Hi all,

  I am a newbie to flex , I am trying to pass the querystring to URL but it
 is not working .

  The url : http://base_url/?login=loginnamepassword=password

  I tried to pass the arguments like this

  mx:HTTPService id=loginService url=base_url method=POST
  resultFormat=text result={handleLogin(event)} fault=
  {handleFault(event)}
  mx:request
login{username.text}/login
password{password.text}/password
  /mx:request
  /mx:HTTPService

  I need your help in fixing the issue ,

 Thanks in Advance

 Balaji






 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location:
 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
 Search Archives:
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
 Links






[flexcoders] Re: Problems with Julian Dates with AIR percision?

2009-07-04 Thread jason_williams_mm
Hi Charlie,
Can you post an example of the code that you are using? It would help to see an 
example table definition along with the AS code you are using.

Thanks,
jw


--- In flexcoders@yahoogroups.com, Charlie Hubbard charlie.hubb...@... wrote:

 I'm writing some unit tests for my database, and I'm having a real problem
 with Julian date comparisons in the SQLite database.  I'm trying to load
 records by the following query:
 
 select * from Table where created_at  ?
 
 If my given Date is less than stored dates by 100ms SQLite fails to hand
 them back.  I've taken the times stored in SQLite and put them into
 coversion programs to convert them to unix epoch longs, and millisecond
 percision is stored in the number.  SQLIte does have percision down to the
 millisecond, but when I do a sql query they fail to compare correctly.  I've
 also confirmed that I do get back the milliseconds correctly stored in the
 actionscript's Date object.  Has anyone else had trouble like this?  Should
 I just store them as unix epoch integers rather than SQLite's Julian?  These
 timestamps are important and I want them to be as precise as possible so
 while I could chalk it up to only have second precision that increases the
 likelyhood of mistakes if operations occur within that second.
 
 Charlie





[flexcoders] Problem With debugging

2009-07-04 Thread vamsi_vitla999
Hi

I have strucked up with an debugger issue. Please help me out in resolving in 
this issue.
when i tried to debug an application. it gives me an Pop up window stating that
Failed to connect : session timed out Ensure that
1.You compiled your flash application with debugging on
2.You are running the debugger version of flash player.

I tried to install flash player. and reinstalled flex builder but no use.
Please help me out

Thank you In Advance

Vamsi



[flexcoders] Re: getting the xml data from a dispatched event

2009-07-04 Thread Jason B
Heres my three mxml files two of which are under the com/ folder and get 
imported...hope that helps


?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical
creationComplete=init() styleName=plain 
xmlns:nutrition=com.nutrition.*
paddingLeft=10 paddingTop=10 paddingRight=10 paddingBottom=10

mx:Script
![CDATA[
import mx.collections.ArrayCollection;
import mx.collections.ICollectionView;
import mx.collections.XMLListCollection;
import com.nutrition.MealItem;
import mx.controls.Alert;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
import mx.rpc.http.HTTPService;
//  initialize
private function init():void
{
//load calories

httpservice_load(/main.php/flexnutrition/loadcalories, 
this[loadcaloriesResultHandler]);

hsNutrition.send();
addEventListener('addToMeal', addToMealHandler);
addEventListener('removeMeal', 
removeMealHandler);
addEventListener('learnAboutThis', 
learnaboutthisswf); 



}

private function httpservice_load(url_src:String, 
resulthandler:Function):void{

httpService.url = url_src;

//var tmp:String = resulthandler.toString(); 
//if(tmp != none)
 
httpService.addEventListener(ResultEvent.RESULT, resulthandler);
httpService.send();
}

private function learnaboutthisswf(event:Event):void{
vfc_guy.load(/uploads/swf/ + loadswf_var);

}

[Bindable]
private var nutritionData:XML;
[Bindable]
private var maindata:XML;
[Bindable]
public var loadswf_var:String;
[Bindable]
public var createmeals_loadswf_var:String;

//load all calories for main meals
private function 
loadcaloriesResultHandler(event:ResultEvent):void
{
maindata = event.result as XML;
vfc_guy.load(/uploads/swf/ + maindata.swf);
}

//  nutrition result handler
private function 
nutritionResultHandler(event:ResultEvent):void
{   
nutritionData = event.result as XML;
}
//  nutrition fault handler
private function 
nutritionFaultHandler(event:FaultEvent):void
{
Alert.show(event.toString());
}   

//  create breakfast
private function createBreakfast():void
{
vsMain.selectedIndex = 1;
plantype = 'Breakfast';
}
//  create lunch
private function createLunch():void
{
vsMain.selectedIndex = 1;
plantype = 'Lunch';
}
//  create dinner
private function createDinner():void
{
vsMain.selectedIndex = 1;
plantype = 'Dinner';
}

[Bindable]
private var plantype:String;

[Bindable]
private var customMeals:ArrayCollection = new 
ArrayCollection;

//  addToMeal event Handler
private function 

Re: [flexcoders] Problem With debugging

2009-07-04 Thread John McCormack
Hi,

You may have other versions of the FlashPlayer - I found lots of 
versions when I had trouble - Firefox an IE use different programs.
The uninstaller should be used, not the control panel:
http://kb2.adobe.com/cps/141/tn_14157.html
This may not be the latest version.

Anggie Bratadinata over at flash_ti...@yahoogroups.com posted about this 
uninstaller, you might try that.
http://www.revouninstaller.com/

Also, change between IE, Firefox, or standalone (html off) to see if 
another debugger helps.
Try searching the registry for flashplayer to see if any others exist 
and consider renaming them.

Perhaps it's an issue to do with the local connection.
Presumably you are hitting F11 to debug.

John







vamsi_vitla999 wrote:
 Hi

 I have strucked up with an debugger issue. Please help me out in resolving in 
 this issue.
 when i tried to debug an application. it gives me an Pop up window stating 
 that
 Failed to connect : session timed out Ensure that
 1.You compiled your flash application with debugging on
 2.You are running the debugger version of flash player.

 I tried to install flash player. and reinstalled flex builder but no use.
 Please help me out

 Thank you In Advance

 Vamsi



 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Alternative FAQ location: 
 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
 Search Archives: 
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links





   




[flexcoders] Re: getting the xml data from a dispatched event

2009-07-04 Thread Tim Hoff

Wow, I've got to say; What  a mess.  However, you can get it to work
with the following changes:

[Bindable]
private var customMeals:XMLListCollection = new XMLListCollection();



// addToMeal event Handler
private function addToMealHandler(event:Event):void
{
  customMeals.addItem((event.target as
Panelcreatemealitem).mealDetails);
  Alert.show(customMeals.toString());
}

You have some naming conflicts and, since you're dealing with xml,
you'll need to use an XMLListCollection; instead of an ArrayCollection.

-TH

--- In flexcoders@yahoogroups.com, Jason B nos...@... wrote:

 Heres my three mxml files two of which are under the com/ folder and
get imported...hope that helps


 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=vertical
 creationComplete=init() styleName=plain
xmlns:nutrition=com.nutrition.*
 paddingLeft=10 paddingTop=10 paddingRight=10 paddingBottom=10

 mx:Script
 ![CDATA[
 import mx.collections.ArrayCollection;
 import mx.collections.ICollectionView;
 import mx.collections.XMLListCollection;
 import com.nutrition.MealItem;
 import mx.controls.Alert;
 import mx.rpc.events.FaultEvent;
 import mx.rpc.events.ResultEvent;
 import mx.rpc.http.HTTPService;
 // initialize
 private function init():void
 {
 //load calories
 httpservice_load(/main.php/flexnutrition/loadcalories,
this[loadcaloriesResultHandler]);

 hsNutrition.send();
 addEventListener('addToMeal', addToMealHandler);
 addEventListener('removeMeal', removeMealHandler);
 addEventListener('learnAboutThis', learnaboutthisswf);



 }

 private function httpservice_load(url_src:String,
resulthandler:Function):void{

 httpService.url = url_src;

 //var tmp:String = resulthandler.toString();
 //if(tmp != none)
 httpService.addEventListener(ResultEvent.RESULT, resulthandler);
 httpService.send();
 }

 private function learnaboutthisswf(event:Event):void{
 vfc_guy.load(/uploads/swf/ + loadswf_var);

 }

 [Bindable]
 private var nutritionData:XML;
 [Bindable]
 private var maindata:XML;
 [Bindable]
 public var loadswf_var:String;
 [Bindable]
 public var createmeals_loadswf_var:String;

 //load all calories for main meals
 private function loadcaloriesResultHandler(event:ResultEvent):void
 {
 maindata = event.result as XML;
 vfc_guy.load(/uploads/swf/ + maindata.swf);
 }

 // nutrition result handler
 private function nutritionResultHandler(event:ResultEvent):void
 {
 nutritionData = event.result as XML;
 }
 // nutrition fault handler
 private function nutritionFaultHandler(event:FaultEvent):void
 {
 Alert.show(event.toString());
 }

 // create breakfast
 private function createBreakfast():void
 {
 vsMain.selectedIndex = 1;
 plantype = 'Breakfast';
 }
 // create lunch
 private function createLunch():void
 {
 vsMain.selectedIndex = 1;
 plantype = 'Lunch';
 }
 // create dinner
 private function createDinner():void
 {
 vsMain.selectedIndex = 1;
 plantype = 'Dinner';
 }

 [Bindable]
 private var plantype:String;

 [Bindable]
 private var customMeals:ArrayCollection = new ArrayCollection;

 // addToMeal event Handler
 private function addToMealHandler(event:Event):void
 {
 trace(event.target);
 //customMeals.addItem((event.target as mealitem).mealDetails);
 Alert.show(event.toString());

 }

 // removeMeal event Handler
 private function removeMealHandler(event:Event):void
 {
 customMeals.removeItemAt(ls.selectedIndex);
 }

 ]]
 /mx:Script

 mx:HTTPService id=hsNutrition
url=/main.php/flexnutrition/nutritioncal
 result=nutritionResultHandler(event)
 fault=nutritionFaultHandler(event) resultFormat=e4x/

 mx:HTTPService id=httpService url= resultFormat=e4x/

 mx:Label id=totalcalories text={'Today\'s Meal Plan is based on a
' + maindata.totalcalories + ' Calorie Diet'} fontWeight=bold
fontSize=18/

 !--mx:Button label=Print Meal Menu /--

 mx:ViewStack id=vsMain width=100% height=100%

 mx:Canvas id=nutrition_canvas width=100% height=100%

 mx:SWFLoader id=vfc_guy source= height=400 width=400
autoLoad=true x=700 y=100 /

 mx:HBox width=100% height=100%

 mx:VBox width=40% height=100%

 nutrition:MealPanel id=pnlBreakfast
meal={nutritionData.breakfast}
 title=Breakfast : Please select one meal from
below({maindata.breakfast} Cal Goal)/

 mx:HBox horizontalCenter=right
 mx:Button label=Create your own Breakfast
click=createBreakfast()/
 /mx:HBox


 nutrition:MealPanel id=pnlSnack1 meal={nutritionData.snack1}
 title=Snack : Please select one snack from below({maindata.snack1}
Cal Goal)/
 !--mx:Button label=Create your own Lunch click=createLunch()/--

 nutrition:MealPanel id=pnlLunch meal={nutritionData.lunch}
 title=Lunch : Please select one meal from below({maindata.lunch} Cal
Goal)/

 nutrition:MealPanel id=pnlSnack2 meal={nutritionData.snack2}
 title=Snack : Please select one snack from below({maindata.snack2}
Cal Goal)/
 !--mx:Button label=Create your own Dinner
click=createDinner()/--

 nutrition:MealPanel id=pnlDinner meal={nutritionData.dinner}
 title=Dinner : Please select one meal from 

[flexcoders] ItemRenderer dispatch event problem

2009-07-04 Thread j2me_soul
How can let the parent of itemrenderer know something is happened ?
I use dispatchevent function, but it doesn't work.



[flexcoders] How to iterate items in repeater?

2009-07-04 Thread j2me_soul
I wanna change some specific item's style which inside the repeater component.
How can I iterate the items in the repeater and filtrate them ?