[flexcoders] sending dynamic data (contents of a list or repeater) via email using cfmail.

2013-04-16 Thread ZIONIST
Hello Guys, 

i have a repeater that is populated by dynamic data. i would like to email the 
contents of the repeater using cfmail in the same way they appear in the 
repeater. below is the way the repeated data is arranged in the repeater and 
the way i want to show it in the email.

mx:Repeater id=orders
 width=100%
mx:HBox width=100%

mx:Text width=182
 
text={orders.currentItem.OrderNumber}{orders.currentItem.Product}
 styleName=TextArea1/
mx:Spacer width=100%/
mx:Text id=subQty
 width=50
 text={orders.currentItem.Qty}
 styleName=TextArea1
 textAlign=center/
mx:Spacer width=100%/
mx:Text id=orderPrice
 width=64
 
text={parentApplication.swissFormatter.format(orders.currentItem.Price)}
 styleName=TextArea1/
mx:Spacer width=100%/
mx:Text id=subTotal
 
text={orders.currentItem.subTotal}
 width=69
 styleName=TextArea1/

/mx:HBox
/mx:Repeater



[flexcoders] flex frustration...

2013-03-15 Thread ZIONIST
hi guys one moment my app was working fine and the next i get this error

faultCode:Channel.Call.Failed faultString:'error' 
faultDetail:'NetConnection.Call.Failed: HTTP: Status 500'


any ideas on how to solve this ridiculous flex nonsense of an error? 



[flexcoders] Re: flex frustration...

2013-03-15 Thread ZIONIST
thanks guys... figured it out. i had deleted a row from the dbase by mistake.



[flexcoders] Re: filtering an array collection using 2 or 3 textinputs

2013-03-11 Thread ZIONIST
tried that already... it doesn't work. 



[flexcoders] Re: filtering an array collection using 2 or 3 textinputs

2013-03-11 Thread ZIONIST
could it be i apply the result of the filtered archiveAr collection to a new 
array collection (filteredAr) using a loop?



[flexcoders] Re: filtering an array collection using 2 or 3 textinputs

2013-03-11 Thread ZIONIST
any ideas?



[flexcoders] Re: filtering an array collection using 2 or 3 textinputs

2013-03-10 Thread ZIONIST
am not sure i follow... care to shed more light?



[flexcoders] Re: filtering an array collection using 2 or 3 textinputs

2013-03-08 Thread ZIONIST
i have figured it out and it works now. i would like the community's thoughts 
on best practices though. below is the full code. thanks 

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

mx:Script
![CDATA[
import mx.rpc.events.ResultEvent;
import mx.controls.Alert;
import mx.managers.CursorManager;
import mx.collections.ArrayCollection;

private function init():void
{

archiveSvc.getDocs();

}

/*** code to get Archives 
*/
[Bindable]
private var archiveAr:ArrayCollection=new 
ArrayCollection();

private function archiveResult(event:ResultEvent):void
{

archiveAr=event.result as ArrayCollection;

}

/*** Start Filter Functions 
***/

private var keywordText:String=keywords;
private var titleText:String=title;
private var subjectText:String=subject;

private function filterGrid():void
{

archiveAr.filterFunction=myFilterFunction;
archiveAr.refresh();

}

private function filterReset():void
{

archiveAr.filterFunction=null;
archiveAr.refresh();

}

private function myFilterFunction(item:Object):Boolean
{

//return item[keywordText].match(new 
RegExp(generalSearch.text, 'i'));  

return (item[keywordText].match(new 
RegExp(generalSearch.text, 'i'))  item[titleText].match(new 
RegExp(titleSearch.text, 'i'))  item[subjectText].match(new 
RegExp(subjectSearch.text, 'i')));
}

private function keywordChangeHandler(event:Event):void
{

if (generalSearch.text != '')
{
filterGrid();
}

}

private function titleChangeHandler(event:Event):void
{

if (titleSearch.text != '')
{
filterGrid();
}

}

private function subjectChangeHandler(event:Event):void
{

if (subjectSearch.text != '')
{
filterGrid();
}

}
]]
/mx:Script

mx:RemoteObject id=archiveSvc
 destination=ColdFusion
 source=tilelistFilter.src.cfcs.crud
 showBusyCursor=true
 
fault=CursorManager.removeBusyCursor();Alert.show(event.fault.message)

mx:method name=getDocs
   result=archiveResult(event)/

/mx:RemoteObject

mx:HBox

mx:VBox horizontalAlign=center
mx:Label text=Keyword Search:/
mx:TextInput id=generalSearch
  
change=keywordChangeHandler(event)/
/mx:VBox

mx:VBox horizontalAlign=center
   

[flexcoders] Re: filtering an array collection using 2 or 3 textinputs

2013-03-08 Thread ZIONIST
ok i have improved it so that i can apply itemsChangeEffects when filtering is 
happening. It works but the problem i have is that when the app starts up 
nothing shows up in the tilelist. its only when i start typing in the textinput 
that data appears in the tilelist.

What i would like to see is on startup, data appears in the tilelist. below is 
the improve code. Please advise.

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

