[flexcoders] Change alpha of image clicked in a repeater
I have a component that displays thumbnails using an image tag inside of a repeater. What I would like to do is change the alpha of the thumbnail when it is clicked to show the full image. A list of image names is being used as the dataprovider for the repeater in the component. I can get the name of the image selected but am at a loss as to how to change the alpha. Component to view thumbnails mx:HBox mx:Repeater id=thisRepeater dataProvider={imageList} mx:Image verticalAlign=bottom click=displayImage (event.currentTarget.getRepeaterItem()) rollOut=destroyBigTip() rollOver=createBigTip(event.currentTarget.getRepeaterItem()) id=currentImage source={currentImageURL + genusName + '/' + speciesName + '/tn_' + thisRepeater.currentItem.ImageName} /mx:Image /mx:Repeater /mx:HBox In the application file mx:Canvas id=viewCanvas styleName=thumbCanvas width=600 height=130 x=231.5 y=11 Components:thumbViewerHorizontal id = thView verticalScrollPolicy=off horizontalScrollPolicy=auto ourCustomImageEvent=selectFromThumbnail(event) height=112 currentImageURL={currentImageURL} imageList={imageList} genusName={genusName} speciesName={speciesName} x=10 bottom=7 width=580/ /mx:Canvas
[flexcoders] Re: Simple RemoteObject call - cannot figure out what is wrong
1. May seem simple but run the cfc from a cfm page in the same location at the flex file. I always make sure my cfc works outside of flex 2. Installl this to help with debuging http://www.mikenimer.com/index.cfm/2006/7/5/FlexDebugPanel This may provide some additional information --- In flexcoders@yahoogroups.com, George Georgiou [EMAIL PROTECTED] wrote: Hi all, I am trying to switch from httpservice into remoteobject but i m having a problem in here which i cannot figure out how to solve. I have managed to read data using a CFC and display them in a grid (I have really wrote my own component that I can pass SQL there and display data). However I cannot pass parameters into the CFC and insert or update my database. Here is my code: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Script ![CDATA[ private function submitForm():void { myService.qExecQuery(); } ]] /mx:Script mx:RemoteObject id=myService destination=ColdFusion source= GeorgeForm.cfcs.querylib/ mx:method name=qExecQuery / /mx:RemoteObject mx:Button x=27 y=36 label=Button click=submitForm();/ /mx:Application and here is a VERY simple CFC cfcomponent output=false cffunction name=qExecQuery access=remote cfquery name=qsQuery datasource=cfartgallery insert into tbl_test (firstName) values ('FlexGeorge') /cfquery cfreturn / /cffunction /cfcomponent When I click the button, I getr the following error: [RPC Fault faultString=Unable to invoke CFC faultCode=Server.Processing faultDetail=For details, turn on Robust Exception Information in the ColdFusion Administrator] at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::f aultHandler () at mx.rpc::Responder/fault() at mx.rpc::AsyncRequest/fault() at ::NetConnectionMessageResponder/NetConnectionChannel.as$40:NetConne ctionMessageResponder::statusHandler() at mx.messaging::MessageResponder/status() any ideas on how to achieve this simple task that I m trying to do? thanks, George
[flexcoders] Find parent of selected item in tree
I just can not seem to figure out how to get the parent of a selected item ([EMAIL PROTECTED]). In this case I need to know the genus name when a species is selected. Note that a species name is not unique to a genus name, Uromyces ingae and Puccinia ingae public var nameData:XML = allData genus name=Uromyces species name=ingae/ species name=elegans/ species name=dolicholi/ /genus genus name=Ravenelia species name=irregularis / /genus genus name=Puccinia species name=ingae/ species name=manoelae/ species name=longirostris/ /genus /allData Thanks, Dave
[flexcoders] Re: Find parent of selected item in tree
Thats what I needed. Thanks, --- In flexcoders@yahoogroups.com, m40.regs [EMAIL PROTECTED] wrote: I would suggest using: event.currentTarget.selectedItem.parent()[EMAIL PROTECTED] --- In flexcoders@yahoogroups.com, dffmyco dffmyco@ wrote: I just can not seem to figure out how to get the parent of a selected item ([EMAIL PROTECTED]). In this case I need to know the genus name when a species is selected. Note that a species name is not unique to a genus name, Uromyces ingae and Puccinia ingae public var nameData:XML = allData genus name=Uromyces species name=ingae/ species name=elegans/ species name=dolicholi/ /genus genus name=Ravenelia species name=irregularis / /genus genus name=Puccinia species name=ingae/ species name=manoelae/ species name=longirostris/ /genus /allData Thanks, Dave
[flexcoders] Re: setFocus - help needed
Unfortunately this did not solve the problem. Any other suggestions. Dave --- In flexcoders@yahoogroups.com, e_baggg [EMAIL PROTECTED] wrote: Change the line of code in your goTo() method to be: focusManager.setFocus(one); --- In flexcoders@yahoogroups.com, dffmyco dffmyco@ wrote: Three text input controls. Tab enabled, tab index 1,2,3. On the focus out of text control three I run a function to set focus back to text control 1. Text control 1 gets the focus(blue outline) but the cursor is not displayed until I click on the box. What do I have to do to have the cursor appear in the text control. Thanks, Dave ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Script ![CDATA[ import mx.core.*; private function goto():void{ one.setFocus() } ]] /mx:Script mx:TextInput x=137 y=77 id=one tabIndex=1 tabEnabled=true/ mx:TextInput x=137 y=147 id=two tabIndex=2 tabEnabled=true/ mx:TextInput x=137 y=237 id=three tabIndex=3 focusOut=goto() tabEnabled=true/ /mx:Application
[flexcoders] setFocus - help needed
Three text input controls. Tab enabled, tab index 1,2,3. On the focus out of text control three I run a function to set focus back to text control 1. Text control 1 gets the focus(blue outline) but the cursor is not displayed until I click on the box. What do I have to do to have the cursor appear in the text control. Thanks, Dave ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Script ![CDATA[ import mx.core.*; private function goto():void{ one.setFocus() } ]] /mx:Script mx:TextInput x=137 y=77 id=one tabIndex=1 tabEnabled=true/ mx:TextInput x=137 y=147 id=two tabIndex=2 tabEnabled=true/ mx:TextInput x=137 y=237 id=three tabIndex=3 focusOut=goto() tabEnabled=true/ /mx:Application
[flexcoders] combo box - missing value
I have a simple combo box currently showing 10 values. When I make the rowCount larger than the number of values all is ok. However if I set the rowCount to 8 (scroll bar appears) some of the values are displayed as blank lines. As you scroll up and the down the value that appears as blank changes. Need help. Thanks, Dave
[flexcoders] Re: Which chart was clicked
Ely: Thanks alot. Worked fine and I learned something about closures. Dave --- In flexcoders@yahoogroups.com, Ely Greenfield [EMAIL PROTECTED] wrote: You've got three options: 1) shove the id off into a member field, and grab it when the RO returns. This is the least well designed response, since it can break in use cases where you've got multiple requests out and you don't just want last-out-wins. Might be OK for your use case though. 2) send the id up to the RO, and have it include it in the response. A little wasteful, since the RO doesn't care about the id, but in general this 'cookie' pattern is a way to maintain state across RO calls. 3) use closures. you could do something like this: private function chartClickHandler(e:MouseEvent):void { var id:String = UIComponent(e.currentTarget).id; var roCB:Function = function(e:ResultEvent):void { nameList = event.result as ArrayCollection; currentState = showNames; gridPanel.title = id; myRemoteObject.getNomeForNames.removeEventListener (result,roCB); } myRemoteObject.getNomeForNames.addEventListener(result,roCB); myRemoteObject.getNomeForNames(id); } PieChart id=... click=chartClickHandler(event); ... / Ely. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of dffmyco Sent: Tuesday, September 05, 2006 8:28 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Which chart was clicked I have 3 pie charts which when clicked run the same remoteObject method. Is there a way within the method that I can determine which pie chart was clicked. I want to pass the id of the clicked chart as a variable in the result function of the remoteObject method. Thanks, Dave mx:PieChart id=Citrus click=myRemoteObject.getNomeforNames('Citrus') showDataTips=true dataProvider={citrusData}/ mx:RemoteObject id=myRemoteObject destination=ColdFusion showBusyCursor=true source=fungaldatabases.fungaldatabasesstats.stats fault=Alert.show(event.fault.faultString, 'Error'); mx:method name=getNomeforNames result=showNames(event) /mx:method /mx:RemoteObject public function showNames(event:ResultEvent):void{ nameList=event.result as ArrayCollection currentState = showNames; gridPanel.title = 'whould like to use the id of the chart selected' } -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/