[flexcoders] Re: using a class once throughout the all app
that's what i understood from the research though am not sure if am right, which is why am asking. i have an app and i complied as rsl and used modules too which brought down the size to 172 kb for the main app and 140 kb for one of the modules and 80 kb for the other. i kinda loads fast but am thinking that the size can come down a little more. so am exploring ways to shed atleast 70 kbs from the main app. am all out of ideas.
[flexcoders] Re: dynamic source for flvplayback in flex
i have seen all the examples online abt using that component in flex and they all use static paths not dynamic.
[flexcoders] Re: dynamic source for flvplayback in flex
i have tried that private var videoPath:String = assets/virtual_ tour/ + parentDocument.home_tiles.selectedItem.tour; and it doesn't work. it even does not show the player.
[flexcoders] Re: dynamic source for flvplayback in flex
yes i tested that path and it points to the video clip but when i use it as a source for the flvplayback, it doesn't work. is it really possible to use dynamic paths in flvplayback?
[flexcoders] Re: dynamic source for flvplayback in flex
i tried that and its doesn't load the videos. here is the code i used private var videoPath:String = assets/virtual_tour/{parentDocument.home_tiles.selectedItem.tour}; and then set the source of the flvplayback(in this case vid) to the videoPath above like this vid.source = videoPath;. any help?
[flexcoders] dynamic source for flvplayback in flex
hi guys, am using the flvplayback flash component to load videos and its great with a static source path, but i have one problem, i have a datagrid with video paths from database and i would like to click on a particular row and the video loads in the flvplayback. any help guys?
[flexcoders] Re: dynamic source for flvplayback in flex
Anyone with a solution to this, please help. thanks
[flexcoders] Re: itemchange effect with filter funtion
come on guys any work around this monster problem?
[flexcoders] itemchange effect with filter funtion
hi guys i know i have asked this before, but surely there must be a way to animate items in a tilelist after applying a filter function to show the user that something has happened instead of having items just jump in place. please if anyone has found a way please share. my tilelist is populated by an arraycollection that gets items from a database.
[flexcoders] Re: how to insert checkbox value into database
this is what i have tried to do following your previous example... private var poolSelected: Boolean = false; public function poolselected():void{ if(pool.selected == true){ poolSelected = 1; } else{ poolSelected = 0; } } private function insertHandler():void{ listManager.listProperty(poolSelected); mx:RemoteObject id=listManager destination=ColdFusion source=App.src.cfcs.propertyMaintenance showBusyCursor=true mx:method name=listProperty result=handleStringResult(event) fault=mx.controls.Alert.show(event.fault.faultString)/ /mx:RemoteObject mx:CheckBox label=Pool id=pool color=#99 width=160 fontSize=12 click=poolselected()/
[flexcoders] Re: how to insert checkbox value into database
Chris Downey you said you do this all the time, care to show how exaclty you do it using the first example of itemWorking, or you can show how to directly send the checkbox.selected value to the data access object layer (via your RemoteObject). please this would be very helpful.
[flexcoders] using imagecfc component in flex app
hi guys and trying to use the ImageCFC component created by Rick Root in my flex app to crop the uploaded image but nothing seems to be happening... please help me. here is my upload.cfm i use for the upload. upload.cfm !--- Flex Multi-File Upload Server Side File Handler === This file is where the upload action from the Flex Multi-File Upload UI points. This is the server side half of the upload process. --- !--- set the full path to the images folder --- cfset mediapath = expandpath('/imagecfcUploader/src/imgs') cftry !--- Flash uploads all files with a binary mime type (application/ocet-stream), so we cannot set cffile to accept specfic mime types. The workaround is to check the file type after it arrives on the server and if it is not desireable, delete it. --- cffile action=upload filefield=filedata destination=#MediaPath# nameconflict=makeunique accept=application/octet-stream/ !--- Begin checking the file extension of uploaded files --- cfset acceptedFileExtensions = jpg,jpeg,gif,png/ cfset filecheck = listFindNoCase(acceptedFileExtensions,File.ServerFileExt)/ !--- read the image cfimage name=uploadedImage source=#MediaPath#/#file.serverFile# !--- Invoke image.cfc component --- cfset imageCFC = createObject(component,image) / cfset imgInfo = imageCFC.crop(, #MediaPath#\#uploadedImage#, #MediaPath#\#uploadedImage#,1,1,300,300,80) cfcatch type=any !--- use cfthrow to get onError in Application.cfc to handle the error --- cfthrow object=#cfcatch# /cfcatch /cftry
[flexcoders] Re: using itemsChangeEffect when filtering a tilelist
Guys any help...
[flexcoders] Re: how to insert checkbox value into database
here is were it fails in my cfc i have the following cfargument name=pool type=boolean required=no/ INSERT INTO homes(pool) VALUES(#arguments.pool#) the column in the table is pool and the id of the check box in the flex ui is also pool. in flex i have the following mx:RemoteObject id=listManager destination=ColdFusion source=App.src.cfcs.Maintenance showBusyCursor=true mx:method name=listProperty result=handleStringResult(event) fault=mx.controls.Alert.show(event.fault.faultString)/ /mx:RemoteObject private function insertHandler():void{ listManager.listProperty(pool.selected); } when i try to insert it gives error: cant execute query. any thoughts on what i can do to insert the value of the check box into the database. by the way the datatype of pool in database table is yes/no. am using access. thanks
[flexcoders] Re: how to insert checkbox value into database
here is were it fails in my cfc i have the following cfargument name=pool type=boolean required=no/ INSERT INTO homes(pool) VALUES(#arguments.pool#) the column in the table is pool and the id of the check box in the flex ui is also pool. in flex i have the following mx:RemoteObject id=listManager destination=ColdFusion source=App.src.cfcs.Maintenance showBusyCursor=true mx:method name=listProperty result=handleStringResult(event) fault=mx.controls.Alert.show(event.fault.faultString)/ /mx:RemoteObject private function insertHandler():void{ listManager.listProperty(pool.selected); } when i try to insert it gives error: cant execute query. any thoughts on what i can do to insert the value of the check box into the database. by the way the datatype of pool in database table is yes/no. am using access. thanks
[SPAM] [flexcoders] Re: how to insert checkbox value into database
yes/no is looking for a boolean value. when the checkbox in the flex ui is checked the value recorded in database is yes but remember yes/no in access is a checkbox in the database column so if in the flex ui the checkbox is checked then the checkbox is also checked in the access table and if its not checked in the flex ui then the same in access table.
[flexcoders] Re: using itemsChangeEffect when filtering a tilelist
hi guys how can i apply change effects in flex 3 while filtering an arraycollection that populates a tilelist like the flex store example
[flexcoders] how to update a progress bar when uploading an image
hi, am trying to upload and image and i would like to show progress while uploading process goes on by updating the progress bar but the progress bar seems not to get updated. here is my code formitem component ?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; 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(ProgressEvent.PROGRESS, progressHandler); fileRef.addEventListener(Event.COMPLETE, fileRef_complete); } private function browseAndUpload():void{ fileRef.browse(); message.text = ; } private function fileRef_select(event:Event):void{ var request:URLRequest = new URLRequest(cfcs/upload.cfm) try { fileRef.upload(request); } catch (err:Error) { message.text = ERROR: zero-byte file; } memPhoto.text = event.currentTarget.name; createdprogressPopup(); progress_win.uploadProgress.setProgress(0, 100); progress_win.uploadProgress.label = Loading 0%; } 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{ //var file:FileReference = FileReference(event.target); progress_win.uploadProgress.setProgress(event.bytesLoaded, event.bytesTotal); } ]] /mx:Script mx:HBox width=240 mx:TextInput width=155 id=memPhoto enabled=false/ mx:Button label=Browse click=browseAndUpload();/ /mx:HBox mx:Label id=message/ /mx:FormItem popup with progress bar to show progress ?xml version=1.0 encoding=utf-8? mx:TitleWindow xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical creationCompleteEffect={customMove} removedEffect={customHide} title=Uploading Image mx:Script ![CDATA[ import mx.managers.PopUpManager; import mx.effects.easing.*; ]] /mx:Script mx:Parallel id=customMove target={this} mx:Move yFrom=0 xFrom={(stage.width - this.width) / 2} xTo={(stage.width - this.width) / 2} yTo={(stage.height - this.height) / 2} easingFunction=Elastic.easeOut duration=500 / mx:Fade duration=500 / /mx:Parallel mx:Parallel id=customHide target={this} mx:Move yFrom={(stage.height - this.height) / 2} xFrom={(stage.width - this.width) / 2} xTo={(stage.width - this.width) / 2} yTo={stage.height} duration=500 / mx:Fade alphaFrom=1 alphaTo=0 duration=500 / /mx:Parallel mx:ProgressBar id=uploadProgress mode=manual labelPlacement=center width=120/ /mx:TitleWindow is there something am doing wrong?
[flexcoders] Re: how to update a progress bar when uploading an image
wow... so the only way is to use the indeterminate to show that smething is happening. thanks but in case someone has a solution please share. thanks again
[flexcoders] file upload not responding.....
hi guys i recently moved an application from flex 2 to flex 3 as is without changing the code. the file upload code in flex 2 was working perfectly but in flex 3 it's non responsive as in it can browse for files on the pc but cant upload them.. below is my code please help me. private var fileRef:FileReference; //Define reference to the Upload ProgressBar component. private var progress_win:progress_popup; private function init():void { fileRef = new FileReference(); fileRef.addEventListener(Event.SELECT, fileRef_select); fileRef.addEventListener(ProgressEvent.PROGRESS, progressHandler); fileRef.addEventListener(Event.COMPLETE, fileRef_complete); } private function browseAndUpload():void { fileRef.browse(); message.text = ; } private function fileRef_select(event:Event):void { var request:URLRequest = new URLRequest(http://localhost:8500/App/src/cfcs/upload.cfm;) try { fileRef.upload(request); } catch (err:Error) { message.text = ERROR: zero-byte file; } memPhoto.text = event.currentTarget.name; createdprogressPopup(); progress_win.uploadProgress.setProgress(0, 100); progress_win.uploadProgress.label = Loading 0%; } 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); } upload.cfm cffile action=upload filefield=Filedata destination=#ExpandPath('./')# nameconflict=OVERWRITE /
[flexcoders] Re: file upload not responding.....
please disregard this post... its ok now. i got it to work...
[flexcoders] Re: how to insert checkbox value into database
Tracy that's what i did but it does not work...
[flexcoders] Re: how to insert checkbox value into database
yes am already using my app to input info into database, but for the value of the check box that is the one that isn't working.
[flexcoders] Re: how to insert checkbox value into database
sorry for being too slow... but can you please be a little more clear here is the code am using to do the inserting from a flex form into a database, please show me how i can use your code in here. thanks private function insertHandler():void{ listManager.listProperty(ctry_name.selectedItem, city.text, location.text); mx:RemoteObject id=listManager destination=ColdFusion source=IESTATE_RELOADED.cfcs.Maintenance showBusyCursor=true mx:method name=listProperty result=handleStringResult(event) fault=mx.controls.Alert.show(event.fault.faultString)/ /mx:RemoteObject
[flexcoders] how to insert checkbox value into database
hi, i have a flex form am using to collect data and insert that data into an access database using coldfusion as backend technology to communicate with the form and database. i have one problem though, how can i insert a checkbox value from the flex form into the database. thanks guys
[flexcoders] Re: using itemsChangeEffect when filtering a tilelist
any help guys
[flexcoders] using itemsChangeEffect when filtering a tilelist
hi guys am trying to use a datachange(itemsChangeEffect) effect when filtering the result of an array collection in a tilelist but doesn't work. is it possible to do it this way or not.
[flexcoders] Re: multiple filter function of combobox and two checkboxes
ok... i have officially failed to get this working so here is my proposal, i will pay to get this done for me. anyone out there willing to write the whole multifilter function from the ground up please let me know so we can negotiate the price. you can get to me on my email address stinas...@yahoo.com
[flexcoders] Re: multiple filter function of combobox and two checkboxes
well, am trying to integrate some checkbox filter into a multiple filter function and its giving me hell. basically am trying to filter an arraycollection based on multiple criteria using different components like slider, combo box, radio buttons and check boxes. while i have the rest of the component filters working, i cant figure out a way to include the checkbox filter into the filter function. here is my code so far. filters// private var sliderFromValue : Number = 0; private var sliderToValue : Number = 300; private var selectedCity : String = All; private var selectedLocation : String = All; private var selectedValue: Boolean; private var poolSelected: Boolean = false; private function onSliderChange(event:SliderEvent):void { var slider:Slider = Slider(event.currentTarget) ; sliderFromValue = priceSlider.values[0]; sliderToValue = priceSlider.values[1]; filterGrid() ; currentState = ''; } 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 categoryChangeHandler(event:Event):void { if(category.selectedValue != null) selectedValue = category.selectedValue; filterGrid(); currentState = ''; } private function poolFilter():void { poolSelected = pool_ckb.selected; filterGrid(); currentState = ''; } private function filterGrid() :void { dataAr.filterFunction=myFilterFunction; dataAr.refresh(); } private function myFilterFunction(item:Object): Boolean { return(item.price = sliderFromValue item.price = sliderToValue) (item.city == selectedCity || selectedCity == All) (item.location == selectedLocation || selectedLocation == All) (item.category == category.selectedValue) (item.pool == poolSelected); } there is something wrong with the poolfilter function which affects the general filter function. i would like that if someone clicked the pool checkbox, only property with pools show and if they uncheck it, then all property shows up.
[flexcoders] Re: multiple filter function of combobox and two checkboxes
i know that the filter function will work the same way. but i have a problem with integrating a checkbox filter into a large multi filter function. let me explain... i have a number of controls that am currently using to filter data from a database. so i developed a multi filter function to handle the filtering depending on what control is picked by the user. it works well but one problem i have is that i have failed to find a way to include a checkbox control into the multi filter function. below is the multi filter function am using and would like to include a checkbox filter to it. private var sliderFromValue : Number = 0; private var sliderToValue : Number = 300; private var selectedCity : String = All; private var selectedLocation : String = All; private var selectedValue: Boolean; private var poolSelected: Boolean = false; private function onSliderChange(event:SliderEvent):void { var slider:Slider = Slider(event.currentTarget) ; sliderFromValue = priceSlider.values[0]; sliderToValue = priceSlider.values[1]; filterGrid() ; currentState = ''; } 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 categoryChangeHandler(event:Event):void { if(category.selectedValue != null) selectedValue = category.selectedValue; filterGrid(); currentState = ''; } private function poolFilter():void { poolSelected = pool_ckb.selected; filterGrid(); currentState = ''; } private function filterGrid() :void { dataAr.filterFunction=myFilterFunction; dataAr.refresh(); } private function myFilterFunction(item:Object): Boolean { return(item.price = sliderFromValue item.price = sliderToValue) (item.city == selectedCity || selectedCity == All) (item.location == selectedLocation || selectedLocation == All) (item.category == category.selectedValue) (item.pool == poolSelected); } the individual filter functions are attached to individual controls but the poolfilter is the one that is troubling me.
[flexcoders] multiple filter function of combobox and two checkboxes
hi guys, this is the biggest obstacle i have face ever since i started coding in flex. i kindly ask for an example of filtering an array collection using two checkboxes and a combobox. thanks
[flexcoders] Re: ameature question but am desperate
am using access database?
[flexcoders] Re: ameature question but am desperate
when i use the following code private function insertHandler( ):void{ if (cat.selected == true) { catManager.cats( cats); } } i get the following error Unable to invoke CFC - The CAT argument passed to the cats function is not of type boolean.
[flexcoders] Re: ameature question but am desperate
this is the code mxml file with Remote object call ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Script ![CDATA[ import mx.rpc.events.ResultEvent; import mx.rpc.events.FaultEvent; import mx.controls.Alert; public function handleStringResult(event:ResultEvent):void{ onCompleteHandler(); } private function onCompleteHandler():void{ Alert.show(Congratulations!); } private function insertHandler():void{ catManager.cats(cat.selected); } ]] /mx:Script mx:RemoteObject id=catManager destination=ColdFusion source=chkbx_dbinsert.insert showBusyCursor=true mx:method name=cats result=handleStringResult(event) fault=mx.controls.Alert.show(event.fault.faultString)/ /mx:RemoteObject mx:CheckBox x=100 y=73 label=Cats id=cat/ mx:Button x=100 y=99 label=Insert click=insertHandler()/ /mx:Application cfc cfcomponent cffunction name=cats access=remote returntype=string cfargument name=cat type=boolean required=no/ cfquery name=regCat datasource=cats INSERT INTO cats(cat) VALUES(#arguments.cat#) /cfquery /cffunction /cfcomponent
[flexcoders] Re: ameature question but am desperate
still no progress. here is my code please help on what i shld do. chk.mxml ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Script ![CDATA[ import mx.rpc.events.ResultEvent; import mx.rpc.events.FaultEvent; import mx.controls.Alert; public function handleStringResult(event:ResultEvent):void{ onCompleteHandler(); } private function onCompleteHandler():void{ Alert.show(Congratulations!); } private function insertHandler():void{ catManager.cats(cat.selected); } ]] /mx:Script mx:RemoteObject id=catManager destination=ColdFusion source=chkbx_dbinsert.insert showBusyCursor=true mx:method name=cats result=handleStringResult(event) fault=mx.controls.Alert.show(event.fault.faultString)/ /mx:RemoteObject mx:CheckBox x=100 y=73 label=Cats id=cat/ mx:Button x=100 y=99 label=Insert click=insertHandler()/ /mx:Application insert.cfc cfcomponent cffunction name=cats access=remote returntype=string cfargument name=cat type=boolean required=no/ cfquery name=regCat datasource=cats INSERT INTO cats(cat) VALUES(#arguments.cat#) /cfquery /cffunction /cfcomponent i get the following error when i try to insert the value of the chk box into the database Unable to invoke CFC - Error Executing Database Query.
[flexcoders] Re: ameature question but am desperate
thats exactly what i am doing. no difference at all. when i use a textinput, and combobox, data is inserted but a checkbox is complex. so am still where i was yesterday... no progress and still the same error.
[flexcoders] Re: open source imageCFC
Helloo any help?
[flexcoders] open source imageCFC
in my flex app i upload files using a codlfusion script upload.cfm and it works perfectly. i would like to take it a step further by allowing for image manipulation while uploading so that when a person uploads an image of any size, it is resized, croped and compressed to jpeg then saved on the server. i would like to use imageCFC for this but dont know how. can someone please help me? here is the upload script i use. how can i modify it to use imageCFC to resize, crop and compress the image that is being uploaded? thanks alot upload.cfm !--- Flex Multi-File Upload Server Side File Handler This file is where the upload action from the Flex Multi-File Upload UI points. This is the handler the server side half of the upload process. --- !--- set the full path to the images folder --- cfset mediapath = expandpath('/IESTATE_V1/assets/agent_profilepics') !--- set the desired image height cfset thumbsize = 320 !--- set the desired image width --- cfset imagesize = 192 cftry !--- Because flash uploads all files with a binary mime type (application/ocet-stream) we cannot set cffile to accept specfic mime types. The workaround is to check the file type after it arrives on the server and if it is non desireable delete it. --- cffile action=upload filefield=filedata !--- destination=#ExpandPath('\')#realestate portal\images\agent_pics\ --- destination=#MediaPath# nameconflict=makeunique accept=application/octet-stream/ !--- Begin checking the file extension of uploaded files --- cfset acceptedFileExtensions = jpg,jpeg,gif,png/ cfset filecheck = listFindNoCase(acceptedFileExtensions,File.ServerFileExt)/ !--- read the image cfimage name=uploadedImage source=#MediaPath#/#file.serverFile# !--- figure out which way to scale the image --- cfif uploadedImage.width gt uploadedImage.height cfset thmb_percentage = (thumbsize / uploadedImage.width) cfset percentage = (imagesize / uploadedImage.width) cfelse cfset thmb_percentage = (thumbsize / uploadedImage.height) cfset percentage = (imagesize / uploadedImage.height) /cfif !--- calculate the new thumbnail and image height/width --- cfset thumbWidth = round(uploadedImage.width * thmb_percentage) cfset thumbHeight = round(uploadedImage.height * thmb_percentage) cfset newWidth = round(uploadedImage.width * percentage) cfset newHeight = round(uploadedImage.height * percentage) !--- see if we need to resize the image, maybe it is already smaller than our desired size --- cfif uploadedImage.width gt imagesize cfimage action=resize height=#newHeight# width=#newWidth# source=#uploadedImage# destination=#MediaPath#/#file.serverFile# overwrite=true/ /cfif !--- create a thumbnail for the image --- cfimage action=resize height=#thumbHeight# width=#thumbWidth# source=#uploadedImage# destination=#MediaPath#/thumbs/#file.serverFile# overwrite=true/ !--- If the variable filecheck equals false delete the uploaded file immediatley as it does not match the desired file types --- cfif filecheck eq false cffile action=delete file=#MediaPath#/#file.serverFile#/ /cfif !--- Should any error occur output a pdf with all the details. It is difficult to debug an error from this file because no debug information is diplayed on page as its called from within the Flash UI. If your files are not uploading check to see if an errordebug.pdf has been generated. --- cfcatch type=any cfdocument format=PDF overwrite=yes filename=errordebug.pdf cfdump var=#cfcatch#/ /cfdocument /cfcatch /cftry
[flexcoders] ameature question but am desperate
hi how do i insert a checkbox value from flex to a database using coldfusion?
[flexcoders] Re: ameature question but am desperate
this is the sample code am using to insert data from flex to db using a cfc.(listProperty is the function that has the insert query in cfc). do i use cat.selected or something else? listManager.listProperty(ctry_name.selectedItem, cat.selected);
[flexcoders] showing a preloder as images are loaded
hi guys i have struggled with this for a long time. i have a tilelist in which i load so many images. i would like to find a way to show a preloader on each image place holder as its loaded and when its complete the preloader disappears and the image shows up. can someone please help me out here.
[flexcoders] Re: dynamic image gallery
hi, care to show how to do that, kinda confused
[flexcoders] Re: dynamic image gallery
Hi you were not being offensive, sorry if i gave you the idea you were, as a matter of fact you are trying to help and i am grateful for it. now i cant use lastResult because i am using a remote object and there is no resultFormat property on RemoteObject methods. so am still stuck, plus where you suggesting i do away with the mx:Model completely?
[flexcoders] Re: dynamic image gallery
hi i have changed the dataprovider of the gallery from an array to an arraycollection, what an trying to archive is that when someone clicks on the list a different set of images is loaded in the gallery, that mean i would like to update the arraycollection with a new set of images when an item in the list is clicked. i still have failed to get the images to load dynamically but when i hard-code the image path in the collection the images loaded. but i think am making progress but i need help on what to do to update the collection with dynamic image paths. here is my new code. gallery.mxml ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute xmlns:ns1=components.* mx:Script ![CDATA[ import mx.rpc.events.ResultEvent; import mx.controls.Alert; import mx.managers.CursorManager; import mx.collections.ArrayCollection; [Bindable] private var dataAr1:ArrayCollection; private function concernOriginalReceived(event:ResultEvent):void { dataAr1 = event.result as ArrayCollection; } private function imageListHandler(event:Event):void{ trace(Someone clicked on the Large Green Button!); remoteObj.gallery.send(); addimg(); } [Bindable] public var home_img1:ArrayCollection = new ArrayCollection([ {source:assets/homeprofile_pics/extra_pics/bedroom-decorations.jpg},{source:assets/homeprofile_pics/extra_pics/Interior_Classical_bedroom_interior_005016_.jpg}, {source:assets/homeprofile_pics/extra_pics/clean-livingroom.jpg},{source:assets/homeprofile_pics/extra_pics/regreen-interior-design-ideas-remodeling-green-kitchen.jpg}]); public function addimg():void { if (home_tiles.selectedItem !== null) { home_img1.setItemAt({source:assets/homeprofile_pics/extra_pics/{homeImages.img1}},0); home_img1.setItemAt({source:assets/homeprofile_pics/extra_pics/{homeImages.img2}},1); home_img1.setItemAt({source:assets/homeprofile_pics/extra_pics/{homeImages.img3}},2); home_img1.setItemAt({source:assets/homeprofile_pics/extra_pics/{homeImages.img4}},3); } } ]] /mx:Script mx:RemoteObject id=remoteObj destination=ColdFusion source=gallery.cfcs.gallery mx:method name=gallery result=concernOriginalReceived(event) fault=Alert.show(event.fault.faultString,'Error'); mx:arguments imgid_home{imgid_home.text}/imgid_home /mx:arguments /mx:method /mx:RemoteObject mx:Model id=homeImages images img1{dataAr1.getItemAt(0).img1}/img1 img2{dataAr1.getItemAt(0).img2}/img2 img3{dataAr1.getItemAt(0).img3}/img3 img4{dataAr1.getItemAt(0).img4}/img4 /images /mx:Model ns1:imageName id=home_tiles x=0 y=140 addImageEvent=imageListHandler(event)/ ns1:imgGallery x=170 y=140/ mx:Text id=imgid_home text={home_tiles.selectedItem.imgid_home}/ mx:Label id=img1 x=254 y=0 text={dataAr1.getItemAt(0).img1}/ mx:Image x=499 y=0 mx:sourceassets/homeprofile_pics/extra_pics/{homeImages.img4}/mx:source /mx:Image /mx:Application imageName.mxml ?xml version=1.0 encoding=utf-8? mx:List xmlns:mx=http://www.adobe.com/2006/mxml; dataProvider={dataAr} labelField=location creationComplete=Init() change=ClickEventHandler() selectedIndex=0 mx:Script ![CDATA[ import mx.rpc.events.ResultEvent; import mx.controls.Alert; import mx.managers.CursorManager; import mx.collections.ArrayCollection; public function Init():void{ homeSvc.load(); } [Bindable] private var dataAr:ArrayCollection = new ArrayCollection; public function displayResult(event:ResultEvent):void{ dataAr = new ArrayCollection( (event.result as
[flexcoders] Re: dynamic image gallery
i hard-code an image path in imgGallery.mxml and it shows up perfectly bt i can't hard-code an image path in thumbnail.mxml coz its used as an item renderer for the horizontal list in imgGallery.mxml. but the image path work perfectly.
[flexcoders] Re: dynamic image gallery
nop that doesn't work, but when i hard-code the image path in the array the images show up but when i use a dynamic path, no image shows up. below is the hard-coded array of images and the same array of images but with a dynamic path imgGallery.mxml ?xml version=1.0 encoding=utf-8? mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; width=100% height=100% mx:Script ![CDATA[ import mx.collections.*; [Bindable] private var home_img1:ArrayCollection = new ArrayCollection(home_img); ]] /mx:Script !--mx:Array id=home_img mx:Object label=img1 fullImage=assets/homeprofile_pics/extra_pics/{parentDocument.homeImages.img1} / mx:Object label=img2 fullImage=assets/homeprofile_pics/extra_pics/{parentDocument.homeImages.img2} / mx:Object label=img3 fullImage=assets/homeprofile_pics/extra_pics/{parentDocument.homeImages.img3} / mx:Object label=img4 fullImage=assets/homeprofile_pics/extra_pics/{parentDocument.homeImages.img4} / /mx:Array -- mx:Array id=home_img mx:Object label=img1 fullImage=assets/homeprofile_pics/extra_pics/bedroom-decorations.jpg / mx:Object label=img2 fullImage=assets/homeprofile_pics/extra_pics/Interior_Classical_bedroom_interior_005016_.jpg / mx:Object label=img3 fullImage=assets/homeprofile_pics/extra_pics/clean-livingroom.jpg / mx:Object label=img4 fullImage=assets/homeprofile_pics/extra_pics/regreen-interior-design-ideas-remodeling-green-kitchen.jpg / /mx:Array mx:Label text=Title: width=100% textAlign=center y=88 fontSize=12/ mx:Text width=100% text=Mable tiled walls, spacious kitchen with well furnished furniture y=115 textAlign=center fontSize=12/ mx:Label x=190 y=143 id=home_id text={parentDocument.home_tiles.selectedItem.imgid_home}/ mx:VBox width=100% verticalGap=2 horizontalAlign=center borderStyle=solid cornerRadius=10 bottom=0 mx:HorizontalList id=photoList dataProvider={home_img} labelField=label iconField=fullImage itemRenderer=components.Thumbnail columnCount=4 width=98%/ /mx:VBox !--image used to test if parentDocument.homeImages actually loads an image and the result was a success. it loads an image-- mx:Image x=348.5 y=169 source=assets/homeprofile_pics/extra_pics/{parentDocument.homeImages.img4}/ /mx:Canvas
[flexcoders] Re: dynamic image gallery
You dont get it. the parentDocument is the main application where the horizontal list is loaded. here is the complete code... gallery.mxml ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute xmlns:ns1=components.* mx:Script ![CDATA[ import mx.rpc.events.ResultEvent; import mx.controls.Alert; import mx.managers.CursorManager; import mx.collections.ArrayCollection; [Bindable] private var dataAr1:ArrayCollection; private function concernOriginalReceived(event:ResultEvent):void { dataAr1 = event.result as ArrayCollection; } private function imageListHandler(event:Event):void{ trace(Someone clicked on the Large Green Button!); remoteObj.gallery.send(); } ]] /mx:Script mx:RemoteObject id=remoteObj destination=ColdFusion source=gallery.cfcs.gallery mx:method name=gallery result=concernOriginalReceived(event) fault=Alert.show(event.fault.faultString,'Error'); mx:arguments imgid_home{imgid_home.text}/imgid_home /mx:arguments /mx:method /mx:RemoteObject mx:Model id=homeImages images img1{dataAr1.getItemAt(0).img1}/img1 img2{dataAr1.getItemAt(0).img2}/img2 img3{dataAr1.getItemAt(0).img3}/img3 img4{dataAr1.getItemAt(0).img4}/img4 /images /mx:Model ns1:imageName id=home_tiles x=0 y=140 addImageEvent=imageListHandler(event)/ ns1:imgGallery x=170 y=140/ mx:Text id=imgid_home text={home_tiles.selectedItem.imgid_home}/ mx:Label id=img1 x=254 y=0 text={dataAr1.getItemAt(0).img1}/ mx:Image x=499 y=0 mx:sourceassets/homeprofile_pics/extra_pics/{homeImages.img4}/mx:source /mx:Image /mx:Application imageName.mxml ?xml version=1.0 encoding=utf-8? mx:List xmlns:mx=http://www.adobe.com/2006/mxml; dataProvider={dataAr} labelField=location creationComplete=Init() change=ClickEventHandler() mx:Script ![CDATA[ import mx.rpc.events.ResultEvent; import mx.controls.Alert; import mx.managers.CursorManager; import mx.collections.ArrayCollection; public function Init():void{ homeSvc.load(); } [Bindable] private var dataAr:ArrayCollection = new ArrayCollection; public function displayResult(event:ResultEvent):void{ dataAr = new ArrayCollection( (event.result as ArrayCollection).source); } private function ClickEventHandler():void{ trace(Ouch! I got clicked! Let me tell this to the world.); dispatchEvent(new Event(addImageEvent, true));// bubble to parent } ]] /mx:Script mx:RemoteObject id=homeSvc destination=ColdFusion source=gallery.cfcs.homes1 showBusyCursor=true fault=CursorManager.removeBusyCursor();Alert.show(event.fault.message) mx:method name=load result=displayResult(event) / /mx:RemoteObject mx:Metadata [Event(name=addImageEvent, type=flash.events.Event)] /mx:Metadata /mx:List imgGallery.mxml ?xml version=1.0 encoding=utf-8? mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; width=100% height=100% mx:Script ![CDATA[ import mx.collections.*; [Bindable] private var home_img1:ArrayCollection = new ArrayCollection(home_img); ]] /mx:Script !--mx:Array id=home_img mx:Object label=img1 fullImage=assets/homeprofile_pics/extra_pics/{parentDocument.homeImages.img1} / mx:Object label=img2 fullImage=assets/homeprofile_pics/extra_pics/{parentDocument.homeImages.img2} / mx:Object label=img3 fullImage=assets/homeprofile_pics/extra_pics/{parentDocument.homeImages.img3} / mx:Object label=img4 fullImage=assets/homeprofile_pics/extra_pics/{parentDocument.homeImages.img4} / /mx:Array --
[flexcoders] Re: dynamic image gallery
someone please help point out what am doing wrong in the code. would really appreciate it.
[flexcoders] Re: dynamic image gallery
i have tried to do as you asked, added a label to the thumbnail.mxml and the labels show up as expected. still haven't seen why those images cant show in the Horizontal list.
[flexcoders] Re: dynamic image gallery
any help guys?
[flexcoders] dynamic image gallery
Hi guys I have a problem with an image gallery am trying to do. This is the scenario. In my application I have the main application file gallery.mxml and three custom components namely imageName.mxml, imageGallery.mxml and Thumbnail.mxml. what am trying to do is have a dynamic image gallery where imageName.mxml loads image names from a database and is used to point to a path to get corresponding images on the server. So am using events to tell the main application that image source has changed so that whenever someone clicks on the list of image names, different images are loaded in the horizontal list. Everything works perfectly well except the images are not showing up in the horizontal list component. Yet when I test the path to images everything is good and event the events are dispatched well. Please help me understand what is causing the images not to show in the horizontal list. Below is my codeÂ…. Thanks in advance. gallery.mxml ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute xmlns:ns1=components.* mx:Script ![CDATA[ import mx.rpc.events.ResultEvent; import mx.controls.Alert; import mx.managers.CursorManager; import mx.collections.ArrayCollection; [Bindable] private var dataAr1:ArrayCollection; private function concernOriginalReceived(event:ResultEvent):void { dataAr1 = event.result as ArrayCollection; } private function imageListHandler(event:Event):void{ trace(Someone clicked on the Large Green Button!); remoteObj.gallery.send(); } ]] /mx:Script mx:RemoteObject id=remoteObj destination=ColdFusion source=gallery.cfcs.gallery mx:method name=gallery result=concernOriginalReceived(event) fault=Alert.show(event.fault.faultString,'Error'); mx:arguments imgid_home{imgid_home.text}/imgid_home /mx:arguments /mx:method /mx:RemoteObject mx:Model id=homeImages images img1{dataAr1.getItemAt(0).img1}/img1 img2{dataAr1.getItemAt(0).img2}/img2 img3{dataAr1.getItemAt(0).img3}/img3 img4{dataAr1.getItemAt(0).img4}/img4 /images /mx:Model !--mx:Array id=home_img mx:Stringassets/homeprofile_pics/extra_pics/{homeImages.img1}/mx:String mx:Stringassets/homeprofile_pics/extra_pics/{homeImages.img2}/mx:String mx:Stringassets/homeprofile_pics/extra_pics/{homeImages.img3}/mx:String mx:Stringassets/homeprofile_pics/extra_pics/{homeImages.img4}/mx:String /mx:Array -- ns1:imageName id=home_tiles x=0 y=140 addImageEvent=imageListHandler(event)/ ns1:imgGallery x=170 y=140/ mx:Text id=imgid_home text={home_tiles.selectedItem.imgid_home}/ mx:Label id=img1 x=254 y=0 text={dataAr1.getItemAt(0).img1}/ mx:Image x=499 y=0 mx:sourceassets/homeprofile_pics/extra_pics/{homeImages.img4}/mx:source /mx:Image /mx:Application imageName.mxml ?xml version=1.0 encoding=utf-8? mx:List xmlns:mx=http://www.adobe.com/2006/mxml; dataProvider={dataAr} labelField=location creationComplete=Init() change=ClickEventHandler() mx:Script ![CDATA[ import mx.rpc.events.ResultEvent; import mx.controls.Alert; import mx.managers.CursorManager; import mx.collections.ArrayCollection; public function Init():void{ homeSvc.load(); } [Bindable] private var dataAr:ArrayCollection = new ArrayCollection; public function displayResult(event:ResultEvent):void{ dataAr = new ArrayCollection( (event.result as ArrayCollection).source); } private function ClickEventHandler():void{ trace(Ouch! I got clicked! Let me tell this to the world.); dispatchEvent(new Event(addImageEvent, true));// bubble to parent } ]] /mx:Script mx:RemoteObject id=homeSvc destination=ColdFusion source=gallery.cfcs.homes1 showBusyCursor=true
[flexcoders] events
i have an array collection that populates a gallery. my arraycollection is in turn populated when i click an item in a tile list, so whenever i click on a new item in the tilelist, the data for the array collection is supposed to change but nothing seems to change. any help?
[flexcoders] Re: example of using ffmpeg with coldfusion in flex application
any help guys?
[flexcoders] Re: example of using ffmpeg with coldfusion in flex application
i have been reading most of the tutorials online and all have the source to the video to be uploaded and encoded hardcoded. i would like to allow the user to browse the his/her system to get the video to upload. anyhow this is my code so far but i get errors. please guidance is what am seeking. my code videoUploader.mxml ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute creationComplete=init() mx:Script ![CDATA[ //video upload // private const FILE_UPLOAD_URL:String = ../cf/uploadVideo_act.cfm; private var fileRef:FileReference; private function init():void { fileRef = new FileReference(); fileRef.addEventListener(Event.SELECT, fileRef_select); fileRef.addEventListener(Event.COMPLETE, fileRef_complete); } private function browseAndUpload():void { 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; } video.text = event.currentTarget.name; } private function fileRef_complete(event:Event):void { message.text += (complete); } ]] /mx:Script mx:Form x=348.5 y=193 mx:FormItem label=Video: direction=horizontal mx:TextInput id=video/ mx:Button label=Upload click=browseAndUpload()/ /mx:FormItem mx:FormItem mx:Label text=Label id=message/ /mx:FormItem /mx:Form /mx:Application uploadVideo_act.cfm(server script) !--- start --- cffile action=upload destination = C:\ColdFusion8\wwwroot\videoUploader\video nameconflict=overwrite filefield=video / !--- convert the video with FFMPEG --- cfexecute name = C:\ColdFusion8\wwwroot\videoUploader\ffmpeg\ffmpeg.exe arguments = -i #cffile.SERVERFILE# -s 320x240 -r 15 -b 2000 -ar 44100 -ab 64 -ac 2 #replace(cffile.SERVERFILE, ., )#.flv outputFile = C:\ timeout = 900 /cfexecute cfset videoName = #replace(cffile.SERVERFILE, ., )#.flv !--- insert the name of the file into your database --- !--- end --- error i get when i run the app Error #2044: Unhandled IOErrorEvent:. text=Error #2038: File I/O Error. at videoUploader/init() at videoUploader/___Application1_creationComplete() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.core::UIComponent/dispatchEvent() at mx.core::UIComponent/set initialized() at mx.managers::LayoutManager/doPhasedInstantiation() at Function/http://adobe.com/AS3/2006/builtin::apply() at mx.core::UIComponent/callLaterDispatcher2() at mx.core::UIComponent/callLaterDispatcher() please help. thanks
[flexcoders] Re: Filtering multiple conditions in an arraycollection
hi i had the same problem and eventually come up with one that could help you. the only problem is that i can't get the checkbox filter to work with the rest maybe after trying out this you can help solve the checkbox issue. this filter function uses a combination of a slider, two comboboxes and radio buttons. hope we can help one another. let me know how it goes... filters// private var sliderFromValue : Number = 0; private var sliderToValue : Number = 300; private var selectedCity : String = All; private var selectedLocation : String = All; private var selectedValue: Boolean; private var poolSelected: Boolean = false; private function onSliderChange(event:SliderEvent):void { var slider:Slider = Slider(event.currentTarget) ; sliderFromValue = priceSlider.values[0]; sliderToValue = priceSlider.values[1]; filterGrid() ; currentState = ''; } 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 categoryChangeHandler(event:Event):void { if(category.selectedValue != null) selectedValue = category.selectedValue; filterGrid(); currentState = ''; } private function poolFilter( ):void { /* if (poolSelected) pool_ckb.selected = poolSelected; filterGrid(); currentState = ''; */ } private function filterGrid() :void { dataAr.filterFunction=myFilterFunction; dataAr.refresh(); } private function myFilterFunction(item:Object): Boolean { return(item.price = sliderFromValue item.price = sliderToValue) (item.city == selectedCity || selectedCity == All) (item.location == selectedLocation || selectedLocation == All) (item.category == category.selectedValue); } the onSliderChange function is used by the slider(with two thumbs) to filter the array collection, cityChangeHandler and locationChangeHandler are used by the combo boxes to filter the same array collection, categoryChangeHandler is used by a radio group, the poolFilter function which doesn't work is meant to be used by the checkbox to filter that's where i have the problem. when you have the individual filters working you place them i one function which is myFilterFunction to be used to filter the array collection. then you call the myFilterFunction to be as the main filter function for the datagrid and also refresh the datagrid once filtered. this is the filterGrid() function. hope this helps you, am just an armature but that solution works 80%. hope there are some flex gurus who can polish that up to make the checkbox filter work.
[flexcoders] example of using ffmpeg with coldfusion in flex application
hi am looking for a tutorial on how to use flex and coldfusion to upload video and encode it with ffmpeg. any flex and coldfusion guru out there who can help?
[flexcoders] Using FFMPEG to convert video files to FLV format in flex and coldfusion
hi i am trying to setup a mini video site where guys can upload videos from devices like mobile phones and video cameras and i am using flex and coldfusion to do it. one thing i would like to know is how to use ffmpeg along with coldfusion and flex to allow guys to upload videos of any format and get them encoded to flv format on the fly and stored on the server for delivery. i have a small coldfusion snippet that uses ffmpeg and would like to get it work in flex. here it is !--- test file paths --- cfset ffmpegPath = c:\bin\ffmpeg.exe cfset inputFilePath = c:\bin\testInput.mp4 cfset ouputFilePath = c:\bin\testOuput.flv cfset resultLog = c:\bin\testOuput_result.log cfset errorLog = c:\bin\testOuput_error.log !--- convert the file --- cfset results = structNew() cfscript try { runtime = createObject(java, java.lang.Runtime).getRuntime(); command = '#ffmpegPath# -i #inputFilePath# -g 300 -y -s 300x200 -f flv -ar 44100 #ouputFilePath#'; process = runtime.exec(#command#); results.errorLogSuccess = processStream(process.getErrorStream(), errorLog); results.resultLogSuccess = processStream(process.getInputStream(), resultLog); results.exitCode = process.waitFor(); } catch(exception e) { results.status = e; } /cfscript !--- display the results --- cfdump var=#results# !--- function used to drain the input/output streams. Optionally write the stream to a file --- cffunction name=processStream access=public output=false returntype=boolean hint=Returns true if stream was successfully processed cfargument name=in type=any required=true hint=java.io.InputStream object cfargument name=logPath type=string required=false default= hint=Full path to LogFile cfset var out = cfset var writer = cfset var reader = cfset var buffered = cfset var line = cfset var sendToFile = false cfset var errorFound = false cfscript if ( len(trim(arguments.logPath)) ) { out = createObject(java, java.io.FileOutputStream).init(arguments.logPath); writer = createObject(java, java.io.PrintWriter).init(out); sendToFile = true; } reader = createObject(java, java.io.InputStreamReader).init(arguments.in); buffered = createObject(java, java.io.BufferedReader).init(reader); line = buffered.readLine(); while ( IsDefined(line) ) { if (sendToFile) { writer.println(line); } line = buffered.readLine(); } if (sendToFile) { errorFound = writer.checkError(); writer.flush(); writer.close(); } /cfscript !--- return true if no errors found. --- cfreturn (NOT errorFound) /cffunction
[flexcoders] using tweener to animate the highlight indicator in a flex list component
hi how can i use tweener to animate the highlight indicator(like when the mouse moves from one item in the tilelist to another the highlight indicators moves too)
[flexcoders] flex/coldfusion ad management loke open ads
hi is there an open source ad network like open ads that i can use with flex and coldfusion? was reading a tutorial where rich media x uses flex and php with open ads and i think open ads is php based.
[flexcoders] popup progress bar will uploading file
hi i am trying to show a popup progress bar will uploading file. i would like help on how to close the popup once the file has finished uploading. here is my code so far.. popup progress bar(progress_popup.mxml) ?xml version=1.0 encoding=utf-8? mx:TitleWindow xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical borderStyle=none headerHeight=0 creationCompleteEffect={customMove} mx:Script ![CDATA[ import mx.managers.PopUpManager; import mx.effects.easing.*; ]] /mx:Script mx:Parallel id=customMove target={this} mx:Move yFrom=0 xFrom={(stage.width - this.width) / 2} xTo={(stage.width - this.width) / 2} yTo={(stage.height - this.height) / 2} easingFunction=Elastic.easeOut duration=1000 / mx:Fade duration=500 / /mx:Parallel mx:ProgressBar indeterminate=true/ /mx:TitleWindow file uploadcode upload.as(where popup is called from upload form) private const FILE_UPLOAD_URL:String = ../cfcs/upload.cfm; private var fileRef:FileReference; private function init():void { fileRef = new FileReference(); fileRef.addEventListener(Event.SELECT, fileRef_select); fileRef.addEventListener(Event.COMPLETE, fileRef_complete); //fileRef.addEventListener(ProgressEvent.PROGRESS, progressHandler); } private function browseAndUpload():void { fileRef.browse(); message.text = ; createdprogressPopup(); } private function fileRef_select(event:Event):void { try { //message.text = size (bytes): + numberFormatter.format(fileRef.size); fileRef.upload(new URLRequest(FILE_UPLOAD_URL)); } catch (err:Error) { message.text = ERROR: zero-byte file; } memPhoto.text = event.currentTarget.name; } private function fileRef_complete(event:Event):void { message.text += (complete); progress_win.addEventListener(Close, removeMe); } /* private function fileRef_progress(evt:ProgressEvent):void { progressBar.setProgress(Number(evt.bytesLoaded), Number(evt.bytesTotal)); } private function progressHandler(event:ProgressEvent):void { var file:FileReference = FileReference(event.target); progressBar.setProgress( Number(event.bytesLoaded), Number(event.bytesTotal)); } */ [Bindable] private var progress_win:progress_popup; private function createdprogressPopup():void{ progress_win=progress_popup(PopUpManager.createPopUp(this,progress_popup,true)); /* reply_win.reply_subject.text = discussion_dg.selectedItem.data; reply_win.postsubject_msg.text = discussion_dg.selectedItem.data; reply_win.idusr_msg.text = number.text; */ } private function removeMe(event:Event):void { PopUpManager.removePopUp(progress_win); }
[flexcoders] Re: popup progress bar will uploading file
do you mind sharing an example?
[flexcoders] best ftp client
what is the best free ftp client to use to upload flex app to remote server?
[flexcoders] argent help needed please
hi guys i have a problem with video display play button in flex 2. when i click the play button i get this error TypeError: Error #1006: play is not a function.at custom_comps::home/__playButton_click(). here is my code please guide me.thanks mx:Panel width=350 height=50% layout=vertical title=Top 10 Music Videos of the Month paddingBottom=2 paddingLeft=2 paddingRight=2 paddingTop=2 mx:VBox width=100% height=100% mx:Repeater id=videos dataProvider={myvid} mx:Canvas width=100% mx:VideoDisplay id=videoDisplay source={videos.currentItem.video} width=120 height=75 x=0 y=0 autoPlay=false/ mx:VBox width=100% x=128 y=1.5 mx:Label text=Title: {videos.currentItem.title} color=#ff9900/ mx:Label text=By: {videos.currentItem.artist} color=#ff9900/ /mx:VBox mx:Button id=playButton upSkin=@Embed('../images/videoPlayer_img/control_play.png') downSkin=@Embed('../images/videoPlayer_img/control_play_blue.png') click=videoDisplay.play() x=50 y=27.5/ /mx:Canvas /mx:Repeater /mx:VBox /mx:Panel
[flexcoders] Re: create a thumbnail dynamically from large image using flex
hi, please share the whole class please.
[flexcoders] Re: create a thumbnail dynamically from large image using flex
i just need a way to create a thumbnail from a larger image dynamically in flex so that i dont have to store both a thumb and large image of the same image. trying to save on storage and load time of application. can some one please help out. thanks
[flexcoders] create a thumbnail dynamically from large image using flex
hi am using flex 2 and i have images in a folder that i use in my gallery, but i would like to load them as thumbnails in my tilelist the when i click on them i can see the large image. how can i generate thumnails dynamically without having two sets of images large and small?
[flexcoders] Re: create a thumbnail dynamically from large image using flex
any help guys?
[flexcoders] encoding video files (.mov, .avi etc) to flv during upload in flex coldfusion
hi i have a website where i would like viewers to upload videos to but i realized flv player only plays files of the .flv extension. how can i encode the files to .flv during the upload process in flex app with a coldfusion backend or is it impossible?
[flexcoders] Re: repeater error that i dont understand
not sure what you are saying. try making it a little more understandable
[flexcoders] repeater error that i dont understand
hi i have a repeater component that bound to the selection of a datagrid. it works perfectly the first time i select an item from the dtatgrid but when i select another item i get this error that i don't understand. please advise. here is my repeater and the error i get mx:Repeater dataProvider={forumSvc.getMessages.result} id=messaged recycleChildren=true mx:HBox width=100% mx:VBox width=138 mx:Label text={messaged.currentItem.Fullname}/ !--mx:Image source={messaged.currentItem.image}/ -- ns1:RoundedImage source={messaged.currentItem.image} cornerRadius=8/ mx:Text id=pkid text={messaged.currentItem.idmsg_msg} visible=true/ /mx:VBox mx:VBox width=100% mx:HBox width=100% mx:Label text=Posted On:{messaged.currentItem.date_msg}/ mx:Spacer width=100%/ mx:LinkButton label=Replay Message height=20 mouseDown=changeView('reply_message')/ /mx:HBox mx:HRule width=100%/ mx:Text id=message_tile width=100% fontSize=12 color=#FF leading=5 text={messaged.currentItem.content_msg} fontFamily=Franklin Gothic Book letterSpacing=2/ /mx:VBox /mx:HBox /mx:Repeater RangeError: Error #2006: The supplied index is out of bounds. at flash.display::DisplayObjectContainer/setChildIndex() at mx.core::Container/setChildIndex() at mx.core::Repeater/recycle() at mx.core::Repeater/execute() at mx.core::Repeater/set dataProvider() at custom_comps::forum/repeatResult() at custom_comps::forum/___Operation3_result() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.rpc::AbstractOperation/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent() at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler() at mx.rpc::Responder/result() at mx.rpc::AsyncRequest/acknowledge() at NetConnectionMessageResponder/resultHandler() at mx.messaging::MessageResponder/result()
[flexcoders] reinitializing viewstack children
is it possible to reinitialize children of a viewstack? i have a viewstack with a datagrid component which shows info from a database and i also have form that inserts info to the database. so when i insert data from the form to the database i show the datagrid which also show the entry that has just been entered. how can i reinitialize the datagrid child to reload the data?
[flexcoders] Re: Adobe's stimulus package!!!! FREE FLEX BUILDER!!!!
let me get this straight, does that mean that i cannot deploy an app developed with this version of flex and if the answer is yes, then what am i supposed to do with the flex 3 free version?
[flexcoders] Preventing duplicate database entries in ColdFusion and flex
how can i prevent duplicate database entries in coldfusion and flex. for example for registration forms, i would like that if someone registers the same combination of username and password that already exist in the db, the entry is rejected and the user is alerted. thanks
[flexcoders] smooth animated scroll effect for list component
how can one animate the scroll effect of a list component?
[flexcoders] tilelist with dynamic row heights
how can i make the tilelist have dynamic row heights?
[flexcoders] variable rowHeight in tilelist
how can i have a tilelist with variable rowHeights. i have data populating the tile list with diffrent heights and would like to avoid scroll bars.
[flexcoders] Re: how to use a list's change event to refresh an array that is bound to it.
ok i have a tilelist loaded with data from a database though a cfc ro. plus i have a gallery that i would like to populate with images of a particular item from the tilelist when someone clicks on an item in the tilelist. so i was reading through arrayutil class and parameter binding and i tried it out. mx:RemoteObject id=img destination=ColdFusion showBusyCursor=true fault=Alert.show(event.fault.faultString, 'Error'); mx:method name=getImages mx:arguments mx:Stringassets/homeprofile_pics/extra_pics/{home_tiles.selectedItem.img1}/mx:String mx:Stringassets/homeprofile_pics/extra_pics/{home_tiles.selectedItem.img2}/mx:String mx:Stringassets/homeprofile_pics/extra_pics/{home_tiles.selectedItem.img3}/mx:String mx:Stringassets/homeprofile_pics/extra_pics/{home_tiles.selectedItem.img4}/mx:String /mx:arguments /mx:method /mx:RemoteObject mx:ArrayCollection id=home_img source={ArrayUtil.toArray(img.getImages.lastResult)}/ then in my custom component the dataprovider of the gallery is home_img local:DisplayShelf id=shelf horizontalCenter=0 verticalCenter=0 borderThickness=5 borderColor=#FF dataProvider={parentDocument.home_img} enableHistory=false width=100%/ this still does not work. am in the right direction here, what could i be missing?
[flexcoders] Re: storing login data from a cfquery for use throught flex app
sorry john, i have never used singletons before either. i have a static class and would like to know how to get it store the result of the query. otherwise i have not made any progress at all. am thinking if someone can work out for me a solid flex/cf/access login(authentication) system and well commented that i can use in my projects i am prepared to pay for it.
[flexcoders] Re: storing login data from a cfquery for use throught flex app
hi, may be i will try to put the question this way, in my cfc i have to return a Boolean value true or false because in my result handler on the login page i test to see if the result returned is true or false then make a decision to accept login or not. this is my result handler on the login page private function login_result(event:ResultEvent):void { // login successful, remember the user. if( event.result == true || event.result == TRUE || event.result == 1 || event.result == 1 ) { this.dispatchEvent( new Event('loginSuccessful') ); } else { // login didn't work. show message errorMessage(Login unsuccessful); } } but if i set the cfc to return a query result in this case checkAuthentication nothing happens. so is there a way of returning a query result and have the result handler check against the returned result in order to make a decision to authenticate or not?
[flexcoders] Re: storing login data from a cfquery for use throught flex app
when i try that i get the following error ReferenceError: Error #1069: Property message not found on mx.messaging.messages.ErrorMessage and there is no default value. at components::Login/serverFault() at components::Login/___Operation1_fault() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.rpc::AbstractOperation/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent() at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler() at mx.rpc::Responder/fault() at mx.rpc::AsyncRequest/fault() at NetConnectionMessageResponder/statusHandler() at mx.messaging::MessageResponder/status()
[flexcoders] Re: storing login data from a cfquery for use throught flex app
in my cfc the return type is boolean and is set to return true if there is a match. when i set the return type to query to return the query result(checkAuthentication), nothing happens. cffunction name=loginUser access=remote returntype=boolean cfargument name=username type=string required=true/ cfargument name=password type=string required=true/ cfquery name=checkAuthentication datasource=authentication SELECT * FROM profile where username = cfqueryparam cfsqltype=cf_sql_varchar value=#arguments.username# and Password = cfqueryparam cfsqltype=cf_sql_varchar value=#arguments.password# /cfquery cfif checkAuthentication.recordCount EQ 1 cfreturn true/ !---cfreturn checkAuthentication--- cfelse cfreturn false/ /cfif /cffunction
[flexcoders] Re: storing login data from a cfquery for use throught flex app
hi how do i assign the properties of UserInfo in the result handler?
[flexcoders] storing login data from a cfquery for use throught flex app
hi i got a login form in flex with a coldfusion backend and it work's perfectly but i need it to go one step further. store login data form the cfquery so that it can be reused throughout the flex app. here is a senario. the login form has a username and password textinput fields which are validated using a remote object call to a cfc that queries a db table with username, password and email fields. now when login is successful i would like to store the data returned from the cfc including email for use throughout my application. please help me out here. thanks
[flexcoders] Re: storing login data from a cfquery for use throught flex app
hi i created a storage class that i was using and it works perfectly but i dont know how to use it to get data from a cfc through remote object call. here is my code it works with username and password but when it comes to geting the email address associated with the username and password from the db i dont know how to do that and thats my biggest problem. mainApp.mxml ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute xmlns:view=components.* mx:states mx:State name=Log Out mx:SetProperty target={label1} name=text value=Log Out/ /mx:State /mx:states mx:Script ![CDATA[ import components.*; //Flash Classes import flash.events.Event; import flash.events.MouseEvent; //Flex Classes import mx.containers.TitleWindow; import mx.controls.Alert; import mx.events.CloseEvent; import mx.managers.PopUpManager; import mx.core.IFlexDisplayObject; import mx.utils.ObjectUtil; //static class import classes.UserInfo; public var loggedin:Boolean = false; public var pop:Login; private function showLogin():void { pop = Login(PopUpManager.createPopUp(Application.application as DisplayObject,Login,true)); pop.showCloseButton =true; PopUpManager.centerPopUp(pop); pop.addEventListener(close,removeMe); pop[cancelButton].addEventListener(click, removeMe); pop.addEventListener( loginSuccessful, handleLoginSucess); //UserInfo.Email = pop.authManager.email; } private function removeMe(event:Event):void { PopUpManager.removePopUp(pop); } private function handleLoginSucess(event:Event):void{ viewstack1.selectedChild = admin; lbl_intro.text = Welcome +pop.username_txt.text; removeMe(event); currentState = 'Log Out'; UserInfo.UserName = pop.username_txt.text; UserInfo.Email = pop.authManager.email; //mx.controls.Alert.show(mx.utils.ObjectUtil.toString(pop.authManager)); //trace (UserInfo.Email); } ]] /mx:Script mx:Label x=0 y=0 text=Sign In id=label1 buttonMode=true useHandCursor=true mouseChildren=false click=showLogin()/ mx:ViewStack x=0 y=26 id=viewstack1 width=100% height=100% view:Home id=home/ view:Admin id=admin/ /mx:ViewStack mx:Label x=700 y=0 id=lbl_intro/ /mx:Application login.mxml ?xml version=1.0 encoding=utf-8? mx:TitleWindow xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute title=Login Form mx:Metadata [Event(name=loginSuccessful, type=flash.events.Event)] /mx:Metadata mx:Script ![CDATA[ import mx.collections.ArrayCollection; import mx.rpc.events.ResultEvent; import mx.rpc.events.FaultEvent; import mx.utils.ObjectUtil; import mx.controls.Alert; import mx.events.ValidationResultEvent; import mx.core.Application; import classes.UserInfo; private function isValid():Boolean { var emailValidResult:ValidationResultEvent = this.emailValidate.validate(this.username_txt.text); var pswdValidResult:ValidationResultEvent = this.pswdValidate.validate(this.password_txt.text); if (emailValidResult.type==ValidationResultEvent.VALID pswdValidResult.type==ValidationResultEvent.VALID) { return true; } else { return false; } } private function authenticateUser():void { if( isValid() ) { authManager.loginUser( this.username_txt.text, this.password_txt.text/* , userCredentials */); UserInfo.isLogged = true; } } private function errorMessage(msg:String):void { //Alert.show(
[flexcoders] Re: how to close a titlewindow that was not created as a popup
this is my code import mx.containers.TitleWindow; private function closeWindow(event:Event):void{ removeChild( event.target as TitleWindow); currentState=''; } then on the titlewindow component this is the way i call the close function mx:State name=login_reg mx:RemoveChild target={intro}/ mx:AddChild relativeTo={intro_container} mx:target comp:login_register id=login_reg close=closeWindow(event) loginSuccessful=handleLoginSucess(event)/ /mx:target /mx:AddChild /mx:State
[flexcoders] move component over text
hi guys how do i move a box component over a text when i rollover the text?
[flexcoders] possibility of opening a web page in a flex application
is it possible to open web page for example(http://www.mtv.com/news/articles/1606473/20090306/rihanna.jhtml) in a flex application let's say inside a flex canvas component?
[flexcoders] rss feed from various sources in flex
hi how can i create an rss feed reader that gets feed from more than one source. for example if i need to get entertainment news from mtv and other music sources how can i do that in flex and coldfusion?
[flexcoders] Re: how to close a titlewindow that was not created as a popup
i am getting this error when i apply your code. ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller. at flash.display::DisplayObjectContainer/removeChild() at mx.core::Container/removeChild() at custom_comps::login_register/closeWindow() at custom_comps::login_register/___TitleWindow1_close() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.core::UIComponent/dispatchEvent() at mx.containers::Panel/closeButton_clickHandler()
[flexcoders] Re: how to close a titlewindow that was not created as a popup
am calling it from with the titlewindow i would like to close. i also tried calling it from the parent page that calls the custom titlewindow.
[flexcoders] Re: rss feed from various sources in flex
any tutorial on that?
[flexcoders] how to close a titlewindow that was not created as a popup
hi how can one how to close a titlewindow that was not created as a popup?
[flexcoders] Re: how to close a titlewindow that was not created as a popup
care to share how?
[flexcoders] dispatching data from remote object cfc query in an event.
hi how can i dispatch data from a remote object call to a cfc query in an event.
[flexcoders] titlewindow skinned component
hi how can i skin or where can i get a custom title window component like the one found here http://www.adobe.com/devnet/flex/articles/marketing_platforms_06.html; thanks
[flexcoders] generating codes that users can use to pay for a service
hello guys before i ask this let me say i know that many people will probably suggest using online payment systems like paypal but that is not an option in my case. so this is what i would like to know. i have a website where companies can post ads but before they can post the ad they have to have a code(key) which they purchase. lets say someone wanted to have his ad running for a month and the total monthly charge is 20 dollars, they have to purchase the code for 20 dollars which they input into the system and if valid then they can post their ad. can i create a system in flex/as3/coldfusion to generate the codes and tie a particular code to an amount for example if you want your ad to run for a month and it costs $20 then the system generates different codes that are worth $20 or can i use a database of some kind to store the codes? and how can i validate the code is worth $20? hope my question is clear.
[flexcoders] Re: generating codes that users can use to pay for a service
well am working on an application like ebay where guys can post staff for people to see. before posting staff one has to pay the monthly charge for posting. thought about paypal but in africa people are wary of using their debit cards so i thought may be i could generate keys that they can purchase from lets say convenient stores and supply that key when they are posting staff. so how can this be done?
[flexcoders] need visual design work done
hi i need a very good visual design to do some visual work for me. what is need is listed below 1- nice dark background that matches the darkroom theme(am using darkroom theme and need a background image) 2- nice effects (resize, move, fade or zoom) for popup ie titlewindow when popuping up and when closing 3- very fluid change effects for viewstack children 4- filter effects for tilelist 5- custom titlewindow with header background image and anchored round close button(dont like the skinned titlewindow of darkroom theme) 6- whatever you feel is good that i have left out. remember that they should be compatible with both flex sdk 2 and sdk 3. am currently using sdk 2. let me know how much it costs. thanks
[flexcoders] Re: tilelist HighlightIndicator effects
hi i have tried everything you have said but i get an error. here is the code i use for clearing the highlightIndicator. the error i get is method marked override must override another method override protected function clearHighlightIndicator(indicator:Sprite, itemRenderer:IListItemRenderer):void{ if(highlightIndicator) Tweener.addTween(indicator,({alpha:0, time:1, transition:easeOutCubic, onComplete:function():void{Sprite(highlightIndicator).graphics.clear()}}));
[flexcoders] Re: how to use a list's change event to refresh an array that is bound to it.
hello any help out there?