mx:Script
![CDATA[
import mx.rpc.events.ResultEvent;
import mx.controls.Alert;
import mx.managers.CursorManager;
import mx.collections.ArrayCollection;

private function init():void
{

archiveSvc.getDocs();   

}

/*** code to get Archives 
*/
[Bindable]
private var archiveAr:ArrayCollection=new 
ArrayCollection();

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

private function archiveResult(event:ResultEvent):void
{

archiveAr=event.result as ArrayCollection;

}

/*** Start Filter Functions 
***/

private var keywordText:String=keywords;
private var titleText:String=title;
private var subjectText:String=subject;

private function filterGrid():void
{

archiveAr.filterFunction=myFilterFunction;
archiveAr.refresh();

for (var i:int=archiveAr.length - 1; i = 0; 
i--)
{
if (!filteredAr.contains(archiveAr[i]))
{

filteredAr.addItem(archiveAr[i]);
}
}
for (i=filteredAr.length - 1; i = 0; i--)
{
if (!archiveAr.contains(filteredAr[i]))
{
filteredAr.removeItemAt(i);
}
}

}

private function filterReset():void
{

archiveAr.filterFunction=null;
archiveAr.refresh();

}

private function myFilterFunction(item:Object):Boolean
{

return (item[keywordText].match(new 
RegExp(generalSearch.text, 'i'))  item[titleText].match(new 
RegExp(titleSearch.text, 'i'))  item[subjectText].match(new 
RegExp(subjectSearch.text, 'i')));

}

private function keywordChangeHandler(event:Event):void
{

if (generalSearch.text != '')
{
filterGrid();
}

}

private function titleChangeHandler(event:Event):void
{

if (titleSearch.text != '')
{
filterGrid();
}

}

private function subjectChangeHandler(event:Event):void
{

  

[flexcoders] Re: filtering an array collection using 2 or 3 textinputs

2013-03-07 Thread ZIONIST
hi when i try to apply the second search parameter, nothing gets filtered. here 
is my code. please advise.

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

mx:Script
![CDATA[
import mx.rpc.events.ResultEvent;
import mx.controls.Alert;
import mx.managers.CursorManager;
import mx.collections.ArrayCollection;

private function init():void
{

archiveSvc.getDocs();

}

/*** code to get Archives 
*/
[Bindable]
private var archiveAr:ArrayCollection=new 
ArrayCollection();

private function archiveResult(event:ResultEvent):void
{

archiveAr=event.result as ArrayCollection;

}

/*** Start Filter Functions 
***/

private var keywordText:String=keywords;
private var titleText:String=title;
private var subjectText:String=subject;

private function filterGrid():void
{

archiveAr.filterFunction=myFilterFunction;
archiveAr.refresh();

}

private function filterReset():void
{

archiveAr.filterFunction=null;
archiveAr.refresh();

}

private function myFilterFunction(item:Object):Boolean
{

//return item[keywordText].match(new 
RegExp(generalSearch.text, 'i'));
return (item[keywordText].match(new 
RegExp(generalSearch.text, 'i')))  (item[titleText].match(new 
RegExp(titleSearch.text, 'i')));

}

private function keywordChangeHandler(event:Event):void
{

if (generalSearch.text != '')
{
filterGrid();
}   
else
{
filterReset()
}

}

private function titleChangeHandler(event:Event):void
{

if (titleSearch.text != '')
{
filterGrid();
}   
else
{
filterReset()
}

}

]]
/mx:Script

mx:RemoteObject id=archiveSvc
 destination=ColdFusion
 source=tilelistFilter.src.cfcs.crud
 showBusyCursor=true
 
fault=CursorManager.removeBusyCursor();Alert.show(event.fault.message)

mx:method name=getDocs
   result=archiveResult(event)/

/mx:RemoteObject

mx:HBox

mx:VBox horizontalAlign=center
mx:Label text=Keyword Search:/
mx:TextInput id=generalSearch
  
change=keywordChangeHandler(event)/
/mx:VBox

mx:VBox horizontalAlign=center
mx:Label text=Search By Title:/
mx:TextInput id=titleSearch/
/mx:VBox

mx:VBox 

[flexcoders] Re: filtering an array collection using 2 or 3 textinputs

2013-03-07 Thread ZIONIST
tried that and it doesn't work



[flexcoders] Re: filtering an array collection using 2 or 3 textinputs

2013-03-07 Thread ZIONIST
the data is dynamic, coming from a database. the columns of the database i am 
filtering on are keywords, title and subject using 3 textinputs. i can only 
filter using one textinput based on keywords and i would also like to filter 
based on three parameters not just one. please guide me on exactly how to do 
this based on the code i shared.



[flexcoders] Re: filtering an array collection using 2 or 3 textinputs

2013-03-06 Thread ZIONIST
Hi Alex, i apply the result of the filtered archiveAr to the second array 
collection so as to use the Itemschangeeffect thats all. The generalSearch 
textinput only search's based on keywords, so in the event there are so many 
records with the same keywords i would like to drill down more by searching on 
other parameters too.



[flexcoders] Re: filtering an array collection using 2 or 3 textinputs

2013-03-05 Thread ZIONIST
Thanks, but am still having issues... i have just one textinput working and not 
perfectly. here is the code NB. i call keywordChangeHandler(event)on the change 
of the textinput

/*** code to get Archives */
//[Bindable]
private var archiveAr:ArrayCollection=new 
ArrayCollection();

/* [Bindable]
private var filteredAr:ArrayCollection = new 
ArrayCollection(archiveAr.toArray()); */

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

private function archiveResult(event:ResultEvent):void
{
archiveAr=event.result as ArrayCollection;
//filteredAr=event.result as ArrayCollection;
}

/*** Start Filter Functions 
***/

private var keywordText:String=keywords;



private function filterGrid():void
{
archiveAr.filterFunction=myFilterFunction;
archiveAr.refresh();

for (var i:int=archiveAr.length - 1; i = 0; 
i--)
{
if (!filteredAr.contains(archiveAr[i]))
{

filteredAr.addItem(archiveAr[i]);
}
}
for (i=filteredAr.length - 1; i = 0; i--)
{
if (!archiveAr.contains(filteredAr[i]))
{
filteredAr.removeItemAt(i);
}
}
}

private function filterReset():void
{

archiveAr.filterFunction=null;
archiveAr.refresh();

}

private function myFilterFunction(item:Object):Boolean
{
return item[keywordText].match(new 
RegExp(generalSearch.text, 'i'));
//return item[keywordText].match(new 
RegExp(^+generalSearch.text, 'i'));
}

private function keywordChangeHandler(event:Event):void
{
if (generalSearch.text != '')
{
filterGrid();
}
else
{
filterReset()
}   

}



[flexcoders] Re: filtering an array collection using 2 or 3 textinputs

2013-03-05 Thread ZIONIST
i would like to use the textinputs to filter the array collection using 
different parameters.



[flexcoders] Re: filtering an array collection using 2 or 3 textinputs

2013-03-05 Thread ZIONIST
Alex, i have an arraycollection (archiveAr) which i would like to filter based 
on the following multiple parameters; Keywords, title and subject. i would like 
to use 3 textinputs to do this. one for keywords, another for title and the 
last one for subject. Now i can only use one textinput to filter based on 
keywords and would like to have all of them filter the array collection 
depending on the users choice. below is the code i have so far. someone please 
help.

/*** code to get Archives */

 //[Bindable]

 private var archiveAr:ArrayCollection=new 
ArrayCollection();



 /* [Bindable]

 private var filteredAr:ArrayCollection = new

ArrayCollection(archiveAr.toArray()); */



 [Bindable]

 private var filteredAr:ArrayCollection=new 
ArrayCollection();



 private function archiveResult(event:ResultEvent):void

 {

 archiveAr=event.result as ArrayCollection;

 //filteredAr=event.result as ArrayCollection;

 }



 /*** Start Filter Functions 
***/



 private var keywordText:String=keywords;







 private function filterGrid():void

 {

 archiveAr.filterFunction=myFilterFunction;

 archiveAr.refresh();



 for (var i:int=archiveAr.length - 1; i = 0; 
i--)

 {

 if (!filteredAr.contains(archiveAr[i]))

 {

 
filteredAr.addItem(archiveAr[i]);

 }

 }

 for (i=filteredAr.length - 1; i = 0; i--)

 {

 if (!archiveAr.contains(filteredAr[i]))

 {

 filteredAr.removeItemAt(i);

 }

 }

 }



 private function filterReset():void

 {



 archiveAr.filterFunction=null;

 archiveAr.refresh();



 }



 private function myFilterFunction(item:Object):Boolean

 {

 return item[keywordText].match(new 
RegExp(generalSearch.text, 'i'));

 //return item[keywordText].match(new 
RegExp(^+generalSearch.text, 'i'));

 }



 private function keywordChangeHandler(event:Event):void

 {

 if (generalSearch.text != '')

 {

 filterGrid();

 }

 else

 {

 filterReset()

 }



 }  



[flexcoders] filtering an array collection using 2 or 3 textinputs

2013-03-04 Thread ZIONIST
Hi guys, can some help me with a simple example of filtering an array 
collection using 2 or three text inputs? please i will be very grateful.



[flexcoders] Re: filtering an array collection using 2 or 3 textinputs

2013-03-04 Thread ZIONIST
any help out there... am stuck.



[flexcoders] Re: filtering an array collection using 2 or 3 textinputs

2013-03-04 Thread ZIONIST
Thanks Andrew, could you please show me how that's done by use of an example. I 
can only do it with one textinput but i want to use different parameters to 
filter the array collection.



[flexcoders] Re: filtering an array collection using 2 or 3 textinputs

2013-03-04 Thread ZIONIST
any help guys? am really stuck.



[flexcoders] Re: Skinning scrollbar of iframe

2013-02-28 Thread ZIONIST
Any Help out there on this issues?

--- In flexcoders@yahoogroups.com, ZIONIST stinasius@... wrote:

 Hello Guys,
 
 i am using a iframe to render pdf in my flex app. i have skinned the 
 scrollbar for the entire app and it works perfectly except for the ifarme. i 
 would like to have consistency. would someone please help show me how to skin 
 ifame scroll bar in flex?





[flexcoders] Rounding specific corners of a textInput in flex

2013-02-27 Thread ZIONIST
Hi Guys,

How can i round specific corners of a flex textinput component?



[flexcoders] Re: Rounding specific corners of a textInput in flex

2013-02-27 Thread ZIONIST
I would like to round specific corners of the textinput its self not the focus 
rectangle.

--- In flexcoders@yahoogroups.com, Davidson, Jerry jerry.davidson@... wrote:

 cornerRadius?
 
 From the help for textInput focusRoundedCorners
 Specifies which corners of the focus rectangle should be rounded. This value 
 is a space-separated String that can contain any combination of tl, tr, 
 bl and br. For example, to specify that the right side corners should be 
 rounded, but the left side corners should be square, use tr br. The 
 cornerRadius style property specifies the radius of the rounded corners. The 
 default value depends on the component class; if not overridden for the 
 class, default value is tl tr bl br.
 
 But I don't see cornerRadius in the completion so either the above is wrong 
 or completion is wrong.
 
 
 
 From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On 
 Behalf Of ZIONIST
 Sent: Wednesday, February 27, 2013 2:40 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Rounding specific corners of a textInput in flex
 
 
 
 Hi Guys,
 
 How can i round specific corners of a flex textinput component?





[flexcoders] Skinning scrollbar of iframe

2013-02-27 Thread ZIONIST
Hello Guys,

i am using a iframe to render pdf in my flex app. i have skinned the scrollbar 
for the entire app and it works perfectly except for the ifarme. i would like 
to have consistency. would someone please help show me how to skin ifame scroll 
bar in flex? 



[flexcoders] rendering a pdf in flex application.

2013-02-25 Thread ZIONIST
Hello guys, i have a tilelist that is populated by array collection of items 
from a database. in the tilelist i show thumbnails of pdfs. i would like that 
when i click on one, it's repective pdf be shown in the flex application. how 
can i go about that?



[flexcoders] Custom Preloader

2012-07-10 Thread ZIONIST
Hi guys am trying to follow this example 
http://nightlycoding.com/index.php/2011/05/flex-preloader-with-greensock-tweenlite-and-tweenmax/
 to create the same preloader but am getting so many errors. Below is my code 
please advise where am going wrong.

CustomPreloader.as


package preloader
{

import flash.display.Sprite;
import flash.events.Event;
import flash.events.ProgressEvent;

import mx.events.FlexEvent;
import mx.events.RSLEvent;
import mx.preloaders.DownloadProgressBar;


public class CustomPreloader extends DownloadProgressBar
{

[Embed(source=/assets/talking.png)]

private var FlashPreloaderSymbol1:Class;

[Embed(source=/assets/film.png)]

private var FlashPreloaderSymbol2:Class;

[Embed(source=/assets/production.png)]

private var FlashPreloaderSymbol3:Class;


private var clip;

private var clip2;

private var clip3;

public function CustomPreloader()
{

super();

//getting the images into the loader

clip=new FlashPreloaderSymbol1();

clip2=new FlashPreloaderSymbol2();

clip3=new FlashPreloaderSymbol3();


//Adding images to stage

addChild(clip);

addChild(clip2);

addChild(clip3);

}

private var _preloader:Sprite; 

public override function set preloader(value:Sprite):void
{

_preloader = value;

//Center the images

centerPreloader();

// runtime shared library

value.addEventListener(RSLEvent.RSL_PROGRESS, 
onRSLDownloadProgress);

value.addEventListener(RSLEvent.RSL_COMPLETE, 
onRSLDownloadComplete);

//preloader.addEventListener(RSLEvent.RSL_ERROR, 
onRSLError);

// application

value.addEventListener(ProgressEvent.PROGRESS, 
onSWFDownloadProgress);

value.addEventListener(Event.COMPLETE, 
onSWFDownloadComplete);

// initialization

value.addEventListener(FlexEvent.INIT_PROGRESS, 
onFlexInitProgress);

value.addEventListener(FlexEvent.INIT_COMPLETE, 
onFlexInitComplete);

}

private function onRSLDownloadProgress(event:ProgressEvent):void
{

isRslDownloading=true;

rslBytesTotal=event.bytesTotal;

rslBytesLoaded=event.bytesLoaded;

rslPercent=Math.round((rslBytesLoaded / rslBytesTotal) 
* 100);

updateProgress();

}

private function onRSLDownloadComplete(event:RSLEvent):void
{

// We tween the color of the first image into an green 
tint, also adding a little blur to make it more impressive

TweenMax.to(clip, 2, {tint: 0xA3F40E, glowFilter: 
{color: 0xA3F40E, alpha: 1, blurX: 10, blurY: 10}});

rslPercent=100;

}

private function onSWFDownloadProgress(event:ProgressEvent):void
{

swfBytesTotal=event.bytesTotal;

swfBytesLoaded=event.bytesLoaded;



if (isRslDownloading)
   

[flexcoders] Re: getting the total of values of an array collection that is updated manually

2012-01-01 Thread ZIONIST
Never done that before, any pointers like sample code?



[flexcoders] Re: getting the total of values of an array collection that is updated manually

2012-01-01 Thread ZIONIST
Any help on how i can update the quantity of the existing item in the cart 
instead of duplicating it?



[flexcoders] Re: Using arraycollection as text for a flex TextArea Component.

2011-12-27 Thread ZIONIST
That works well. It actually outputs the contents of the arraycollection in the 
textarea component. One very small issue though, it outputs the word NULL 
before the last item in the arraycollection. How do i get rid of that?

Below is the update.

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

/*** Create an object to hold the data ***/
var obj:Object=new Object();

/*** Assign the variables to it ***/
obj.Product=product.text;
obj.Price=price.text;
obj.Qty=1;
obj.OrderNumber=label1.text;

/*** Add the object to the list ***/
orderColl.addItemAt(obj, 0);

Then i have a TextArea component (id=cart) and i try to assign the 
arraycollection to it as text like this

var txt:String;
var n:int=orderColl.length;
for (var i:int=0; i  n; i++)
{
var entry:Object=orderColl.getItemAt(i);
txt += entry.OrderNumber + , ++ entry.Product + , ++ entry.Qty 
++ Unit + ( + s + ) + , ++ $ + entry.Price ++ 
per unit + \n\n;
}
cart.text = txt;



[flexcoders] Using arraycollection as text for a flex TextArea Component.

2011-12-26 Thread ZIONIST
Hello Guys i have an arraycollection that is populated dynamically and would 
like to use the same arraycollection as text for a TextArea component. Below is 
my array collection

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

/*** Create an object to hold the data ***/
var obj:Object=new Object();

/*** Assign the variables to it ***/
obj.Product=product.text;
obj.Price=price.text;
obj.Qty=1;
obj.OrderNumber=label1.text;

/*** Add the object to the list ***/
orderColl.addItemAt(obj, 0);

Then i have a TextArea component (id=cart) and i try to assign the 
arraycollection to it as text like this

var str:String = orderColl.source.join(\n);
cart.text = str;

The result in the textarea is [object object]. Any help guys?



[flexcoders] Re: Using arraycollection as text for a flex TextArea Component.

2011-12-26 Thread ZIONIST
What i want is that after the client has finished selecting the items he/she 
wants to buy (Items selected make up the arraycollection orderColl), he/she 
should be able to preview the list of items they selected. so i want the 
contents of orderColl to be the text of the TextArea. Hope its now clear what 
am tring to do.



[flexcoders] Re: Using arraycollection as text for a flex TextArea Component.

2011-12-26 Thread ZIONIST
This is what i have come up with some far... Problem is that it only outputs 
the first entry in the ArrayCollection. So if a client selects more than one
item to buy, when he/she previews their selection, they will only see the first 
entry. Could someone please help me modify this to show all the entries
in the ArrayCollection.

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

/*** Create an object to hold the data ***/
var obj:Object=new Object();

/*** Assign the variables to it ***/
obj.Product=product.text;
obj.Price=price.text;
obj.Qty=1;
obj.OrderNumber=label1.text;

/*** Add the object to the list ***/
orderColl.addItemAt(obj, 0);

Then i have a TextArea component (id=cart) and i try to assign the 
arraycollection to it as text like this

var txt:String;
var n:int=orderColl.length;
for (var i:int=0; i  n; i++)
{
var entry:Object=orderColl.getItemAt(i);
txt = entry.OrderNumber +   + , +   + entry.Product +   + , + 
  + entry.Qty +   + , +   + entry.Price;
}
cart.text = txt.toString();



[flexcoders] Re: getting the total of values of an array collection that is updated manually

2011-12-21 Thread ZIONIST
Hi guys, thanks to your help i have managed to get it to work finally. One 
question though, is this best practice? Below is the code.


?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=horizontal
xmlns:ns1=*
xmlns:ns2=as_logic.*
mx:states
mx:State name=dark
mx:SetProperty target={product}
name=text
value=Dark Chocolate/
mx:SetProperty target={price}
name=text
value=50/
/mx:State
mx:State name=spread
mx:SetProperty target={product}
name=text
value=Drinking 
Chocolate/
mx:SetProperty target={price}
name=text
value=100/
/mx:State
/mx:states

mx:Script
![CDATA[
import mx.events.FlexEvent;
import mx.controls.listClasses.ListData;
import mx.collections.ArrayCollection;
import mx.events.CollectionEvent;

[Bindable]
public var orderColl:ArrayCollection=new 
ArrayCollection();

private function addProduct():void
{

/*** Create an object to hold the data ***/
var obj:Object=new Object();

/*** Assign the variables to it ***/
obj.Product=product.text;
obj.Price=price.text;
obj.Qty=1;

/*** Add the object to the list ***/
orderColl.addItemAt(obj, 0);

orderColl.addEventListener(CollectionEvent.COLLECTION_CHANGE, calculateSum);
}

public function deleteOrder():void
{

/*** Remove the item from the array collection 
***/
orderColl.removeItemAt(products.selectedIndex);

orderColl.addEventListener(CollectionEvent.COLLECTION_CHANGE, calculateSum);
}

/* public function changeQty(event:Event):void
{
var currentlySelectedItem:Object = 
products.selectedItem;
currentlySelectedItem.Qty =  qty.text;
}
 */

public function calculateSum(event:CollectionEvent):void
{
var amt:Number=0;
var n:int=orderColl.length;
for (var i:int=0; i  n; i++)
{
var 
cartEntry:Object=orderColl.getItemAt(i);
amt+=cartEntry.Qty * cartEntry.Price;
}
sum.text=usdFormatter.format(amt.toString());
}
]]
/mx:Script

mx:DefaultTileListEffect id=dtle0
  fadeOutDuration=300
  fadeInDuration=300
  moveDuration=650
  color=0xff/

mx:CurrencyFormatter id=usdFormatter
  precision=0
  currencySymbol=$
  alignSymbol=left/


mx:Canvas width=500
   height=300
mx:Label x=10
  y=10
  text=Milk Chocolate
  id=product/
mx:Label x=10
  y=36
  text=10
  id=price/
mx:Button x=10
   y=62
   label=submit
   click=addProduct()/
mx:Button x=10
   y=92
  

[flexcoders] Re: getting the total of values of an array collection that is updated manually

2011-12-21 Thread ZIONIST
How do you do that?



[flexcoders] Re: getting the total of values of an array collection that is updated manually

2011-12-14 Thread ZIONIST
 Guys any help on how to get to what alex is suggested?



[flexcoders] Re: getting the total of values of an array collection that is updated manually

2011-12-13 Thread ZIONIST
Jerry this is not a thread about spam. Guys any help on how to get to what alex 
is suggested?



[flexcoders] Re: getting the total of values of an array collection that is updated manually

2011-12-12 Thread ZIONIST
Thanks Alex... it goes without saying, am only a novice at flex so i not sure i 
knw how to work with textinput events. Any example on how to do wht you just 
suggested will be of great help.



[flexcoders] Re: getting the total of values of an array collection that is updated manually

2011-12-10 Thread ZIONIST
I have modified the app using Alex Harui's solution and it works when i add a 
product to the cart and also updates the total when i delete an item from the 
cart. But when i edit the quantity in the text input, the total does not get 
updated. Below is the modified version. Anything am missing?



?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=horizontal
xmlns:ns1=*
xmlns:ns2=as_logic.*
mx:states
mx:State name=dark
mx:SetProperty target={product}
name=text
value=Dark Chocolate/
mx:SetProperty target={price}
name=text
value=50/
/mx:State
mx:State name=spread
mx:SetProperty target={product}
name=text
value=Drinking 
Chocolate/
mx:SetProperty target={price}
name=text
value=100/
/mx:State
/mx:states

mx:Script
![CDATA[
import mx.events.FlexEvent;
import mx.controls.listClasses.ListData;
import mx.collections.ArrayCollection;
import mx.events.CollectionEvent;

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

private function addProduct():void
{

/*** Create an object to hold the data ***/
var obj:Object=new Object();

/*** Assign the variables to it ***/
obj.Product=product.text;
obj.Price=price.text;
obj.Qty=1;

/*** Add the object to the list ***/
orderColl.addItemAt(obj, 0);

orderColl.addEventListener(CollectionEvent.COLLECTION_CHANGE, calculateSum);
}

public function deleteOrder():void
{

/*** Remove the item from the array collection 
***/
orderColl.removeItemAt(products.selectedIndex);

orderColl.addEventListener(CollectionEvent.COLLECTION_CHANGE, calculateSum);
}

public function changeQty(event:Event):void
{

orderColl.addEventListener(CollectionEvent.COLLECTION_CHANGE, calculateSum);
}


public function calculateSum(event:CollectionEvent):void
{
var amt:Number=0;
var n:int=orderColl.length;
for (var i:int=0; i  n; i++)
{
var 
cartEntry:Object=orderColl.getItemAt(i);
amt+=cartEntry.Qty * cartEntry.Price;
}
sum.text=usdFormatter.format(amt.toString());
}
]]
/mx:Script

mx:DefaultTileListEffect id=dtle0
  fadeOutDuration=300
  fadeInDuration=300
  moveDuration=650
  color=0xff/

mx:CurrencyFormatter id=usdFormatter
  precision=0
  currencySymbol=$
  alignSymbol=left/


mx:Canvas width=500
   height=300
mx:Label x=10
  y=10
  text=Milk Chocolate
  id=product/
mx:Label x=10
  y=36
  text=10
  id=price/
mx:Button x=10
   y=62
   label=submit
  

[flexcoders] Re: getting the total of values of an array collection that is updated manually

2011-12-09 Thread ZIONIST
Hi Guys, i have finally got the total to update when new items are added to the 
cart. One thing that i have failed to do is to get the total to update when 
quantity is changed and when a product is removed from the cart(list 
component). Any help on this? Here is the latest code that only gets the total 
to update when a new product is added.

App


?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=horizontal
xmlns:ns1=*
xmlns:ns2=as_logic.*
mx:states
mx:State name=dark
mx:SetProperty target={product}
name=text
value=Dark Chocolate/
mx:SetProperty target={price}
name=text
value=50/
/mx:State
mx:State name=spread
mx:SetProperty target={product}
name=text
value=Drinking 
Chocolate/
mx:SetProperty target={price}
name=text
value=100/
/mx:State
/mx:states

mx:Script
![CDATA[
import mx.controls.listClasses.ListData;
import mx.collections.ArrayCollection;

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

private function addProduct():void
{

//Create an object to hold the data
var obj:Object=new Object();
//Assign the variables to it
obj.Product=product.text;
obj.Price=price.text;
//Add the object to the list
orderColl.addItemAt(obj, 0);

}

public function deleteOrder():void
{

//Remove the item from the array collection
orderColl.removeItemAt(products.selectedIndex);

}   

public function init():void
{
var total:Number=0;
for (var i:String in orderColl)
{
total+=Number(orderColl[i].Price);
}
sum.text=usdFormatter.format(total.toString());
}
]]
/mx:Script

mx:DefaultTileListEffect id=dtle0
  fadeOutDuration=300
  fadeInDuration=300
  moveDuration=650
  color=0xff/

mx:CurrencyFormatter id=usdFormatter
  precision=0
  currencySymbol=$
  alignSymbol=left/


mx:Canvas width=500
   height=300
mx:Label x=10
  y=10
  text=Milk Chocolate
  id=product/
mx:Label x=10
  y=36
  text=10
  id=price/
mx:Button x=10
   y=62
   label=submit
   click=addProduct();init()/
mx:Button x=10
   y=92
   label=Change State
   click=currentState='dark'/
mx:Button x=10
   y=122
   label=Drinking Chocolate
   click=currentState='spread'/
/mx:Canvas

mx:VBox width=340
 height=340
 horizontalAlign=center
 verticalAlign=middle

ns2:transparentList id=products
 width=300
 

[flexcoders] Re: getting the total of values of an array collection that is updated manually

2011-12-05 Thread ZIONIST
anyone with an example similar to wht am trying to do?



[flexcoders] Re: getting the total of values of an array collection that is updated manually

2011-12-05 Thread ZIONIST
Tried that but it doesn't work. What am trying to do is to get the total price 
updated as new objects are added to the arraycollection that populates the list 
and also when the qty is changed the total updates too. could some one please 
help me.

--- In flexcoders@yahoogroups.com, Csomák Gábor csomakk@... wrote:

 if i get your problem right, this will help. however, i didn't match the
 name of the arraycollection to yours
 
 var sum:Number=0
 for(i:String in arraycollectionvar){
 sum+=arraycollectionvar[i];
 }
 //here is the sum you need.
 
 On Mon, Dec 5, 2011 at 3:57 PM, ZIONIST stinasius@... wrote:
 
 
 
  anyone with an example similar to wht am trying to do?
 
   
 





[flexcoders] Re: getting the total of values of an array collection that is updated manually

2011-12-04 Thread ZIONIST
Any code samples guys? That would help so shade light on the matter clearly.



[flexcoders] getting the total of values of an array collection that is updated manually

2011-12-02 Thread ZIONIST
Hi Guys, i would like to get the total price calculated as an array collection 
for a list is populated plus i would like to update the total when the quantity 
changes too. Here is the code i have so far, could someone please help me 
correct it.

Main App
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=horizontal
xmlns:ns1=*
mx:states
mx:State name=dark
mx:SetProperty target={product}
name=text
value=Dark Chocolate/
mx:SetProperty target={price}
name=text
value=50/
/mx:State
mx:State name=spread
mx:SetProperty target={product}
name=text
value=Drinking 
Chocolate/
mx:SetProperty target={price}
name=text
value=100/
/mx:State
/mx:states

mx:Script
![CDATA[
import mx.controls.listClasses.ListData;
import mx.collections.ArrayCollection;

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

private function addProduct():void
{

//Create an object to hold the data
var obj:Object=new Object();
//Assign the variables to it
obj.Product=product.text;
obj.Price=price.text;
//Add the object to the list
orderColl.addItem(obj);

}

private function deleteOrder():void
{

//Remove the item from the array collection
orderColl.removeItemAt(products.selectedIndex);

}

private function init():void
{
var n:int=orderColl.length;
var total:Number=0;
for (var i:int=0; i  n; i++)
{

//total+=orderColl[i][products.item.Price];
total+=orderColl[i].Price++;
}
sum.text=total.toString();

}
]]
/mx:Script

mx:Canvas width=500
   height=300
mx:Label x=10
  y=10
  text=Milk Chocolate
  id=product/
mx:Label x=10
  y=36
  text=10
  id=price/
mx:Button x=10
   y=62
   label=submit
   click=addProduct();init()/
mx:Button x=10
   y=92
   label=Change State
   click=currentState='dark'/
mx:Button x=10
   y=122
   label=Drinking Chocolate
   click=currentState='spread'/
/mx:Canvas

mx:VBox width=340
 height=340
 horizontalAlign=center
 verticalAlign=middle
mx:List id=products
 width=300
 height=300
 dataProvider={orderColl}
 itemRenderer=orderRenderer/
mx:HBox
mx:Label text=Total:
  color=#FF
  fontWeight=bold/
mx:Label id=sum
  text=${}/
/mx:HBox
/mx:VBox

/mx:Application


Item Renderer (orderRenderer.mxml)

?xml version=1.0 encoding=utf-8?
mx:HBox xmlns:mx=http://www.adobe.com/2006/mxml;
 width=100%
 height=100%
 

[flexcoders] Re: getting the total of values of an array collection that is updated manually

2011-12-02 Thread ZIONIST
Hey guys! any help with my Predicament?



[flexcoders] Re: getting the total of values of an array collection that is updated manually

2011-12-02 Thread ZIONIST
Any solution for my problem guys? I would be very grateful.



[flexcoders] Using Scale 9 in Flex css

2011-11-21 Thread ZIONIST
Hi guys i have a .png image that is 400 px by 250 px and would like to use it 
as a background image of a canvas in flex that is 840 px wide and 600 px high. 
when i set the image as a background image for the canvas and i set 
backgroundSize to 100%, the image stretches. How can i use 9-slice scaling to 
make it look good.  



[flexcoders] Re: using a coldfusion proxy to show twitter feed in flex app

2011-10-08 Thread ZIONIST
Hi guys, i have changed from using a cfc to using cfm. And when i do a cfdump, 
i get the feed showing up. When i try to point flex to the cfm, and run the app 
i get no data. Below is the code. Could someone please help.

flex code


?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute
creationComplete=init()

mx:Script
![CDATA[
import mx.collections.ArrayCollection;
import mx.rpc.events.ResultEvent;

[Bindable]
private var _rssResults:ArrayCollection;

private namespace atom=http://www.w3.org/2005/Atom;;
use namespace atom;

private function processResult(event:ResultEvent):void
{
var xmlList:XMLList=event.result.channel.item 
as XMLList;
for each (var item:XML in xmlList)
{
var myDate:String=item.PUBLISHEDDATE;
myDate=myDate.slice(0, 22);
_rssResults.addItem({title: item.TITLE, 
date: myDate});
}
}

private function init():void
{
_rssResults=new ArrayCollection();
tweetFeed.send();
}
]]
/mx:Script

mx:HTTPService id=tweetFeed
url=cfcs/twitter.cfm
result=processResult(event)
resultFormat=e4x/

mx:List id=twitterFeed dataProvider={_rssResults}
 itemRenderer=itemRenderers.tweetFeedRenderer/

/mx:Application

Coldfusion Code
===
cfset feedurl = http://search.twitter.com/search.atom?q=from%3ARealtrOnline; 
/
cffeed source=#feedurl# properties=feedmeta query=feeditems /
cfdump var= #feeditems# label= feedItems /



[flexcoders] Re: using a coldfusion proxy to show twitter feed in flex app

2011-10-07 Thread ZIONIST
Hi guys below is the code i came up with but i get this error 
faultCode:Server.Processing faultString:'Unable to invoke CFC - The method 
'getTweets' in component 
C:\ColdFusion9\wwwroot\twiiterCFlex\src\cfcs\twitter.cfc cannot be accessed 
remotely.' faultDetail:''

flex code
=


?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute
creationComplete=tweetSvc.getTweets()

mx:Script
![CDATA[
import mx.rpc.events.ResultEvent;
import mx.rpc.events.FaultEvent;
import mx.collections.ArrayCollection;
import mx.controls.Alert;
import mx.managers.CursorManager;
[Bindable]
private var tweetAr:ArrayCollection;

private function tweetResult(event:ResultEvent):void
{
tweetAr=event.result as ArrayCollection;
}
]]
/mx:Script

mx:RemoteObject id=tweetSvc
 destination=ColdFusion
 source=twiiterCFlex.src.cfcs.twitter
 showBusyCursor=true
 
fault=CursorManager.removeBusyCursor();Alert.show(event.fault.message)

mx:method name=getTweets
   result=tweetResult(event)/

/mx:RemoteObject

mx:List id=twitterFeed
 dataProvider={tweetAr}
 itemRenderer=itemRenderers.tweetFeedRenderer/

/mx:Application


coldfusion cfc
===

cfcomponent
cffunction name=getTweets access=public returntype=query
   

cfset var qryGetTweets =  /

cffeed source=http://twitter.com/status/user_timeline/RealtrOnline; 
properties=meta query=qryGetTweets /

cfreturn qryGetTweets /
/cffunction
/cfcomponent

What am i missing?



[flexcoders] Re: using a coldfusion proxy to show twitter feed in flex app

2011-10-07 Thread ZIONIST
I changed access to 'remote' on the cfc and when i run it i get this error 
faultCode:Server.Processing faultString:'Unable to invoke CFC - Unable to 
parse the feed: Either source specified is invalid or feed is malformed.' 
faultDetail:'Error: Invalid XML'



[flexcoders] Re: using a coldfusion proxy to show twitter feed in flex app

2011-10-07 Thread ZIONIST
any help guys. Am kinda stuck here.



[flexcoders] Re: using a coldfusion proxy to show twitter feed in flex app

2011-10-04 Thread ZIONIST
Any help Guys?



[flexcoders] using a coldfusion proxy to show twitter feed in flex app

2011-10-01 Thread ZIONIST
Hi guys, am looking for a nice step by step that shows how to use a coldfusion 
proxy(not php) to show a twitter feed in flex. 



[flexcoders] Re: Using modules and remote objects

2010-09-06 Thread ZIONIST
so hw do i solve the problem while still using modules?



[flexcoders] Using modules and remote objects

2010-09-04 Thread ZIONIST
Hi guys i have some issues concerning modules and remote objects. i have an 
application that is split into modules and in each i use remote objects to 
display data from the database. the problem is there is no data being displayed 
and when i try to use the same code in a single app without using modules, the 
data is displayed. could someone please help me out here. i really need to use 
modules because it helps reduce the size of my app. 



[flexcoders] Re: separate flex apps in same webroot folder

2010-09-02 Thread ZIONIST
i fixed it. Thanks alot guys



[flexcoders] Re: separate flex apps in same webroot folder

2010-09-01 Thread ZIONIST
am not sure i understand your question... all i did is develop the two apps 
separately and deployed the release build version of the site to the wwwroot 
folder on the host server and the release build version of the admin site to 
the admin folder in the wwwroot folder.




[flexcoders] Re: separate flex apps in same webroot folder

2010-09-01 Thread ZIONIST
i already have framework_.xx in the admin folder.




[flexcoders] Re: separate flex apps in same webroot folder

2010-09-01 Thread ZIONIST
when i put the afriquesuitesAdmin.swf and afriquesuitesAdmin.html in the main 
folder, it still doesn't work. 




[flexcoders] Re: separate flex apps in same webroot folder

2010-09-01 Thread ZIONIST
on my development pc the two apps work perfectly.



[flexcoders] Re: separate flex apps in same webroot folder

2010-09-01 Thread ZIONIST
NO its still not working on mine. 



[flexcoders] Re: separate flex apps in same webroot folder

2010-09-01 Thread ZIONIST
Am using vista so i can't find the assetcache, but i cleared all cache and 
cookies from google chrome but still the app doesn't load. Are you sure it's 
loading on yours?



[flexcoders] Re: separate flex apps in same webroot folder

2010-09-01 Thread ZIONIST
i have cleared the assetcache of flash player but still cant load the site.




[flexcoders] Re: separate flex apps in same webroot folder

2010-09-01 Thread ZIONIST
trying now. will let you know how it goes



[flexcoders] Remote Objects not working with Modules

2010-07-22 Thread ZIONIST
Hi guys, i am experiencing something weired. i have an application and i have 
broken it up into modules so as to reduce the size of the application so 
archive faster download speed for the app. anyhow, i use ColdFusion to 
retrieve, insert, edit and delete data from a database and when i use Remote 
Objects in modules there is no data retrieve or added, but when is use custom 
components method instead of modules with the very same code, the data can be 
inserted or retrieved. can someone please help me and clarify on how to 
successful use remote objects with modules to manipulate a database with 
ColdFusion as the back end. thanks   



[flexcoders] embedding an html file (fader.htm) in flex application

2010-07-19 Thread ZIONIST
Hi guys i have an html file (fader.htm) and i would like to embed it in my flex 
application. could someone please help me on how to archive this. thanks



[flexcoders] Re: Any PHP developers who knw ColdFusion and can help me convert this php code

2010-07-02 Thread ZIONIST
Please help guys...



[flexcoders] Any PHP developers who knw ColdFusion and can help me convert this php code

2010-06-29 Thread ZIONIST
hi guys i am developing an eCommerce app using flex and ColdFusion and i would 
like to use PayPal as a way to make payments. i stumbled on a very nice 
tutorial on how to Integrate PayPal Express Checkout with Flex and Adobe AIR 
(http://www.adobe.com/devnet/flex/articles/flex_paypal_02.html). the only 
problem is that he uses php as the server side language and i would like to use 
ColdFusion. can someone please help me to convert the following code to 
ColdFusion. here it is

[b]startPaymentFlex.php[/b]

?php
require_once 'ppNVP/CallerService.php';
require_once 'ppNVP/constants.php';

session_start ();

$token = $_REQUEST ['token'];
if (! isset ( $token )) {
$serverName = $_SERVER ['SERVER_NAME'];
$serverPort = $_SERVER ['SERVER_PORT'];
$url = dirname ( 'http://' . $serverName . ':' . $serverPort . $_SERVER 
['REQUEST_URI'] );

function getMovieAmount($movieId) {
//you can replace this function with a more sophisticated one
return 1;
}


$paymentAmount = getMovieAmount($_GET['movieId']); //$_REQUEST 
['paymentAmount'];
$currencyCodeType = 'USD'; //$_REQUEST ['currencyCodeType'];
$paymentType = 'Sale'; //$_REQUEST ['paymentType'];


/* The returnURL is the location where buyers return when a
payment has been succesfully authorized.
The cancelURL is the location buyers are sent to when 
they hit the
cancel button during authorization of payment during 
the PayPal flow
*/

$returnURL = urlencode ( $url . 
'/GetExpressCheckoutDetails.php?currencyCodeType=' . $currencyCodeType . 
'paymentType=' . $paymentType . 'paymentAmount=' . $paymentAmount );
$cancelURL = urlencode ( $url/cancel.php?paymentType=$paymentType );

/* Construct the parameter string that describes the PayPal payment
the varialbes were set in the web form, and the 
resulting string
is stored in $nvpstr
*/

$nvpstr = Amt= . $paymentAmount . PAYMENTACTION= . $paymentType . 
ReturnUrl= . $returnURL . CANCELURL= . $cancelURL . CURRENCYCODE= . 
$currencyCodeType;

/* Make the call to PayPal to set the Express Checkout token
If the API call succeded, then redirect the buyer to 
PayPal
to begin to authorize payment.  If an error occured, 
show the
resulting errors
*/
$resArray = hash_call ( SetExpressCheckout, $nvpstr );
$_SESSION ['reshash'] = $resArray;

$ack = strtoupper ( $resArray [ACK] );

if ($ack == SUCCESS) {
// Redirect to paypal.com here
$token = urldecode ( $resArray [TOKEN] );
$payPalURL = PAYPAL_URL . $token;
header ( Location:  . $payPalURL );
} else {
//Redirecting to APIError.php to display errors. 
$location = APIError.php;
header ( Location: $location );
}

} else {
/* At this point, the buyer has completed in authorizing payment
at PayPal.  The script will now call PayPal with the 
details
of the authorization, incuding any shipping information 
of the
buyer.  Remember, the authorization is not a completed 
transaction
at this state - the buyer still needs an additional 
step to finalize
the transaction
*/

$token = urlencode ( $_REQUEST ['token'] );

/* Build a second API request to PayPal, using the token as the
ID to get the details on the payment authorization
*/
$nvpstr = TOKEN= . $token;

/* Make the API call and store the results in an array.  If the
call was a success, show the authorization details, and 
provide
an action to complete the payment.  If failed, show the 
error
*/
$resArray = hash_call ( GetExpressCheckoutDetails, $nvpstr );
$_SESSION ['reshash'] = $resArray;
$ack = strtoupper ( $resArray [ACK] );

if ($ack == SUCCESS) {
require_once GetExpressCheckoutDetails.php;
} else {
//Redirecting to APIError.php to display errors. 
$location = APIError.php;
header ( Location: $location );
}
}

?



[flexcoders] Re: flex/coldfusion paypal example

2010-05-08 Thread ZIONIST
Anyone out there with a solution of integrating flex and paypal? please help. 
thanks 



[flexcoders] flex/coldfusion paypal example

2010-04-27 Thread ZIONIST
hey guys i would like to know how to use paypal to make payments for goods on 
my flex/coldfusion app. basically, a person clicks to buy something and he is 
redirected to paypal, makes the payment then redirected back to the flex app. 
would like to use coldfusion as the server language. any help?



[flexcoders] Re: flex/coldfusion paypal example

2010-04-27 Thread ZIONIST
Hey Guys, any help?



[flexcoders] making flex app SEO friendly

2010-03-28 Thread ZIONIST
How can i make my flex application more Search Engine Optimization friendly? i 
would like my app to be indexed in major search engines like google and bing 
and rank higher too. any way of doing this or are there companies that 
specialize in this?



[flexcoders] Re: using a class once throughout the all app

2010-02-25 Thread ZIONIST
Hey i think i came across something very useful. first i have to say if your 
app is big, split it up into modules. and also use rsl. now i came across this 
in the flex help. have not tried it yet but it looks like it might help brind 
down the size of the modules. here it is

Reducing module size 
Module size varies based on the components and classes that are used in the 
module. By default, a module includes all framework code that its components 
depend on, which can cause modules to be large by linking classes that overlap 
with the application's classes.

To reduce the size of the modules, you can optimize the module by instructing 
it to externalize classes that are included by the application. This includes 
custom classes and framework classes. The result is that the module includes 
only the classes it requires, while the framework code and other dependencies 
are included in the application.

To externalize framework classes with the command-line compiler, you generate a 
linker report from the application that loads the modules. You then use this 
report as input to the module's load-externs compiler option. The compiler 
externalizes all classes from the module for which the application contains 
definitions. This process is also necessary if your modules are in a separate 
project from your main application in Flex Builder.

Create and use a linker report with the command-line compiler

Generate the linker report and compile the application:mxmlc 
-link-report=report.xml MyApplication.mxml

The default output location of the linker report is the same directory as the 
compiler. In this case, it would be in the bin directory.

Compile the module and pass the linker report to the load-externs option:mxmlc 
-load-externs=report.xml MyModule.mxml




[flexcoders] using a class once throughout the all app

2010-02-24 Thread ZIONIST
Hi guys, in my research on how to reduce the size of a flex application swf, i 
was led to believe that classes are one of the factors that contribute to the 
size of any flex swf and in order to reduce the size, one has to make sure he 
only calls the classes that are needed. but again i noticed that certain 
classes are used more than once in an app, take for example, popup class, i my 
have about three titlewindow custom components that i use for popup and on each 
i call the popup class. is there a way to call all classes used only once in 
the main app file and use them throughout the all application like the way we 
use css and if so will that help bring down the size of the complete 
application?



[flexcoders] Re: Animating items in a tilelist when filtering arraycollection

2010-02-16 Thread ZIONIST
Hey Valdhor, this is exactly what i was looking for. i have tried it out and it 
works exactly like what i expected. thanks a lot bro.



Re: [SPAM] [flexcoders] Animating items in a tilelist when filtering arraycollection

2010-02-13 Thread ZIONIST
Hi Valdhor, i have sent a new stand alone app to you email 
valdhorli...@embarqmail.com that does not require any application server and 
database, just uses xml to store data. hope you can work around with this one. 



Re: [SPAM] [flexcoders] Animating items in a tilelist when filtering arraycollection

2010-02-12 Thread ZIONIST
sent to valdhorli...@embarqmail.com



Re: [SPAM] [flexcoders] Animating items in a tilelist when filtering arraycollection

2010-02-11 Thread ZIONIST
hi Valdhor i sent the self contained app to your email. hope you got it.



[flexcoders] Re: how to show a preloader (loading spinner) when loading images in a flex app.

2010-02-10 Thread ZIONIST
disregard it, i finally got it to work using states and the complete event of 
the image control.



Re: [SPAM] [flexcoders] Animating items in a tilelist when filtering arraycollection

2010-02-10 Thread ZIONIST
okay this is exactly what am doing. i have an arraycollection(dataAr) that is 
populated by data from a database. i have a multiple filter function that i use 
to filter the arraycollection(dataAr) and each time its filtered i refresh it. 
i then assign the filtered arraycollection(dataAr) to a new 
arraycollection(copydataAr), which i use as the dataprovider for the tilelist. 
here is a snippet of the code.

[Bindable]
private var dataAr:ArrayCollection = new ArrayCollection;
public function displayResult(event:ResultEvent):void{  
dataAr = new ArrayCollection((event.result as 
ArrayCollection).source);
}

private function filterGrid():void{
dataAr.filterFunction=myFilterFunction;
dataAr.refresh();
}

private function myFilterFunction(item:Object): Boolean{
return(item.city == selectedCity || selectedCity == All)  
(item.location == selectedLocation || selectedLocation == All) 
(item.bedrooms = selectedbdrm || selectedbdrm == -- Choose One --) 
 
(item.bathrooms = selectedbathrm || selectedbathrm == -- Choose One 
--) 
(item.category == category.selectedValue)
(!garageSelected || item.garages)
(!tileflrSelected || item.tile_floor)
(!hardwoodflrSelected || item.hardwood_floor)
(!laminateflrSelected || item.laminate_floor)
(!balconySelected || item.balcony)
(!yardSelected || item.backyard)
(!closetSelected || item.closets)
(!poolSelected || item.pool);   
 
}

private var selectedCity : String = All;
private var selectedLocation : String = All;
private var selectedValue: Boolean;  
private var selectedbdrm : String = -- Choose One --;
private var selectedbathrm : String = -- Choose One --;
private var poolSelected: Boolean = false;
private var yardSelected: Boolean = false;
private var closetSelected: Boolean = false;
private var garageSelected: Boolean = false;
private var tileflrSelected: Boolean = false;
private var hardwoodflrSelected: Boolean = false;
private var laminateflrSelected: Boolean = false;
private var balconySelected: Boolean = false;

private function cityChangeHandler(event:Event):void{
if( city_cb.selectedItem != null )
selectedCity = city_cb.selectedLabel;
filterGrid();   
currentState = '';
}

private function locationChangeHandler(event:Event):void{
if( lct_cb.selectedItem != null )
selectedLocation = lct_cb.selectedLabel;
filterGrid();   
currentState = '';
}

private function bedroomChangeHandler(event:Event):void{
if( room_cb.selectedItem != null )
selectedbdrm = room_cb.selectedLabel;
filterGrid();   
currentState = '';
}

private function bathroomChangeHandler(event:Event):void{
if( bath_cb.selectedItem != null )
selectedbathrm = bath_cb.selectedLabel;
filterGrid();   
currentState = '';
}

private function categoryChangeHandler(event:Event):void{
if(category.selectedValue != null)
selectedValue = category.selectedValue;
filterGrid();
currentState = '';
vidz.player.stop(); 
}

private function poolFilter():void{ 
poolSelected = pool_ckb.selected;

filterGrid();
currentState = '';
}

private function yardFilter():void{ 
yardSelected = yard_ckb.selected;

filterGrid();
currentState = '';
}

private function closetFilter():void{   
closetSelected = closet_ckb.selected;

filterGrid();
currentState = '';
}

private function garageFilter():void{   
garageSelected = garage_ckb.selected;

filterGrid();
currentState = '';
}

private function tileflrFilter():void{  
tileflrSelected = floor_tiles.selected;

filterGrid();
currentState = '';
}

private function hardwoodflrFilter():void{  
hardwoodflrSelected = hardwood_floors.selected;

filterGrid();
currentState = '';
}

private function laminateflrFilter():void{  
laminateflrSelected = laminate_floors.selected;

filterGrid();
currentState = '';
}

private function 

Re: [SPAM] [flexcoders] Animating items in a tilelist when filtering arraycollection

2010-02-09 Thread ZIONIST
hi guys any help?




[flexcoders] Re: flex ftp client with coldfusion

2010-02-09 Thread ZIONIST
can this be done?



[flexcoders] Re: how to show a preloader (loading spinner) when loading images in a flex app.

2010-02-09 Thread ZIONIST
Hi guys, has anyone tried this with an itemRenderer and 2 states? please help.



[flexcoders] flex ftp client with coldfusion

2010-02-07 Thread ZIONIST
Hi guys anyone who has achieved this please share. i have realized the normal 
flex upload is not that effective when it comes to uploading large files, so i 
would think using ftp would be more effective. i have an upload form in flex 
using coldfusion that uploads videos and converts them to .flv it works 
perfectly but on slow connects breaks, is there a way to have the same done but 
instead use ftp? thanks 



Re: [SPAM] [flexcoders] Animating items in a tilelist when filtering arraycollection

2010-02-07 Thread ZIONIST
hi Tracy, i tried doing as you said, i have my dataprovider (dataAr) which i 
filter and then assign the result to another arraycollection (copydataAr) which 
i then use as the dataprovider for my tilelist. this has not worked though. 
maybe there is something am doing wrong. here is the code so far.

[Bindable]
private var dataAr:ArrayCollection = new ArrayCollection;
public function displayResult(event:ResultEvent):void{  
dataAr = new ArrayCollection((event.result as 
ArrayCollection).source);
}

[Bindable]
private var copydataAr:ArrayCollection = cloneCollection(dataAr);

private function filterGrid():void{
dataAr.filterFunction=myFilterFunction;
}

private function myFilterFunction(item:Object):Boolean{
return(item.city == selectedCity || selectedCity == All)  
(item.location == selectedLocation || selectedLocation == All) 
(item.bedrooms == selectedbdrm || selectedbdrm == -- Choose One --) 
 
(item.bathrooms == selectedbathrm || selectedbathrm == -- Choose One 
--) 
(item.category == category.selectedValue)
(!garageSelected || item.garages)
(!tileflrSelected || item.tile_floor)
(!hardwoodflrSelected || item.hardwood_floor)
(!laminateflrSelected || item.laminate_floor)
(!balconySelected || item.balcony)
(!yardSelected || item.backyard)
(!closetSelected || item.closets)
(!poolSelected || item.pool);   
 
}

private function 
cloneCollection(dataAr:ArrayCollection):ArrayCollection{
var copydataAr:ArrayCollection = new ArrayCollection();
copydataAr.source = copydataAr.source.concat(dataAr.source);
return copydataAr;
}

// Syncs destination collection2 to source collection1, removing or 
adding items as necessary. Assumes the source collection is sorted
private function syncCollection(collection1:ArrayCollection, 
collection2:ArrayCollection):void{
var idx:int = 0;

while (idx  collection1.length  idx  collection2.length)
if (collection2[idx]  collection1[idx])
collection2.removeItemAt(idx);
else{
if (collection2[idx]  collection1[idx])

collection2.addItemAt(collection1[idx],idx)
idx++;
}

while (idx  collection1.length)
collection2.addItemAt(collection1[idx],idx++);
while (idx  collection2.length)
collection2.removeItemAt(idx);
}

then on the individual components,

private function cityChangeHandler(event:Event):void{
if( city_cb.selectedItem != null )
selectedCity = city_cb.selectedLabel;
filterGrid();
dataAr.refresh();
syncCollection(dataAr,copydataAr);
currentState = '';
}

private function locationChangeHandler(event:Event):void{
if( lct_cb.selectedItem != null )
selectedLocation = lct_cb.selectedLabel;
filterGrid();
dataAr.refresh();
syncCollection(dataAr,copydataAr);  
currentState = '';
} etc 



[flexcoders] Re: how to show a preloader (loading spinner) when loading images in a flex app.

2010-02-06 Thread ZIONIST
Hi i tried using states to archive this but i dont know how to listen for 
completion of image loading. this is what i have so far. 

mx:Canvas width=75 height=75  
controls:SuperImage width=75 height=75 
source=assets/homeprofile_pics/{data.img} borderStyle=none x=0 y=0 
creationComplete=imgLoaded(event)/
mx:SWFLoader source=assets/wait.swf x=29.5 
y=32.5 id=swfloader1/
/mx:Canvas

i put the image and the spinner.swf in a canvas, the create another state where 
the spinner is taken out.

mx:states
mx:State name=remove_loader
mx:RemoveChild target={swfloader1}/
/mx:State
/mx:states


then i call a function to change states once the image is fully loaded

private function imgLoaded(event:Event):void{
currentState = 'remove_loader';
}


this doesn't seem to work. any help? 



[flexcoders] how to show a preloader (loading spinner) when loading images in a flex app.

2010-02-04 Thread ZIONIST
hi guys i really would like to show a loading spinner when images are being 
loaded in a tile list. please i need help.



[flexcoders] Re: how to show a preloader (loading spinner) when loading images in a flex app.

2010-02-04 Thread ZIONIST
and how do i change between states? as in there must be some kind of event 
triggered.



[flexcoders] using a one slider to filter two different price ranges

2010-01-28 Thread ZIONIST
Hi guys i successfully used a slider to filter one range of prices say 0 to 
1. but then a senario arose where by i had to use that very same slide to 
filter another range of prices say 0-10. how can i use this one slider to 
filter these two ranges. the two ranges are sale prices and rental prices for 
cars. when one selects rental check box, the slider shld be populated with the 
0 - 10 price ranges which it then filters and when someone selects the sale 
check box, the slider shld be populated with the sale price range (0 - 1) 
which it also shld filter. anyone with a solution please help out. thanks



Re: [SPAM] [flexcoders] using a one slider to filter two different price ranges

2010-01-28 Thread ZIONIST
how can i set the min, max and step properties of the slider using a radio 
button or check box?



[flexcoders] localization

2010-01-27 Thread ZIONIST
hi guys i would like to set different currency symbols for countries, so that 
if a product is particular to a certain country, that countries currency symbol 
is used instead of the dollar sign. how do i achieve this with localization?



Re: [SPAM] [flexcoders] Animating items in a tilelist when filtering arraycollec

2010-01-20 Thread ZIONIST
Care to show me how? would appreciate it



[flexcoders] Animating items in a tilelist when filtering arraycollection

2010-01-18 Thread ZIONIST
i guys i have probably asked this several times but i have never gotten 
anything solid. i have  a tile list that is populated with an array collection 
of data from a database. i also have a filter function that i use to filter the 
array collection based on multiple criteria. i would like to have some kind of 
effect play as data is filtered to show data change just like in the flex store 
example. but apparently the itemschangeeffect in flex 3 does not work with 
filter functions. any way of achieving that goal?  



[flexcoders] open source ad management system

2010-01-05 Thread ZIONIST
Any one know any opensource ad management system that works with coldfusion and 
flex like openAds(this works with php).



[flexcoders] how to get the name of a video file after upload

2010-01-04 Thread ZIONIST
hi guys, i have built a video uploader in flex with a coldfusion backend. what 
i do is allow the user to upload a video file (using cffile) and use ffmpeg to 
convert the file into .flv format(this is because flex videoplayer only plays 
.flv files) which is then stored(file.flv) on the server. this all works 
perfectly, but i want to get the name of the flv file on the server into the 
textinput and store it in the database. how do i do that? here is the code, in 
this case the textinput is filled with the original file name(something like 
file.mov or file.mp4 etc and i want to fill it with the name of the converted 
file eg file.flv)

?xml version=1.0 encoding=utf-8?
mx:FormItem xmlns:mx=http://www.adobe.com/2006/mxml; 
creationComplete=init()

mx:Script
![CDATA[
import mx.managers.PopUpManager;
import components.progress_popup;

//video upload 
//
private const FILE_UPLOAD_URL:String = 
cfcs/vidUpload.cfm;
private var fileRef:FileReference;
private var progress_win:progress_popup;


private function init():void
{
fileRef = new FileReference();
fileRef.addEventListener(Event.SELECT, fileRef_select);
fileRef.addEventListener(Event.OPEN, openHandler);
fileRef.addEventListener(ProgressEvent.PROGRESS, 
progressHandler);  
fileRef.addEventListener(Event.COMPLETE, 
fileRef_complete);
}

private function browseAndUpload():void
{
//var fileFilter:FileFilter = new FileFilter(Files, 
*.pdf;*.doc;*.docx);
fileRef.browse();
message.text = ;
}

private function fileRef_select(event:Event):void 
{
try 
{
fileRef.upload(new URLRequest(FILE_UPLOAD_URL));
} 
catch (err:Error)
{
message.text = ERROR: zero-byte file;
}   
vid.text = event.currentTarget.name;
createdprogressPopup();
}

private function fileRef_complete(event:Event):void
{
message.text +=  (complete);
removeMe();
}

private function createdprogressPopup():void{

progress_win=progress_popup(PopUpManager.createPopUp(this,progress_popup,true));
}

private function removeMe():void {
PopUpManager.removePopUp(progress_win);
}

private function progressHandler(event:ProgressEvent):void{

progress_win.uploadProgress.setProgress(event.bytesLoaded, event.bytesTotal);   

}

private function openHandler(event:Event):void {
progress_win.uploadProgress.label = Uploading %3%% of 
image file.;
}
]]
/mx:Script

mx:HBox width=240
mx:TextInput width=155 id=vid/
mx:Button label=Browse click=browseAndUpload();/  

/mx:HBox
mx:Label id=message/
/mx:FormItem




[flexcoders] Re: how to get the name of a video file after upload

2010-01-04 Thread ZIONIST
How do i get it back into flex on the complete event?

--- In flexcoders@yahoogroups.com, claudiu ursica the_bran...@... wrote:

 I never worked with cold fusion ... however your code on the server writes 
 somewhere the file on the disk and names it somehow. The method that does 
 that could return the file name in case of a successful save and you can get 
 it back into flex on the complete event.
 
 HTH,
 Claudiu
 
 
 
 
 
 From: ZIONIST stinas...@...
 To: flexcoders@yahoogroups.com
 Sent: Mon, January 4, 2010 3:10:33 PM
 Subject: [flexcoders] how to get the name of a video file after upload
 

 hi guys, i have built a video uploader in flex with a coldfusion backend. 
 what i do is allow the user to upload a video file (using cffile) and use 
 ffmpeg to convert the file into .flv format(this is because flex videoplayer 
 only plays .flv files) which is then stored(file. flv) on the server. this 
 all works perfectly, but i want to get the name of the flv file on the server 
 into the textinput and store it in the database. how do i do that? here is 
 the code, in this case the textinput is filled with the original file 
 name(something like file.mov or file.mp4 etc and i want to fill it with the 
 name of the converted file eg file.flv)
 
 ?xml version=1.0 encoding=utf- 8?
 mx:FormItem xmlns:mx=http://www.adobe. com/2006/ mxml creationComplete= 
 init()
 
 mx:Script
 ![CDATA[
 import mx.managers. PopUpManager;
 import components.progress _popup;
 
 //video upload  / / / / 
 / / / ///
 private const FILE_UPLOAD_ URL:String = cfcs/vidUpload. cfm;
 private var fileRef:FileReferen ce;
 private var progress_win: progress_ popup;
 
 
 private function init():void
 {
 fileRef = new FileReference( );
 fileRef.addEventLis tener(Event. SELECT, fileRef_select) ;
 fileRef.addEventLis tener(Event. OPEN, openHandler) ;
 fileRef.addEventLis tener(ProgressEv ent.PROGRESS, progressHandler) ; 
 fileRef.addEventLis tener(Event. COMPLETE, fileRef_complete) ;
 }
 
 private function browseAndUpload( ):void
 {
 //var fileFilter:FileFilt er = new FileFilter( Files, *.pdf;*.doc; 
 *.docx);
 fileRef.browse( );
 message.text = ;
 }
 
 private function fileRef_select( event:Event) :void 
 {
 try 
 {
 fileRef.upload( new URLRequest(FILE_ UPLOAD_URL) );
 } 
 catch (err:Error)
 {
 message.text = ERROR: zero-byte file;
 } 
 vid.text = event.currentTarget .name;
 createdprogressPopu p();
 } 
 
 private function fileRef_complete( event:Event) :void
 {
 message.text +=  (complete);
 removeMe();
 }
 
 private function createdprogressPopu p():void{
 progress_win= progress_ popup(PopUpManag er.createPopUp( this,progress_ 
 popup,true) );
 }
 
 private function removeMe():void {
 PopUpManager. removePopUp( progress_ win);
 }
 
 private function progressHandler( event:ProgressEv ent):void{
 progress_win. uploadProgress. setProgress( event.bytesLoade d, 
 event.bytesTotal) ; 
 }
 
 private function openHandler( event:Event) :void {
 progress_win. uploadProgress. label = Uploading %3%% of image file.;
 }
 ]]
 /mx:Script
 
 mx:HBox width=240
 mx:TextInput width=155 id=vid/
 mx:Button label=Browse click=browseAndUpl oad();/ 
 /mx:HBox
 mx:Label id=message /
 /mx:FormItem





[flexcoders] Re: how to get the name of a video file after upload

2010-01-04 Thread ZIONIST
am sorry, am even more confused. is there a way to do this with the 
fileReference in flex?