[flexcoders] Re: Problems With my XML Created Array Collection
I am a little late to this party but I would have to recommend using AMF to pass your data back and forth. this allows you to pass objects and arrays of objects both ways. No need to convert objects to XML and back to objects - they are all just objects. When the data comes in you can use ArrayUtil.toArray on the result and create an ArrayCollection from this array. An empty result will have created a zero length array and you can trap on that. I use WebORB for PHP (Community Edition which is free) as the PHP middleware and have never had a problem. I have posted many examples on this forum of how to pass data back and forth. If you need any further help, I am but a post away ;-} I started out in my Flex learning going the XML route but soon got very confused, especially with trying to send arrays of data TO the server. As soon as I figured out how to do it with AMF I converted everything and now will not go back. Best Regards Steve
[flexcoders] Re: What is the Correct Type of Component For This?
Take a look at SuperTabNavigator which is part of FlexLib (http://code.google.com/p/flexlib/). From your description, it looks like it would do the trick. --- In flexcoders@yahoogroups.com, James garymoorcroft_...@... wrote: I'm lost as to what component to use for navigation within my application. Across the top of my app I want something which horizontally displays a list of categories which the user can click to select. This is fine if I use a tilelist but I also want to allow my client to add and remove categories and for the width of the component to adjust so that new categories fit in but it seems impossible to apply fit to content to a tilelist the way you can to a hbox which obviously means scrollbars will appear and if you switch the scroll policy off this simply means any added categories won't be visible if they are past the set width. If a hbox had a selecteditem property that would be perfect. Is there any such way of getting a component to work like this?
[flexcoders] Re: Alive Pdf To Slow
You could try using your back end server to create the PDF. I have had excellent results with TCPDF (http://www.tecnick.com/public/code/cp_dpage.php?aiocp_dp=tcpdf) on my PHP server. One caveat - my server has 16 dual core processors and 32GB of RAM. YMMV. --- In flexcoders@yahoogroups.com, Christophe christophe_jacque...@... wrote: Hello, I generate a Report with Alive Pdf from my web application. But the Pdf appears in about 3 minutes. it is too long for the customers. How to generates more rapidly a Pdf ? Thank you, Christophe,
[flexcoders] Re: Problems With my XML Created Array Collection
James First off, I would not use AMFPHP as it is deprecated in favor of ZendAMF (Part of Zend Framework). I found WebORB much easier to integrate than ZendAMF. With WebORB you use Object Oriented PHP. You create data transfer classes in both Flex and PHP and map them to each other. then you use class hinting in PHP to receive data from Flex. You can definitely send the arraycollection to PHP. It will arrive as an array of objects. One thing I think you should look into is SharedObjects in Flex. This allows you to save data to the local machine (Kind of like cookies but you have 100K of space you can use) and is very useful to hold these kinds of preferences. Steve --- In flexcoders@yahoogroups.com, James garymoorcroft_...@... wrote: Hi Steve. As I said earlier about using e4x I'm reluctant to use amfphp 1. because I already have eveything set up using regular php code and 2. I. struggle to find examples of how to use such methods compared to the regular methods of using traditional php. Would you happen to know if it is possible to send a copy of the array collection that I'm receiving somehow? I basically want it so that when the user logs in it gets the data that we've been discussing throughout this topic and sets it as an array collection in flex and then sends this whole array to the userlinks table I have in my mysql so each user basically has a whole copy of the links table to themselves and can edit this by setting favourites etc. How would you go about this judging by the code that I've got here (the code that Robert provided). I'd prefer to stick to php to upload the array as this project is for my uni course in which I've used php throughout but I suppose I could use amfphp to upload the arrays? Cheers for the advice so far. --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote: I am a little late to this party but I would have to recommend using AMF to pass your data back and forth. this allows you to pass objects and arrays of objects both ways. No need to convert objects to XML and back to objects - they are all just objects. When the data comes in you can use ArrayUtil.toArray on the result and create an ArrayCollection from this array. An empty result will have created a zero length array and you can trap on that. I use WebORB for PHP (Community Edition which is free) as the PHP middleware and have never had a problem. I have posted many examples on this forum of how to pass data back and forth. If you need any further help, I am but a post away ;-} I started out in my Flex learning going the XML route but soon got very confused, especially with trying to send arrays of data TO the server. As soon as I figured out how to do it with AMF I converted everything and now will not go back. Best Regards Steve
[flexcoders] Re: What is the Correct Type of Component For This?
I have never tried to do anything like this but just thinking off the top of my head... Try skinning components in Flex. http://www.davidflatley.com/2007/12/17/programmatic-button-skins-in-flex-3/ may be a good starting point. Look at using DeGrafa (http://www.degrafa.org) and/or ScaleNine (http://www.scalenine.com) to skin components. Have multiple sizes of graphics available and check the width of the screen and the number of icons and pick an appropriate size to show. --- In flexcoders@yahoogroups.com, James garymoorcroft_...@... wrote: Heres an image of my icons which is basically what I'm after. http://i223.photobucket.com/albums/dd147/jimmyoneshot/theicons.jpg The only difference is these are all just static ones I put in myself, now I need them to be dynamic i.e. the user can add and remove icons which is why I need it to resize. I've found a way of getting a tilelist to autoresize but there is a problem witrh this. I also want them to have a glow effect as you can see there. In that last version on application complete all of those images were converted to greyscale then got converted to color when each one was hovered over. I need to achieve this same effect again but I'm not sure if a tilelist can achieve this either as it simply has that dull blue theme box. I know this box can be removed using actionscript but how can one add in the glow effect to a tilelist hovered over item? --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote: Take a look at SuperTabNavigator which is part of FlexLib (http://code.google.com/p/flexlib/). From your description, it looks like it would do the trick. --- In flexcoders@yahoogroups.com, James garymoorcroft_ict@ wrote: I'm lost as to what component to use for navigation within my application. Across the top of my app I want something which horizontally displays a list of categories which the user can click to select. This is fine if I use a tilelist but I also want to allow my client to add and remove categories and for the width of the component to adjust so that new categories fit in but it seems impossible to apply fit to content to a tilelist the way you can to a hbox which obviously means scrollbars will appear and if you switch the scroll policy off this simply means any added categories won't be visible if they are past the set width. If a hbox had a selecteditem property that would be perfect. Is there any such way of getting a component to work like this?
[flexcoders] Re: Problems With my XML Created Array Collection
Maybe a combination of Server based and locally saved preferences? This is what I do. The user can set his/her own display preferences which are saved in SharedObjects and the data is retrieved from the server. --- In flexcoders@yahoogroups.com, Gary Moorcroft garymoorcroft_...@... wrote: Actually the whole app was previously made entirely using shared objects with no web based dynamic data where the user could save all of the links to their local machine. The problem was of course my client wanted to add new links and update the existing links as time went on which means obviously it needs to all be web based. --- On Wed, 21/4/10, valdhor valdhorli...@... wrote: From: valdhor valdhorli...@... Subject: [flexcoders] Re: Problems With my XML Created Array Collection To: flexcoders@yahoogroups.com Date: Wednesday, 21 April, 2010, 13:49  James First off, I would not use AMFPHP as it is deprecated in favor of ZendAMF (Part of Zend Framework). I found WebORB much easier to integrate than ZendAMF. With WebORB you use Object Oriented PHP. You create data transfer classes in both Flex and PHP and map them to each other. then you use class hinting in PHP to receive data from Flex. You can definitely send the arraycollection to PHP. It will arrive as an array of objects. One thing I think you should look into is SharedObjects in Flex. This allows you to save data to the local machine (Kind of like cookies but you have 100K of space you can use) and is very useful to hold these kinds of preferences. Steve --- In flexcod...@yahoogro ups.com, James garymoorcroft_ ict@ wrote: Hi Steve. As I said earlier about using e4x I'm reluctant to use amfphp 1. because I already have eveything set up using regular php code and 2. I. struggle to find examples of how to use such methods compared to the regular methods of using traditional php. Would you happen to know if it is possible to send a copy of the array collection that I'm receiving somehow? I basically want it so that when the user logs in it gets the data that we've been discussing throughout this topic and sets it as an array collection in flex and then sends this whole array to the userlinks table I have in my mysql so each user basically has a whole copy of the links table to themselves and can edit this by setting favourites etc. How would you go about this judging by the code that I've got here (the code that Robert provided). I'd prefer to stick to php to upload the array as this project is for my uni course in which I've used php throughout but I suppose I could use amfphp to upload the arrays? Cheers for the advice so far. --- In flexcod...@yahoogro ups.com, valdhor valdhorlists@ wrote: I am a little late to this party but I would have to recommend using AMF to pass your data back and forth. this allows you to pass objects and arrays of objects both ways. No need to convert objects to XML and back to objects - they are all just objects. When the data comes in you can use ArrayUtil.toArray on the result and create an ArrayCollection from this array. An empty result will have created a zero length array and you can trap on that. I use WebORB for PHP (Community Edition which is free) as the PHP middleware and have never had a problem. I have posted many examples on this forum of how to pass data back and forth. If you need any further help, I am but a post away ;-} I started out in my Flex learning going the XML route but soon got very confused, especially with trying to send arrays of data TO the server. As soon as I figured out how to do it with AMF I converted everything and now will not go back. Best Regards Steve
[flexcoders] Re: What is the Correct Type of Component For This?
A...Why do you say repeater items can't be selected? I built a custom component that responds to a mouse click and then repeat this component multiple times using a repeater from data that is returned from my server (Essentially this is a list of regions containing customers. Each user is only authorized to see specific regions/customers so the number of custom components repeated is set from this data). The custom component is fully self contained and responds to mouse clicks. If the underlying application needs to know about the clicks, I dispatch a bubbling event which the app listens for. So, in your case create a custom component with your different skins (greyscal/colored). The component should contain multiple sizes of images as well as a public var to set the size. The app should know the stage size as well as the number of items to display (From the server call). In your repeater, set the public var to the size you need. Each custom component can have its own overskin etc and respond appropriately as well as its own event listener for mouse clicks. --- In flexcoders@yahoogroups.com, James garymoorcroft_...@... wrote: I originally considered using a repeater inside a h box to repeat all of the items but the problem is a repeater doesn't allow items to be selected otherwise it would be perfect. You see I have a filter function that has been applied to my links based on what category item is selected. Overall what it needs to do is this:- - Have no blue theme boxes - Autoresize based on how many items are in it - On application complete all of the images in it are converted to greyscale (as shown in my pic) - The text and image of each item in it must glow and convert to colour as they are hovered over and convert back to greyscale and unglow as they are unhoevered over (again this can be seen in my app) All of the above effects are simple with static components but they are pretty much impossible to apply to a component that has the selcteditem/index properties i.e. is populated via a dataprovider. I wish the repeater component had a selected item property as I think that'd work. --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote: I have never tried to do anything like this but just thinking off the top of my head... Try skinning components in Flex. http://www.davidflatley.com/2007/12/17/programmatic-button-skins-in-flex-3/ may be a good starting point. Look at using DeGrafa (http://www.degrafa.org) and/or ScaleNine (http://www.scalenine.com) to skin components. Have multiple sizes of graphics available and check the width of the screen and the number of icons and pick an appropriate size to show. --- In flexcoders@yahoogroups.com, James garymoorcroft_ict@ wrote: Heres an image of my icons which is basically what I'm after. http://i223.photobucket.com/albums/dd147/jimmyoneshot/theicons.jpg The only difference is these are all just static ones I put in myself, now I need them to be dynamic i.e. the user can add and remove icons which is why I need it to resize. I've found a way of getting a tilelist to autoresize but there is a problem witrh this. I also want them to have a glow effect as you can see there. In that last version on application complete all of those images were converted to greyscale then got converted to color when each one was hovered over. I need to achieve this same effect again but I'm not sure if a tilelist can achieve this either as it simply has that dull blue theme box. I know this box can be removed using actionscript but how can one add in the glow effect to a tilelist hovered over item? --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote: Take a look at SuperTabNavigator which is part of FlexLib (http://code.google.com/p/flexlib/). From your description, it looks like it would do the trick. --- In flexcoders@yahoogroups.com, James garymoorcroft_ict@ wrote: I'm lost as to what component to use for navigation within my application. Across the top of my app I want something which horizontally displays a list of categories which the user can click to select. This is fine if I use a tilelist but I also want to allow my client to add and remove categories and for the width of the component to adjust so that new categories fit in but it seems impossible to apply fit to content to a tilelist the way you can to a hbox which obviously means scrollbars will appear and if you switch the scroll policy off this simply means any added categories won't be visible if they are past the set width. If a hbox had a selecteditem property that would be perfect. Is there any such way of getting a component to work like this?
[flexcoders] Re: Problems With my XML Created Array Collection
Amy That I didn't know. AMFPHP is probably a viable option then, especially seeing as it is being updated. I left AMFPHP behind once I went with WebORB and have never looked back until now. --- In flexcoders@yahoogroups.com, Amy amyblankens...@... wrote: --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote: James First off, I would not use AMFPHP as it is deprecated in favor of ZendAMF (Part of Zend Framework). I found WebORB much easier to integrate than ZendAMF. With WebORB you use Object Oriented PHP. You create data transfer classes in both Flex and PHP and map them to each other. then you use class hinting in PHP to receive data from Flex. You can definitely send the arraycollection to PHP. It will arrive as an array of objects. One thing I think you should look into is SharedObjects in Flex. This allows you to save data to the local machine (Kind of like cookies but you have 100K of space you can use) and is very useful to hold these kinds of preferences. I would disagree that AMFPHP is deprecated... They just released a new version in February. -Amy
[flexcoders] Re: What is the Correct Type of Component For This?
OK, I did some googling and this looks like exactly what you are after... http://flexaired.blogspot.com/2008/07/sample-image-tile-list.html --- In flexcoders@yahoogroups.com, James garymoorcroft_...@... wrote: Yes but it's the glow effect that I require. when each item is hovered over it needs to glow rather than just having the blue themed square. Have you got any idea how to do this? --- In flexcoders@yahoogroups.com, dannyvenier dannyvenier@ wrote: Why not use a tileList or if spark, a List with tile layout. You can use a custom itemrenderer which can re-render when additional buttons are added and in rendering, can determine the optimum size based on running an algorithm on your dataprovider. There are all sorts of edge conditions to worry about (what if the total text width exceeds that of your container etc., etc.., but those have to be dealt with in any case, and I imagine you need a custom renderer anyway, to build your list items. --- In flexcoders@yahoogroups.com, James garymoorcroft_ict@ wrote: I'm lost as to what component to use for navigation within my application. Across the top of my app I want something which horizontally displays a list of categories which the user can click to select. This is fine if I use a tilelist but I also want to allow my client to add and remove categories and for the width of the component to adjust so that new categories fit in but it seems impossible to apply fit to content to a tilelist the way you can to a hbox which obviously means scrollbars will appear and if you switch the scroll policy off this simply means any added categories won't be visible if they are past the set width. If a hbox had a selecteditem property that would be perfect. Is there any such way of getting a component to work like this?
[flexcoders] Re: What is the Correct Type of Component For This?
I also looked at TourDeFlex to get some ideas. Here is a small example that I created that shows how to create a custom component as well as do the Glow effect on an image. (I got the image from downloading the file inside TourDeFlex under Glow): Application: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical verticalAlign=top horizontalAlign=center backgroundGradientColors=[0x00,0x323232] paddingTop=0 xmlns:components = * mx:Script ![CDATA[ [Bindable] private var dp:Array = [ {text: First, image: helmet}, {text: Second, image: helmet}, {text: Third, image: helmet}, {text: Fourth, image: helmet}, {text: Fifth, image: helmet} ]; ]] /mx:Script mx:HBox mx:Repeater id=myImages dataProvider={dp} components:MyImageComponent theItem={myImages.currentItem}/ /mx:Repeater /mx:HBox /mx:Application MyImageComponent.mxml ?xml version=1.0 encoding=utf-8? mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml; horizontalAlign=center width=200 height=200 creationComplete=onCreationComplete() mx:Script ![CDATA[ public var theItem:Object; [Bindable] private var imageLocation:String; private function onCreationComplete():void { thisText.text = theItem.text; thisImage.source = images/ + theItem.image + .png; } ]] /mx:Script mx:Image id=thisImage rollOverEffect={glowImage} rollOutEffect={unglowImage} autoLoad=true/ mx:Text id=thisText fontSize=24/ mx:Glow id=glowImage duration=1000 alphaFrom=1.0 alphaTo=0.3 blurXFrom=0.0 blurXTo=50.0 blurYFrom=0.0 blurYTo=50.0 color=0x22A050/ mx:Glow id=unglowImage duration=1000 alphaFrom=0.3 alphaTo=1.0 blurXFrom=50.0 blurXTo=0.0 blurYFrom=50.0 blurYTo=0.0 color=0x3380DD/ /mx:VBox BTW. I only found one png image so I used it repeatedly. Also, I have only one size. You should make multiple sizes and place them in the images folder. You should also set the width and height inside the custom component depending on the size you want (I have them hard coded in my example). Then you would pass a size to the custom component by exposing a public variable and use a switch statement to select the correct size. HTH Steve --- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote: OK, I did some googling and this looks like exactly what you are after... http://flexaired.blogspot.com/2008/07/sample-image-tile-list.html --- In flexcoders@yahoogroups.com, James garymoorcroft_ict@ wrote: Yes but it's the glow effect that I require. when each item is hovered over it needs to glow rather than just having the blue themed square. Have you got any idea how to do this? --- In flexcoders@yahoogroups.com, dannyvenier dannyvenier@ wrote: Why not use a tileList or if spark, a List with tile layout. You can use a custom itemrenderer which can re-render when additional buttons are added and in rendering, can determine the optimum size based on running an algorithm on your dataprovider. There are all sorts of edge conditions to worry about (what if the total text width exceeds that of your container etc., etc.., but those have to be dealt with in any case, and I imagine you need a custom renderer anyway, to build your list items. --- In flexcoders@yahoogroups.com, James garymoorcroft_ict@ wrote: I'm lost as to what component to use for navigation within my application. Across the top of my app I want something which horizontally displays a list of categories which the user can click to select. This is fine if I use a tilelist but I also want to allow my client to add and remove categories and for the width of the component to adjust so that new categories fit in but it seems impossible to apply fit to content to a tilelist the way you can to a hbox which obviously means scrollbars will appear and if you switch the scroll policy off this simply means any added categories won't be visible if they are past the set width. If a hbox had a selecteditem property that would be perfect. Is there any such way of getting a component to work like this?
[flexcoders] Re: What is the Correct Type of Component For This?
The way I would do it is to have a click event listener in the custom component that would dispatch a custom bubbling event that the application can listen for and handle. Modified example follows: Application: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical verticalAlign=top horizontalAlign=center backgroundGradientColors=[0x00,0x323232] paddingTop=0 xmlns:components = * initialize=onInit() mx:Script ![CDATA[ import mx.controls.Alert; [Bindable] private var dp:Array = [ {text: First, image: helmet}, {text: Second, image: helmet}, {text: Third, image: helmet}, {text: Fourth, image: helmet}, {text: Fifth, image: helmet} ]; private function onInit():void { addEventListener(MyCustomEvent.WHAT_YOU_WANT_TO_USE_AS_AN_EVENT_CONSTANT\ , MyCustomEventHndler); } private function MyCustomEventHndler(event:MyCustomEvent):void { // Do what you need to here event.stopImmediatePropagation(); Alert.show(event.currentItem.text); } ]] /mx:Script mx:HBox mx:Repeater id=myImages dataProvider={dp} components:MyImageComponent theItem={myImages.currentItem}/ /mx:Repeater /mx:HBox /mx:Application MyCustomComponent.mxml ?xml version=1.0 encoding=utf-8? mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml; horizontalAlign=center width=200 height=200 creationComplete=onCreationComplete() mx:Script ![CDATA[ public var theItem:Object; [Bindable] private var imageLocation:String; private function onCreationComplete():void { thisText.text = theItem.text; thisImage.source = images/ + theItem.image + .png; } private function handleClick(event:MouseEvent):void { event.stopImmediatePropagation(); dispatchEvent(new MyCustomEvent(MyCustomEvent.WHAT_YOU_WANT_TO_USE_AS_AN_EVENT_CONSTANT, theItem)); } ]] /mx:Script mx:Image id=thisImage rollOverEffect={glowImage} rollOutEffect={unglowImage} autoLoad=true click=handleClick(event)/ mx:Text id=thisText fontSize=24 click=handleClick(event)/ mx:Glow id=glowImage duration=1000 alphaFrom=1.0 alphaTo=0.3 blurXFrom=0.0 blurXTo=50.0 blurYFrom=0.0 blurYTo=50.0 color=0x22A050/ mx:Glow id=unglowImage duration=1000 alphaFrom=0.3 alphaTo=1.0 blurXFrom=50.0 blurXTo=0.0 blurYFrom=50.0 blurYTo=0.0 color=0x3380DD/ /mx:VBox MyCustomEvent.as package { import flash.events.Event; public class MyCustomEvent extends Event { public static const WHAT_YOU_WANT_TO_USE_AS_AN_EVENT_CONSTANT:String = blahblah; private var _currentItem:Object; public function MyCustomEvent(type:String, currentItem:Object, bubbles:Boolean=true, cancelable:Boolean=true) { super(type, bubbles, cancelable); _currentItem = currentItem; } public override function clone():Event { return new MyCustomEvent(type, _currentItem, bubbles, cancelable); } public function get currentItem():Object {return _currentItem;} public function set currentItem(currentItem:Object):void {_currentItem = currentItem;} } } HTH Steve --- In flexcoders@yahoogroups.com, James garymoorcroft_...@... wrote: Basically what I mean is I previously had a combo box populated by an array collection that contained the property categoryid and a tilelist populated by an array collection that also contained the property category id. So therefore when a user selected an item in the tilelist only the items that had a categoryid which matched the category id of that selected item were shown within the tilelist. Is this possible to implement into this new example? --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote: I also looked at TourDeFlex to get some ideas. Here is a small example that I created that shows how to create a custom component as well as do the Glow effect on an image. (I got the image from downloading the file inside TourDeFlex under Glow): Application: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical verticalAlign=top horizontalAlign=center backgroundGradientColors=[0x00,0x323232] paddingTop=0 xmlns:components = * mx:Script ![CDATA[ [Bindable] private var dp:Array = [ {text: First, image: helmet}, {text: Second, image: helmet}, {text: Third, image: helmet
[flexcoders] Re: What is the Correct Type of Component For This?
Ooops. That should have been MyImageComponent.mxml instead of MyCustomComponent.mxml. BTW, where are you from? I am an ex pat Kiwi now living in the states. --- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote: The way I would do it is to have a click event listener in the custom component that would dispatch a custom bubbling event that the application can listen for and handle. Modified example follows: Application: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical verticalAlign=top horizontalAlign=center backgroundGradientColors=[0x00,0x323232] paddingTop=0 xmlns:components = * initialize=onInit() mx:Script ![CDATA[ import mx.controls.Alert; [Bindable] private var dp:Array = [ {text: First, image: helmet}, {text: Second, image: helmet}, {text: Third, image: helmet}, {text: Fourth, image: helmet}, {text: Fifth, image: helmet} ]; private function onInit():void { addEventListener(MyCustomEvent.WHAT_YOU_WANT_TO_USE_AS_AN_EVENT_CONSTANT\ , MyCustomEventHndler); } private function MyCustomEventHndler(event:MyCustomEvent):void { // Do what you need to here event.stopImmediatePropagation(); Alert.show(event.currentItem.text); } ]] /mx:Script mx:HBox mx:Repeater id=myImages dataProvider={dp} components:MyImageComponent theItem={myImages.currentItem}/ /mx:Repeater /mx:HBox /mx:Application MyCustomComponent.mxml ?xml version=1.0 encoding=utf-8? mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml; horizontalAlign=center width=200 height=200 creationComplete=onCreationComplete() mx:Script ![CDATA[ public var theItem:Object; [Bindable] private var imageLocation:String; private function onCreationComplete():void { thisText.text = theItem.text; thisImage.source = images/ + theItem.image + .png; } private function handleClick(event:MouseEvent):void { event.stopImmediatePropagation(); dispatchEvent(new MyCustomEvent(MyCustomEvent.WHAT_YOU_WANT_TO_USE_AS_AN_EVENT_CONSTANT, theItem)); } ]] /mx:Script mx:Image id=thisImage rollOverEffect={glowImage} rollOutEffect={unglowImage} autoLoad=true click=handleClick(event)/ mx:Text id=thisText fontSize=24 click=handleClick(event)/ mx:Glow id=glowImage duration=1000 alphaFrom=1.0 alphaTo=0.3 blurXFrom=0.0 blurXTo=50.0 blurYFrom=0.0 blurYTo=50.0 color=0x22A050/ mx:Glow id=unglowImage duration=1000 alphaFrom=0.3 alphaTo=1.0 blurXFrom=50.0 blurXTo=0.0 blurYFrom=50.0 blurYTo=0.0 color=0x3380DD/ /mx:VBox MyCustomEvent.as package { import flash.events.Event; public class MyCustomEvent extends Event { public static const WHAT_YOU_WANT_TO_USE_AS_AN_EVENT_CONSTANT:String = blahblah; private var _currentItem:Object; public function MyCustomEvent(type:String, currentItem:Object, bubbles:Boolean=true, cancelable:Boolean=true) { super(type, bubbles, cancelable); _currentItem = currentItem; } public override function clone():Event { return new MyCustomEvent(type, _currentItem, bubbles, cancelable); } public function get currentItem():Object {return _currentItem;} public function set currentItem(currentItem:Object):void {_currentItem = currentItem;} } } HTH Steve --- In flexcoders@yahoogroups.com, James garymoorcroft_ict@ wrote: Basically what I mean is I previously had a combo box populated by an array collection that contained the property categoryid and a tilelist populated by an array collection that also contained the property category id. So therefore when a user selected an item in the tilelist only the items that had a categoryid which matched the category id of that selected item were shown within the tilelist. Is this possible to implement into this new example? --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote: I also looked at TourDeFlex to get some ideas. Here is a small example that I created that shows how to create a custom component as well as do the Glow effect on an image. (I got the image from downloading the file inside TourDeFlex under Glow): Application: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout
[flexcoders] Re: NetStream.Publish.BadName
I assume the problem occurs at the line... ns = new NetStream( nc ); nc has not been created at this point. You have declared it but it needs to be created and initialized. --- In flexcoders@yahoogroups.com, venkat eswar cooler...@... wrote: I am in deep trouble.I have a problem with videochat showing this error on broadcasting video.Please help me to solve this issue Error #2044: Unhandled NetStatusEvent:. level=error, code=NetStream.Publish.BadName at com.view::VideoPod/init() Here is my videopod code ?xml version=1.0 encoding=utf-8? mx:Panel xmlns:mx=http://www.adobe.com/2006/mxml; xmlns=* title={ userItem.username } creationComplete=init() layout=vertical width=180 height=160 xmlns:view=com.view.* mx:Script ![CDATA[ import mx.controls.Alert; import com.model.DataManager; import flash.media.Video; private var microphone:Microphone; private var camera:Camera; private var video:Video; [Bindable] public var userItem:Object; public var nc:NetConnection; private var ns:NetStream; [Bindable] private var dataManager : DataManager = DataManager.getInstance(); [Bindable] public var isSender:Boolean; [Bindable] private var chat:Chat; private function init():void { ns = new NetStream( nc ); video = new Video( 160, 120 ); if( isSender ) { camera = Camera.getCamera(); camera.setQuality( 16384 / 4, 0 ); camera.setMode( 160, 120, 15, false ); camera.setLoopback( true ); video.attachCamera( camera ); ns.attachCamera( camera ); microphone = Microphone.getMicrophone(); ns.attachAudio( microphone ); ns.publish( userItem.username ); } else { video.attachNetStream( ns ); ns.play( userItem.username ); } videoDisplay.video = video; } ]] /mx:Script view:VideoContainer id=videoDisplay width=160 height=120 / /mx:Panel
[flexcoders] Re: Reuse a LabelFunction
If it were me, I would use an item renderer. --- In flexcoders@yahoogroups.com, Angelo Anolin angelo_ano...@... wrote: Hi Amy, But as you can see in the function, I am specifying the Datafieldname from the object which was passed. How can I make it more generic so that I can re-use it in other datagrid columns? I hope you could provide some samples. thanks. Angelo From: Amy amyblankens...@... To: flexcoders@yahoogroups.com Sent: Fri, 19 March, 2010 9:13:38 Subject: [flexcoders] Re: Reuse a LabelFunction  --- In flexcod...@yahoogro ups.com, Angelo Anolin angelo_anolin@ ... wrote: Hi FlexCoders, I have created a labelfunction which I use in my datagrid to format the display value. mx:DateFormatter id=df formatString= DD/MM/ / And this is the AS function private function labelFunctionTest( itm:Object, col:DataGridColumn) :String {    return df.format(itm. DataFieldNamefor Col1); } Is there a way so that I could reuse the same label function to other datagrid columns? As you can see from the script above, I am only using the function to Col1 for the datagrid. How would I be able to specify the datafield if I am going to reuse the same with other datagrid columns? That is what the DataGridColumn parameter is for. Look at its dataField property. HTH; Amy
[flexcoders] Re: MXML Component Call Event in Parent
I would still be inclined to set an event listener in the parent... ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; xmlns:appButtonComponent=* layout=vertical initialize=init(); verticalScrollPolicy=off horizontalAlign=left mx:Script ![CDATA[ import flash.events.Event; import mx.controls.Alert; private function init():void { addEventListener(MouseEvent.CLICK, handleMouseEvent); } private function handleMouseEvent(event:MouseEvent):void { event.stopImmediatePropagation(); Alert.show(Button Clicked, event.target.label); } ]] /mx:Script appButtonComponent:ButtonComponent id=myButtonComponent/ /mx:Application --- In flexcoders@yahoogroups.com, Angelo Anolin angelo_ano...@... wrote: Hi Valdhor, Thanks for the advice. I have created a sample button component and a parent component to implement this. Parent.mxml ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;     xmlns:appButtonComponent=*     layout=vertical     initialize=init();     verticalScrollPolicy=off     horizontalAlign=left  mx:Script   ![CDATA[    import flash.events.Event;       private function myButtonComponent_Click(evt:Event) :void    {     Alert.show(Button Clicked, evt.target.label);    }    ]]  /mx:Script   appButtonComponent:ButtonComponent id=myButtonComponent click=myButtonComponent_Click(event)/ /mx:Application ButtonComponent.mxml ?xml version=1.0 encoding=utf-8? mx:HBox xmlns:mx=http://www.adobe.com/2006/mxml; verticalAlign=middle horizontalAlign=left horizontalGap=2 height=50  mx:Script   ![CDATA[   ]]  /mx:Script   mx:Button id=btn1 label=Button 1 width=100 /  mx:Button id=btn2 label=Button 2 width=100 / /mx:HBox Clicking on any button on the component will display the label of the button which was clicked. I wonder if I am doing things the RIGHT way through this? Although I believe I achieved what I wanted to do through this means. I would only then use a switch statement and process the necessary method or function based on the button which was clicked. Any further advice and better methods of coding would be highly appreciated. Thanks, Angelo From: valdhor valdhorli...@... To: flexcoders@yahoogroups.com Sent: Thu, 15 April, 2010 13:48:04 Subject: [flexcoders] Re: MXML Component Call Event in Parent  I don't really have any simple examples. I did look at the documentation for the Button Class (http://livedocs. adobe.com/ flex/3/langref/ flash/display/ InteractiveObjec t.html#event: click) and noted the bubbles property is set to true so the button click should bubble up to your parent component. So, add an event listener in the parent component to catch the event. If you have multiple buttons, you will have to check the event.target property to find out which button dispatched the event (hint: Add a breakpoint in your handler and check the event.target and event.currenttarget properties). --- In flexcod...@yahoogro ups.com, Angelo Anolin angelo_anolin@ ... wrote: Hi Valdhor, Care to show some examples? Or some links? Thanks. Angelo _ _ __ From: valdhor valdhorlists@ ... To: flexcod...@yahoogro ups.com Sent: Thu, 15 April, 2010 12:14:11 Subject: [flexcoders] Re: MXML Component Call Event in Parent àMake sure the event is set to bubble. Once it has, the event should bubble up the chain to the parent where an event listener should catch it. --- In flexcod...@yahoogro ups.com, Angelo Anolin angelo_anolin@ ... wrote: Hi FlexCoders, I have created a component consisting of some buttons which I am using in another MXML component. How would I trigger from the parent component an event which was done inside the component.àFor example, I clicked on a button on the component which I embedded, that should map to an event on the parent containing the component. I am looking to reuse the same component in other MXML files as well. Thanks. Appreciate your inputs. Regards, Angelo
[flexcoders] Re: MXML Component Call Event in Parent
By doing it with the click event on the child you are tight coupling the child to the parent. By using the bubbling event you are loose coupling and free to use the component anywhere. If you are comfortable with tight coupling, by all means use it. My own preference is to use loose coupling and respond to events as and when I need to. Sometimes it is useful to have multiple parent components in the chain respond to an event at different levels. I stop the propagation once the final component has handled the event. --- In flexcoders@yahoogroups.com, Angelo Anolin angelo_ano...@... wrote: Valdhor, Wouldn't it be enough to set the click event on the appButtonComponent's MXML declaration, like: click=myButtonComp onent_Click( event) I think I am missing a point here but could you please elaborate further why you would do so in your example? Thanks a lot. Angelo From: valdhor valdhorli...@... To: flexcoders@yahoogroups.com Sent: Fri, 16 April, 2010 10:16:34 Subject: [flexcoders] Re: MXML Component Call Event in Parent  I would still be inclined to set an event listener in the parent... ?xml version=1.0 encoding=utf- 8? mx:Application xmlns:mx=http: //www.adobe. com/2006/ mxml    xmlns:appButtonComp onent=*    layout=vertical    initialize= init();    verticalScrollPolic y=off    horizontalAlign= left    mx:Script       ![CDATA[          import flash.events. Event;          import mx.controls. Alert;                       private function init():void            {               addEventListener( MouseEvent. CLICK, handleMouseEvent) ;            }          private function handleMouseEvent( event:MouseEvent ):void          {             event.stopImmediate Propagation( );             Alert.show( Button Clicked, event.target. label);          }       ]]    /mx:Script    appButtonComponent: ButtonComponent id=myButtonCompone nt/ /mx:Application --- In flexcod...@yahoogro ups.com, Angelo Anolin angelo_anolin@ ... wrote: Hi Valdhor, Thanks for the advice. I have created a sample button component and a parent component to implement this. Parent.mxml ?xml version=1.0 encoding=utf- 8? mx:Application xmlns:mx=http: //www.adobe. com/2006/ mxml ààààxmlns:appButtonComp onent=* ààààlayout=vertical ààààinitialize= init(); ààààverticalScrollPolic y=off ààààhorizontalAlign= left àmx:Script àà![CDATA[ààààimport flash.events. Event; ààààààprivate function myButtonComponent_ Click(evt: Event) :void ààà{ ààààAlert.show( Button Clicked, evt.target.label) ; ààà} ààà]] à/mx:Script ààappButtonComponent: ButtonComponent id=myButtonCompone nt click=myButtonComp onent_Click( event)/ /mx:ApplicationàButtonComponent. mxml ?xml version=1.0 encoding=utf- 8? mx:HBox xmlns:mx=http: //www.adobe. com/2006/ mxml verticalAlign= middle horizontalAlign= left horizontalGap= 2 height=50ààmx:Script àà![CDATA[ àà]] à/mx:Script ààmx:Button id=btn1 label=Button 1 width=100 / àmx:Button id=btn2 label=Button 2 width=100 / /mx:HBoxàClicking on any button on the component will display the label of the button which was clicked. I wonder if I am doing things the RIGHT way through this? Although I believe I achieved what I wanted to do through this means. I would only then use a switch statement and process the necessary method or function based on the button which was clicked. Any further advice and better methods of coding would be highly appreciated. Thanks, Angelo _ _ __ From: valdhor valdhorlists@ ... To: flexcod...@yahoogro ups.com Sent: Thu, 15 April, 2010 13:48:04 Subject: [flexcoders] Re: MXML Component Call Event in Parent àI don't really have any simple examples. I did look at the documentation for the Button Class (http://livedocs. adobe.com/ flex/3/langref/ flash/display/ InteractiveObjec t.html#event: click) and noted the bubbles property is set to true so the button click should bubble up to your parent component. So, add an event listener in the parent component to catch the event. If you have multiple buttons, you will have to check the event.target property to find out which button dispatched the event (hint: Add a breakpoint in your handler and check the event.target and event.currenttarget properties). --- In flexcod...@yahoogro ups.com, Angelo Anolin angelo_anolin@ ... wrote: Hi Valdhor
[flexcoders] Re: What is the MXML syntax for this?
Try... local:myContainerComponent id=containerComponent imageVar=@Embed(source='myTestImage.jpg')/ --- In flexcoders@yahoogroups.com, Christopher McArthur cmcart...@... wrote: I have a component, that has a property of type Image. I need to assign a new Image component to it. this is trivial to do in action script. But, how do I do it in MXML? Example: mxml: local:myContainerComponent id=containerComponent/ actionscript: var myImage:Image = new Image(myTestImage.jpg); containerComponent.imageVar = myImage; Is there anyway to do that creation of the image, and assignment purely from MXML? The image cant be a child of anything else, so I cant just declare it randomly somewhere in the same container. For context, im using the Flash Component Kit, and the myContainerComponent is a container exported from flash a mx.flash.ContainerMovieClip. And it requires you to assign a component to its content property. Ideally, id like to create and assign this content component using mxml only.
[flexcoders] Re: EPUB reader in Flex
This may or may not help (As I understand it, it needs Flash Builder 4) http://opl.rit.edu/projects/page2pub/download --- In flexcoders@yahoogroups.com, Zdenek Mikan zde...@... wrote: Is there any open-source project which implements EPUB reader in Flex? Thanks for any info Zdenek M
[flexcoders] Re: MXML Component Call Event in Parent
Make sure the event is set to bubble. Once it has, the event should bubble up the chain to the parent where an event listener should catch it. --- In flexcoders@yahoogroups.com, Angelo Anolin angelo_ano...@... wrote: Hi FlexCoders, I have created a component consisting of some buttons which I am using in another MXML component. How would I trigger from the parent component an event which was done inside the component. For example, I clicked on a button on the component which I embedded, that should map to an event on the parent containing the component. I am looking to reuse the same component in other MXML files as well. Thanks. Appreciate your inputs. Regards, Angelo
[flexcoders] Re: flex online training
One place I always recommend is the Learn Flex in a Week at http://www.adobe.com/devnet/flex/videotraining/ --- In flexcoders@yahoogroups.com, Manoj Kumar rssma...@... wrote: Hi,  is there any online flex training Could you please let me know  Regards,  Manoj. --- On Thu, 4/15/10, Zdenek Mikan zde...@... wrote: From: Zdenek Mikan zde...@... Subject: [flexcoders] EPUB reader in Flex To: flexcoders@yahoogroups.com Date: Thursday, April 15, 2010, 8:48 AM  Is there any open-source project which implements EPUB reader in Flex? Thanks for any info Zdenek M
[flexcoders] Re: highlight a cell in datagrid
Use the data grid highlightItemRenderer? --- In flexcoders@yahoogroups.com, sathish_mca_raja sathish_mca_r...@... wrote: I want to use 2 selection indicators in a data grid at the same time. I will use one to highlight a row. I will use another to highlight a particular cell in the highlighted row in a different color. Please let me know if you have any ideas.
[flexcoders] Re: MXML Component Call Event in Parent
I don't really have any simple examples. I did look at the documentation for the Button Class (http://livedocs.adobe.com/flex/3/langref/flash/display/InteractiveObject.html#event:click) and noted the bubbles property is set to true so the button click should bubble up to your parent component. So, add an event listener in the parent component to catch the event. If you have multiple buttons, you will have to check the event.target property to find out which button dispatched the event (hint: Add a breakpoint in your handler and check the event.target and event.currenttarget properties). --- In flexcoders@yahoogroups.com, Angelo Anolin angelo_ano...@... wrote: Hi Valdhor, Care to show some examples? Or some links? Thanks. Angelo From: valdhor valdhorli...@... To: flexcoders@yahoogroups.com Sent: Thu, 15 April, 2010 12:14:11 Subject: [flexcoders] Re: MXML Component Call Event in Parent  Make sure the event is set to bubble. Once it has, the event should bubble up the chain to the parent where an event listener should catch it. --- In flexcod...@yahoogro ups.com, Angelo Anolin angelo_anolin@ ... wrote: Hi FlexCoders, I have created a component consisting of some buttons which I am using in another MXML component. How would I trigger from the parent component an event which was done inside the component. For example, I clicked on a button on the component which I embedded, that should map to an event on the parent containing the component. I am looking to reuse the same component in other MXML files as well. Thanks. Appreciate your inputs. Regards, Angelo
[flexcoders] Re: With the latest eula agreement from Apple
Yes, I know that. What I was suggesting is that Adobe change the output from ARM code to to an XCode project. Wouldn't that get around the new Apple agreement? --- In flexcoders@yahoogroups.com, Tom Chiverton tom.chiver...@... wrote: On Monday 12 Apr 2010, valdhor wrote: Just as a thought, couldn't Adobe output an XCode project that you just need to compile? No. That's not how the system works, it outputs direct to ARM machine code. See http://www.adobe.com/devnet/logged_in/abansod_iphone.html -- Helping to heterogeneously orchestrate eye-catching visionary data as part of the IT team of the year 2010, '09 and '08 This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word ?partner? to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com.
[flexcoders] Re: Simply Cannot Insert Values into My Database From Flex
No idea. I get data and insert data to/from MySQL databases via PHP every day without issue. Could you post your app code and the PHP code? Also, I would STRONGLY recommend getting a copy of Charles (http://www.charlesproxy.com). It costs $50 but it saves oodles of time when trying to track down network issues such as yours. --- In flexcoders@yahoogroups.com, James garymoorcroft_...@... wrote: I'm trying to learn how to insert values from my flex app to my mysql database via a php file. I've followed the following example to the letter but it simply will not work for me:- http://livedocs.adobe.com/flex/3/html/help.html?content=data_access_2.html When I click the button in the app which should do the insert it just does not do it. It's bizzare. I have uploaded the app to my server along with the php file and changed the url within the code to my php file etc and it all looks perfect but I try to do the insert then when I go to my mysql database it just isn't there and the table is still empty. Can anybody suggest why this might be?
[flexcoders] Re: render tree click problem with viewstack
That is very possible. You may like to look at calllater to run that code. --- In flexcoders@yahoogroups.com, advancedonsite nos...@... wrote: If I put in an Alert statement before the mainviewstack.selectedChild = Container(mainviewstack.getChildByName(selectedno...@hidden)); then everything works fine ? It's like the viewstack is not created in time but adding the alert slows it down and allows it to be created, very weird. --- In flexcoders@yahoogroups.com, advancedonsite nospam@ wrote: Let me give more details... Sometimes the viewstack shows sometimes it throws the error even on the same viewstack? its like something is not rendered in time or such? --- In flexcoders@yahoogroups.com, advancedonsite nospam@ wrote: I've been using this code to choose a viewstack based on name of the canvas ID... and it works but as the tree grew a bit larger I've noticed that certain items throw an error of ReferenceError: Error #1065: Variable is not defined. getDefinitionByName() === // Event handler for the Tree control change event. public function treeChanged(event:Event):void { selectedNode=Tree(event.target).selectedItem as XML; trace(selectedno...@hidden); mainviewstack.selectedChild = Container(mainviewstack.getChildByName(selectedno...@hidden)); } mx:XMLList id=treeData root label=Root Tree main label=Announcements hidden=announcements view label=Add hidden=announcements_add/ view label=Remove hidden=announcements_remove/ /main main label=Stations hidden=stations view label=Information hidden=stations_information/ mx:Tree id=RootTree width=15% height=100% labelField=@label showRoot=false dataProvider={treeData} change=treeChanged(event)/ mx:ViewStack id=mainviewstack width=85% height=100% mx:Canvas backgroundColor=#FF id=announcements mx:Text text=TEST fontWeight=bold paddingTop=10 paddingLeft=10 / /mx:Canvas mx:Canvas backgroundColor=#CC id=announcements_add mx:Text text=This is test viewstack fontWeight=bold paddingTop=10 paddingLeft=10 / /mx:Canvas
[flexcoders] Re: With the latest eula agreement from Apple
Just as a thought, couldn't Adobe output an XCode project that you just need to compile? --- In flexcoders@yahoogroups.com, Tom Chiverton tom.chiver...@... wrote: On Friday 09 Apr 2010, Battershall, Jeff wrote: Reportedly Unity 3D was told that this new EULA would not apply to them, yet on the face of it, it should. Doesn't Unity work by using a real Xcode project ? Unlike CS5... -- Helping to advantageously supply unique best-of-breed next-generation environments as part of the IT team of the year 2010, '09 and '08 This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word ?partner? to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com.
[flexcoders] Re: Flex File component?
Google is your friend. Just search for Flex Upload Component. --- In flexcoders@yahoogroups.com, markflex2007 markflex2...@... wrote: I am looking for a Flex File component that is similar with html file that used for upload file. Thanks Mark
[flexcoders] Re: Setting the desktop directory as the source of an image in a flex app
It can in AIR. See http://livedocs.adobe.com/flex/3/langref/flash/filesystem/File.html File.desktopDirectory --- In flexcoders@yahoogroups.com, James garymoorcroft_...@... wrote: Can this be done? My app creates an image folder on the user's desktop and creates image snapshots in it. I then want these images to be displayed within an image component so a user can preview them. But of course everyone's desktop directory is different. For example mine is c/users/james/desktop but obviously others would be different. The folder that my app creates on the desktop is called createdimages so let's say I had an image component in my app and the user created an image in this folder via my app called image1.jpg what code would I need to apply to the source property of an image component to make this image it's source? :- source=''
[flexcoders] Re: how to expand tree control from a button?
In your function test() change the line to... var node:XMLList = treeData.main.view.(@hidden == 'stations_info'); 'root' is not needed. --- In flexcoders@yahoogroups.com, advancedonsite nos...@... wrote: My TEST button I want to expand and select on this XML Node view label=Info hidden=stations_info/ I've tried to modify this example to handle passing from a button but got no errors just doesn't work? http://blog.flexexamples.com/2007/11/29/opening-nodes-in-a-flex-tree-control-using-the-expanditem-method/ ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Script ![CDATA[ [Bindable] public var selectedNode:XML; import mx.core.Container; // Event handler for the Tree control change event. public function treeChanged(event:Event):void { selectedNode=Tree(event.target).selectedItem as XML; trace(selectedno...@hidden); //var treenode_form_class:treenode_form = new treenode_form( ); //var viewstackformindex:Number = treenode_form_class.getViewStackFormIndex(selectedNode); //mainviewstack.selectedIndex = selectedno...@hidden; mainviewstack.selectedChild = Container(mainviewstack.getChildByName(selectedno...@hidden)); } private function test(){ var node:XMLList = treeData.root.main.view.(@hidden == 'stations_info'); expandParents(node[0]); RootTree.selectedItem = node[0]; var idx:int = RootTree.getItemIndex(node[0]); RootTree.scrollToIndex(idx); } private function expandParents(node:XML):void { if (node !RootTree.isItemOpen(node)) { RootTree.expandItem(node, true); expandParents(node.parent()); } } // myViewStack.selectedChild = myViewStack.getChildByName(treeMenu.itemToLabel(treeMenu.selectedItem)); ]] /mx:Script mx:XMLList id=treeData root label=Root Tree main label=Announcements hidden=announcements view label=Add hidden=announcements_add/ /main main label=Stations hidden=stations view label=Info hidden=stations_info/ /main /root /mx:XMLList mx:Panel title=Prototype height=100% width=100% paddingTop=10 paddingLeft=10 paddingRight=10 paddingBottom=10 mx:Button name=test label=TEST click=test() / mx:HDividedBox width=100% height=100% mx:Tree id=RootTree width=15% height=100% labelField=@label showRoot=false dataProvider={TreeXMLList} change=treeChanged(event)/ mx:ViewStack id=mainviewstack width=85% mx:Canvas backgroundColor=#FF id=announcements mx:Text text=Welcome to fontWeight=bold paddingTop=10 paddingLeft=10 / /mx:Canvas mx:Canvas backgroundColor=#CC id=announcements_add mx:Text text=This is Area 1 fontWeight=bold paddingTop=10 paddingLeft=10 / /mx:Canvas mx:Canvas id=stations mx:Text text=STATIONS/ /mx:Canvas /mx:ViewStack /mx:HDividedBox /mx:Panel /mx:Application
[flexcoders] Re: open source server side push
WebORB definitely has polling (At least, WebORB for PHP does). --- In flexcoders@yahoogroups.com, hgnowhg hgno...@... wrote: so, if there is no server side push what about anything w/ polling? Again, i can't find this w/ weborb or zend thx --- In flexcoders@yahoogroups.com, Jeffry Houser jeff@ wrote: I dunno; follow the links and see if you can figure it out. I'm not sure why they would impose limits; unless there was a technical reason, such as server stability. I would assume that Adobe enacts limits in Blaze an attempt to get you to upgrade to LiveCycle. WebORB, from The Midnight Coders, may be another solution to consider. --- In flexcoders@yahoogroups.com, hgnowhg hgnowhg@ wrote: thanks. does granite limit the number of concurrent users? --- In flexcoders@yahoogroups.com, Jeffry Houser jeff@ wrote: If BlazeDS won't do it; try GraniteDS. http://www.graniteds.org/confluence/pages/viewpage.action?pageId=229378 --- In flexcoders@yahoogroups.com, hgnowhg hgnowhg@ wrote: Are there any open source (i.e. FREE!) server side push services that do NOT limit the number of concurrent users? i.e. Blaze is open source but limits the number of subscribers. LCDS would be perfect but is expensive. All I need is a datagrid that will update w/ new data as data gets added to my MySQL server.
[flexcoders] Re: Flash focus issue or browser issue ?
I tried your example on my system (Windows XP, Firefox 3.6.3, Flash Player WIN 10,0,45,2) and I don't see any bugs. What do you see? --- In flexcoders@yahoogroups.com, liloosweet liloosw...@... wrote: Hello there. I'm experiencing a bug with non-IE browsers (firefox, opera, chrome, ...) and wondering if it's a Flash or Flex bug or a browser issue. What do I need to do to solve that ? Quick version: here is the example showing the problem http://devenirlibre.com/fullscreen/FS.html http://devenirlibre.com/fullscreen/FS.html More detail: I have a fullscreen button. It's state is linked to the DisplayState value. I made a example to show you the problem. It's based on a flex example source : http://blog.flexexamples.com/2007/08/07/creating-full-screen-flex-applic\ ations/ I just changed moved the button to the top of the Application, give it an id (button) plus the following: private function fullScreenHandler(evt:FullScreenEvent):void { dispState = Application.application.stage.displayState + (fullScreen= + evt.fullScreen.toString() + ); if (evt.fullScreen) { /* Do something specific here if we switched to full screen mode. */ } else { /* Do something specific here if we switched to normal mode. */ } } to private function fullScreenHandler(evt:FullScreenEvent):void { dispState = Application.application.stage.displayState + (fullScreen= + evt.fullScreen.toString() + ); if (evt.fullScreen) { button.selected = true; } else { button.selected = false; } } To see the bug, make sure that the place where the button is when fullscreen is outside the browser content window when normal. I hope it make sense. Here is the example: http://devenirlibre.com/fullscreen/FS.html http://devenirlibre.com/fullscreen/FS.html
[flexcoders] Re: Unsubscribe
Go to the flex coders group membership page (http://tech.groups.yahoo.com/group/flexcoders/join), login and then click the leave group button in the bottom right hand corner. --- In flexcoders@yahoogroups.com, Andres Serral aser...@... wrote: Can someone tell me how can i unsubscribe from this email list? I sent some mails to flexcoders-unsubscr...@yahoogroups.com but I keep receiving mails thanks
[flexcoders] Re: AdvancedDataGrid read cells
I would recommend NOT doing that. You should be looking at the dataprovider for the ADG. --- In flexcoders@yahoogroups.com, Jairo França (TGI) ja...@... wrote: In my application there is an AdvancedDataGrid where I insert rows and columns dynamically. My question seems simple but is driving me crazy: I need to read each cell of my AdvancedDataGrid (scan the AdvancedDataGrid). Remember that the structure is dynamic and I don't know in advance how many columns and rows that I have. Jairo França mailto:ja...@... ja...@... Tecnologia e Gestão da Informação Av. do Contorno, nº 6.777 sl 814 Funcionários - 30.110-043 Belo Horizonte MG Tel: (31) 3297-1144 Cel: (31) 8851-6413
[flexcoders] Re: ContextMenu 'clipboardMenu' property
Could you post some code? --- In flexcoders@yahoogroups.com, twcrone70 twcron...@... wrote: Can't get access to the ContexMenu's clipboardMenu property as the Flex docs specifies at http://livedocs.adobe.com/flex/3/langref/flash/ui/ContextMenu.html. Error is rror: Access of possibly undefined property clipboardMenu through a reference with static type flash.ui:ContextMenu... Using Flex 3.5 SDK. - Todd
[flexcoders] Re: Allowing Jpgs saved Within Flex to be named by the user
Try... var file:File = File.applicationDirectory.resolvePath('assets/images/' + imagenameentry.text + '.jpg'); --- In flexcoders@yahoogroups.com, James garymoorcroft_...@... wrote: My app allows a user to take a snapshot of a website and it then saves this snapshot as a jpg. However what I want is for the user to be able to name this jpg BEFORE it is saved eg if they type in yahooimage into a textinput component in my app (imagenameentry) and then click a button to create the image it will be automatically saved as yahooimage.jpg. At the moment I've just got the file saving as userimage.jpg but I tried editing a bit of my code which creates the file to this:- var file:File = File.applicationDirectory.resolvePath('assets/images/'imagenameentry.tex\ t'.jpg'); This never worked and throws a syntax error but if I use:- var file:File = File.applicationDirectory.resolvePath('assets/images/userimage.jpg'); Then it saves but as I say I want the image to be nameable like in the top example so that whatever the user enters in the imagenameentry box will be set as the name of the image. What am I doing wrong here and is there another way to do this?
[flexcoders] Re: Uploading a Specific file rather than browsing
I'm fairly sure that would break the security so would not be allowed. You already have the image data in memory so send that data to the server and have the server save the image. This post may help... http://blog.pigdev.com/?p=137 --- In flexcoders@yahoogroups.com, James garymoorcroft_...@... wrote: My app allows users to create a user-named jpg like so:- var enteredimagename:String = imagenameentry.text; var file:File = File.applicationDirectory.resolvePath(('assets/images/')+enteredimagename+('.jpg')); However I now want to allow a user to upload that specfic file automatically to my server by clicking a button which will simply upload that file WITHOUT having them browse for it. So basically I need it set up so that when the user clicks a button whatever name they type into the imagenameentry.text will be the image that gets uploaded. For example they create an image which they name yahooimage by typing yahooimage into the imagenameentry text input component. Once a button is clicked this will save this image as assets/images/yahooimage.jpg but I want to advance this button click further so that this specific jpg is then set as the file for upload without browsing for it. All the examples I've seen use the browse function though which is not what I want. How can this be combined with the filereference method or some other way so that the file to be uploaded can be entered into a textinput component as described above rather than browsed for?
[flexcoders] Re: Amfphp and require_once
Also check the Apache error log. I always tail this file while testing. --- In flexcoders@yahoogroups.com, Oleg Sivokon olegsivo...@... wrote: Either one of these: Required file cannot be found. Required file was found but contained errors. Try Charles HTTP proxy - it'll display what the response contained. It'll have some PHP generated error / warning text in the message - easier to diagnose the problem. Best. Oleg
[flexcoders] Re: Adding Drag/Drop with selected text within a TextArea
I don't think you need to extend any classes. You already know what the text is in the Text Input and you already know the text that the user is dragging so all you need to know is where the user has the mouse at the current moment and where they release the mouse button. The first is so you can place a vertical bar inside the text to show where the drop should happen. The second is where they let go of the mouse and the insert should happen. http://livedocs.adobe.com/flex/3/html/help.html?content=containers_intro_5.html should give you an idea of how to get the mouse position. Then all you need to do is grab both pieces of text, merge them at the mouse position and put the result back in the text input. --- In flexcoders@yahoogroups.com, gareth_arch gareth_a...@... wrote: Yeah, that's what I meant. I never ended up changing the arrow to a hand. It's the blinking I (when you click in a TextInput) that is causing the issue. The CursorManager only seems to be for switching the mouse cursor, not stopping the blinking I insertion thing from making Flex think it's inside the TextArea still. My latest issue is that I'm trying to figure out how to allow the user to insert the text at the exact drop point of the mouse cursor (previously I was just replacing what was in there with the selected text). Will I have to extend TextInput and TextArea so I can access the protected TextField or is there a method within the TextInput and TextArea that I can reference externally (without the need to extend the Flex components)? --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote: There are other cursors you can set it to. That one was to set it back to the standard system cursor. --- In flexcoders@yahoogroups.com, gareth_arch gareth_arch@ wrote: This appears to just be for the mouse cursor. It's actually in the TextArea itself (the blinking I bar). I got it working by doing a this.setFocus() in the component outside of the TextArea, then it removes the focus. --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote: When the drop is made, use the CursorManager class to set the cursor... CursorManager.setCursor(CursorManager.NO_CURSOR); --- In flexcoders@yahoogroups.com, gareth_arch gareth_arch@ wrote: OK, very close with this now. The final thing is that after I have dragged the value to the TextInputs, and dropped the value into them, the original TextArea still thinks the mouse is over it (so as you move the mouse around it looks like the mouse is still clicked in the TextArea and selects and deselects the text). I've tried firing mouse_click and mouse_out events from the TextArea, or setting the begin and end indices to 0, but nothing seems to stop it from thinking the mouse is still clicked in the TextArea. --- In flexcoders@yahoogroups.com, gareth_arch gareth_arch@ wrote: Our end user is wanting us to try to build something where they can drag text from the left side (in a TextArea) to TextInput boxes on the right hand side. I've tried some different ways to try to accomplish this: Making the TextArea draggable - This then prevents using the mouse to highlight the text because as soon as you start to select the text, you are now dragging the textarea. Trying to get the selected text, but it gets deselected as soon as you re-click the selected text. My latest solution (which I thought *might* be OK with the end user) is adding a mouse_up listener to the textarea, which then adds the selected text to a variable. The user can then double click the TextInput box, and the previously selected text is added to the TextInput.text This got an ah, hmm from our end user, so I'm trying to figure out something else, or this will be it :) I'm trying to figure out how to keep the text selected on re-click...so highlight text with mouse, left click on selected text (text stays highlighted), and then I can use the DragManager and some finagling to get the text to the TextInputs hopefully. Only problem is, as soon as I re-click, the selected text is deselected. Any way to prevent this from happening (or any other solutions that someone might have are always welcome)? Thanks.
[flexcoders] Re: Best Way To Tweet To Twitter From an Air Application
What did you manage to glean from the Twitter API documentation? --- In flexcoders@yahoogroups.com, James garymoorcroft_...@... wrote: I am looking for the quickest and simplest possible method to allow a user to post a tweet to twitter from within an air application. Basically I just want them to be able to enter their name and password in my app type what they want to tweet and click a button and it will tweet it to their profile. I've found tonnes of examples of displaying twitter feeds within applications but hardly any for posting a tweet FROM an air app. Can anyone recommend any or tell me what I'd need to do to get this done?
[flexcoders] Re: Best Way To Tweet To Twitter From an Air Application
Sorry, no idea. I haven't had to add that to any applications I've built. --- In flexcoders@yahoogroups.com, James garymoorcroft_...@... wrote: Hi Valdhor. I did finally manage to get this done. My app now has the capability to display a users Twitter feed and post a tweet to a twitter feed a long as they enteer a valid username and password. I'm now looking for good examples of using Facebook connect to do the following:- - View a user's statuses - View all a users albums and photos - Allow a user to post a new status to Facebook - All a user to upload a new photo to a specific album What I really want is to be able to do all of the above WITHOUT the user being taken to the 'Allow Access' window of Facebook which opens up in a new instance of Explorer, the reason for this being that I want my app to be entirely self contained or if there is no way around this I'd like to have it so the allow access window opens up in a html component within my application. Is this possible would you know? --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote: What did you manage to glean from the Twitter API documentation? --- In flexcoders@yahoogroups.com, James garymoorcroft_ict@ wrote: I am looking for the quickest and simplest possible method to allow a user to post a tweet to twitter from within an air application. Basically I just want them to be able to enter their name and password in my app type what they want to tweet and click a button and it will tweet it to their profile. I've found tonnes of examples of displaying twitter feeds within applications but hardly any for posting a tweet FROM an air app. Can anyone recommend any or tell me what I'd need to do to get this done?
[flexcoders] Re: Dataprovider and events
How does the combobox get its data? If it is using remoting, you can wait for the resultevent to fire and then populate the listbox. Also, you could populate the dataprovider with dummy blank data so it's not null and then update it when the data arrives. --- In flexcoders@yahoogroups.com, Scott h...@... wrote: I know I've ran into this before but for some reason my memory isn't kicking in. I've got a listbox that depends on a combobox to load before it fires its dataprovider. Without having the combobox loaded, the data provider for the listbox is null and it throws an error: #1009: Cannot access a property or method of a null object reference. I know why it's happening but I can't seem to figure out a workaround... Any ideas?
[flexcoders] Re: Between the client and server....
I think I would start out with WebORB for PHP and use their polling. This uses AMF to exchange binary data. Definitely stay away from XML - it's very portable but also very verbose. If the thing becomes wildly successful then I'd seriously look at data push technology like LCDS. --- In flexcoders@yahoogroups.com, C a.scots...@... wrote: I am an AS3 developer in that i dont use MXML frequently. Today at work, a fairly large project was put onto the table and we need to discuss it tomorrow. Some features include: Customisable rooms Eventually a catalogue of items Purchase system (real money) Customisable Avatar Achievements Points Points for cash. Essentially its bigger than anything i have attempted before. One of the downsides is that the view is using: AS3/XML/php To me, this seems impossible and i feel that using simple polling techniques is destined to break down. The amount of data is going to be huge and i just feel there must be a better way to do things than trying to store information across most of these modules with variables via PHP POST. Am i wrong here? If im wrong then id really appreciate knowing so give me a slap. It seems the best idea is to open a socket and kind of send data in binary steams. somehow pass data between client-server in a much better way. I dont know if i need a multiplayer socket server like smartfox, adobe IMS, or electroserver but the difficulty seems to be why my suggestions are not being pursued. Can anyone offer me advice? Thanks.
[flexcoders] Re: Adding Drag/Drop with selected text within a TextArea
There are other cursors you can set it to. That one was to set it back to the standard system cursor. --- In flexcoders@yahoogroups.com, gareth_arch gareth_a...@... wrote: This appears to just be for the mouse cursor. It's actually in the TextArea itself (the blinking I bar). I got it working by doing a this.setFocus() in the component outside of the TextArea, then it removes the focus. --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote: When the drop is made, use the CursorManager class to set the cursor... CursorManager.setCursor(CursorManager.NO_CURSOR); --- In flexcoders@yahoogroups.com, gareth_arch gareth_arch@ wrote: OK, very close with this now. The final thing is that after I have dragged the value to the TextInputs, and dropped the value into them, the original TextArea still thinks the mouse is over it (so as you move the mouse around it looks like the mouse is still clicked in the TextArea and selects and deselects the text). I've tried firing mouse_click and mouse_out events from the TextArea, or setting the begin and end indices to 0, but nothing seems to stop it from thinking the mouse is still clicked in the TextArea. --- In flexcoders@yahoogroups.com, gareth_arch gareth_arch@ wrote: Our end user is wanting us to try to build something where they can drag text from the left side (in a TextArea) to TextInput boxes on the right hand side. I've tried some different ways to try to accomplish this: Making the TextArea draggable - This then prevents using the mouse to highlight the text because as soon as you start to select the text, you are now dragging the textarea. Trying to get the selected text, but it gets deselected as soon as you re-click the selected text. My latest solution (which I thought *might* be OK with the end user) is adding a mouse_up listener to the textarea, which then adds the selected text to a variable. The user can then double click the TextInput box, and the previously selected text is added to the TextInput.text This got an ah, hmm from our end user, so I'm trying to figure out something else, or this will be it :) I'm trying to figure out how to keep the text selected on re-click...so highlight text with mouse, left click on selected text (text stays highlighted), and then I can use the DragManager and some finagling to get the text to the TextInputs hopefully. Only problem is, as soon as I re-click, the selected text is deselected. Any way to prevent this from happening (or any other solutions that someone might have are always welcome)? Thanks.
[flexcoders] Re: FocusOut event fires over and over...
It may be a bug (Or a feature) in the SDK. I seem to recall Alex responding about when a pop-up closes, focus returns to the control that opened the pop-up. You may like to search the archives. One other thing to try would be adding an event listener for when the pop-up closes that prevents a new pop-up being opened until new text is placed in the text input. --- In flexcoders@yahoogroups.com, Laurence lmacne...@... wrote: That doesn't seem to work either. Focus keeps returning to the original TextInput for some reason... I've even tried manually setting the focus to the next TextInput immediately after removing the FocusOut event listener on the first TextInput, before calling the pop-up window -- still doesn't work right; focus keeps going back to the first TextInput when the pop-up window closes. Now, if I click somewhere else on the screen -- in other words, I don't click or tab into the next TextInput -- the window pops up just the one time... I do not have any FocusIn or FocusOut parameters set in that second TextInput, so I don't know why clicking or tabbing into that second TextInput would cause the problem... Anything else I should try? This is just ridiculous -- it *should* work, but for some reason focus keeps getting sent back to the first TextInput. I'm running Flex Builder 3.5a, and Flash Player 10,0,42,34. Thanks, L --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote: Add the focusOut event listener when you get a focusIn on the text input. Then, when your focusOut event fires and you open the pop-up window, remove the focusOut event listener from the text input. --- In flexcoders@yahoogroups.com, Laurence LMacNeill@ wrote: I want a pop-up window to appear when someone tabs out of a particular TextInput in my app. So I simply set its FocusOut event equal to the function that makes the pop-up window appear... Sounds simple enough, right? But the FocusOut event keeps occurring over and over... I type something into the TextInput then hit Tab. The pop-up window pops up the way it's supposed to. I select something in the pop-up window (or close it without selecting anything) and it pops right back up. It's like my TextInput is re-gaining focus and then losing it again (which makes the window pop-up, again, forcing me to select something or close the window, which makes it happen again, etc., etc) So how do I prevent this from happening? Why is FocusOut occurring over and over and over like that? I've tried, in my FocusOut handler, setting the focus onto another TextInput before calling the pop-up window, but that does no good -- same exact results. This is incredibly frustrating! Anyone have any ideas? Thanks, Laurence MacNeill Mableton, Georgia, USA
[flexcoders] Re: Adding Drag/Drop with selected text within a TextArea
My thought would be to use a modifier key. If the user holds down the Ctrl key while over the text area, change the cursor to a hand, grab the current selection and drag/drop that. I've never done anything like that but it seems reasonable to me ;-} --- In flexcoders@yahoogroups.com, gareth_arch gareth_a...@... wrote: Our end user is wanting us to try to build something where they can drag text from the left side (in a TextArea) to TextInput boxes on the right hand side. I've tried some different ways to try to accomplish this: Making the TextArea draggable - This then prevents using the mouse to highlight the text because as soon as you start to select the text, you are now dragging the textarea. Trying to get the selected text, but it gets deselected as soon as you re-click the selected text. My latest solution (which I thought *might* be OK with the end user) is adding a mouse_up listener to the textarea, which then adds the selected text to a variable. The user can then double click the TextInput box, and the previously selected text is added to the TextInput.text This got an ah, hmm from our end user, so I'm trying to figure out something else, or this will be it :) I'm trying to figure out how to keep the text selected on re-click...so highlight text with mouse, left click on selected text (text stays highlighted), and then I can use the DragManager and some finagling to get the text to the TextInputs hopefully. Only problem is, as soon as I re-click, the selected text is deselected. Any way to prevent this from happening (or any other solutions that someone might have are always welcome)? Thanks.
[flexcoders] Re: Computation and Flex
In my case, I use PHP on the server side and Weborb (http://www.themidnightcoders.com) for data transfers. --- In flexcoders@yahoogroups.com, Christophe christophe_jacque...@... wrote: Hello, When a Flex application has too much of computation needs, how to execute this computations on the server side, and in which languages ? And how communicate these computations between the client computer and the server ? Thank you, Christoph
[flexcoders] Re: Automatically insert name, date, time into code, etc
Why not just use Subversion? --- In flexcoders@yahoogroups.com, Nick Middleweek n...@... wrote: Hi, Is it possible from Eclipse to automatically insert my name, the date and time to the top of Class files and when making code changes, perhaps press a key combo to insert this information? Thanks, Nick
[flexcoders] Re: FocusOut event fires over and over...
Add the focusOut event listener when you get a focusIn on the text input. Then, when your focusOut event fires and you open the pop-up window, remove the focusOut event listener from the text input. --- In flexcoders@yahoogroups.com, Laurence lmacne...@... wrote: I want a pop-up window to appear when someone tabs out of a particular TextInput in my app. So I simply set its FocusOut event equal to the function that makes the pop-up window appear... Sounds simple enough, right? But the FocusOut event keeps occurring over and over... I type something into the TextInput then hit Tab. The pop-up window pops up the way it's supposed to. I select something in the pop-up window (or close it without selecting anything) and it pops right back up. It's like my TextInput is re-gaining focus and then losing it again (which makes the window pop-up, again, forcing me to select something or close the window, which makes it happen again, etc., etc) So how do I prevent this from happening? Why is FocusOut occurring over and over and over like that? I've tried, in my FocusOut handler, setting the focus onto another TextInput before calling the pop-up window, but that does no good -- same exact results. This is incredibly frustrating! Anyone have any ideas? Thanks, Laurence MacNeill Mableton, Georgia, USA
[flexcoders] Re: Loading swf in child window?
I believe that it's possible to do what you want but I have never tried it. What I would do is implement modules and an interface so that the main app and modules can exchange data. --- In flexcoders@yahoogroups.com, newflexer d...@... wrote: We need to be able to open a window from our main application, in which we want to load a swf file to perform some configuration for the content in the main application. We also need to be able to pass the information from the child window to the main app. Is this possible? Any pointers? What container would we use for the child window? How do we load it? How do you pass the data from child to main app? thanks! David
[flexcoders] Re: Pasting an image into an image or bitmap container?
I don't think so. Why not just ask them to open the file on their system and then you could upload it to the server. I don't do this with images but I do with MS Excel files. There are many Flex File Upload examples. --- In flexcoders@yahoogroups.com, Nick Middleweek n...@... wrote: Hi, Using Flex 3.x, I've done a bit of research and understand that through code, for security reasons I can't access the Clipboard - makes perfect sense. Is there though, a way to allow the user to manually paste an bitmap into an on screen Object so that I can access it as a bitmap or something, which I can send to the server and save as an image, server side? Thanks, Nick
[flexcoders] Re: Framework Choice
I have an extremely large enterprise application (24 modules and counting) that does not use any framework. If you can discipline yourself in the way you organize your code, I don't really see the need for a framework. It just adds complexity in my view. I would recommend starting with modules if you see the need may be coming later on. I started with a monolithic app while I was learning Flex and had to change over to modules six months in. That was no fun I can tell you. Now that each part is in a module it makes it much easier for other team members to modify the code. It is also a lot easier to follow the logic. I would also recommend a versioning system - we use Subversion. --- In flexcoders@yahoogroups.com, Jake Churchill reyna...@... wrote: I have been tasked with architecting a large application for a company a friend of mine works at. I will also do some of the coding and act as a mentor, teaching people on staff the ins and outs of Flex. In the past, I've always used Cairngorm and Cairngorm w/ UM Extensions for a framework. I wrote a very basic app w/ Mate once just to learn it and I didn't really like it. So, my question to everyone here is what Framework would you chose? Keep in mind, the people I'll be working with are relatively new to flex and the application is going to end up being quite large. Down the road it will likely have an AIR counterpart. We might use modules but for now I'm staying away from that because it adds another layer of complexity that in the initial stages is not needed. My thoughts on this are that Cairngorm would be easier to learn for them and they had talked about brining more people on in the future for this project. If that's the case, it would likely be easier to find people familiar with Cairngorm than some of the alternatives. But, I don't want to rule out any of the alternatives if they might actually be a better choice. Opinions please. Thanks! -Jake Churchill
[flexcoders] Re: Framework Choice
I actually read the documentation around five or six times until I was sure I understood it and then used places like Alex's blog (http://blogs.adobe.com/aharui/2007/03/modules.html) to fill in any gaps. The biggest hurdle I had was in understanding how to use interfaces so that the main app (Which holds the menubar etc) and each of the modules could exchange data. Once you figure it out, you will never go back. --- In flexcoders@yahoogroups.com, Jake Churchill reyna...@... wrote: I have never written an app using modules. I understand the logic behind it, I've just never had the need. Is there anything regarding modules that I should know before starting? On Wed, Mar 24, 2010 at 10:27 AM, valdhor valdhorli...@...wrote: I have an extremely large enterprise application (24 modules and counting) that does not use any framework. If you can discipline yourself in the way you organize your code, I don't really see the need for a framework. It just adds complexity in my view. I would recommend starting with modules if you see the need may be coming later on. I started with a monolithic app while I was learning Flex and had to change over to modules six months in. That was no fun I can tell you. Now that each part is in a module it makes it much easier for other team members to modify the code. It is also a lot easier to follow the logic. I would also recommend a versioning system - we use Subversion. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Jake Churchill reynacho@ wrote: I have been tasked with architecting a large application for a company a friend of mine works at. I will also do some of the coding and act as a mentor, teaching people on staff the ins and outs of Flex. In the past, I've always used Cairngorm and Cairngorm w/ UM Extensions for a framework. I wrote a very basic app w/ Mate once just to learn it and I didn't really like it. So, my question to everyone here is what Framework would you chose? Keep in mind, the people I'll be working with are relatively new to flex and the application is going to end up being quite large. Down the road it will likely have an AIR counterpart. We might use modules but for now I'm staying away from that because it adds another layer of complexity that in the initial stages is not needed. My thoughts on this are that Cairngorm would be easier to learn for them and they had talked about brining more people on in the future for this project. If that's the case, it would likely be easier to find people familiar with Cairngorm than some of the alternatives. But, I don't want to rule out any of the alternatives if they might actually be a better choice. Opinions please. Thanks! -Jake Churchill
[flexcoders] Re: Style/skin the Menu class?
Check out the Flex 3 Style Explorer http://examples.adobe.com/flex3/consulting/styleexplorer/Flex3StyleExplorer.html# --- In flexcoders@yahoogroups.com, flex...@... flex...@... wrote: We have created a hoverMenu:Menu and I've been asked to style it. It seems that one would need to extend Menu to make that possible. I'm a bit confused on where to start. Any help? It's a simple box with a bg color, a solid border, a header and inside the box is the menu feed by XML data. It seems to me that we could have used VBox and put the menu inside it, but before we change that, I wanted to see how someone might make a simple style change to the Menu class itself. Thanks in advance! Dov
[flexcoders] Re: Framework Choice
Not to sound facetious but the OP asked the question after I gave my recommendation to use modules so I thought I would give him the details on how I learned. Anyway, my personal cost/benefit analysis on all the frameworks persuaded me to just not use any of them. The time to learn them outweighed any benefit I could foresee. We on-boarded a new developer that learned both Flex and our code architecture and had written and deployed a new non-trivial module within two months including back end PHP code with WebORB. --- In flexcoders@yahoogroups.com, Richard Rodseth rrods...@... wrote: I think the discussion of modules is only relevant in so far as some frameworks (Cairngorm?) won't work well with them if they make use of singletons. Any reasonable-sized single-module app (a pretty large proportion of Flex apps, I'd wager) benefits from a good MVC architecture. On Wed, Mar 24, 2010 at 10:31 AM, valdhor valdhorli...@...wrote: I actually read the documentation around five or six times until I was sure I understood it and then used places like Alex's blog ( http://blogs.adobe.com/aharui/2007/03/modules.html) to fill in any gaps. The biggest hurdle I had was in understanding how to use interfaces so that the main app (Which holds the menubar etc) and each of the modules could exchange data. Once you figure it out, you will never go back. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Jake Churchill reynacho@ wrote: I have never written an app using modules. I understand the logic behind it, I've just never had the need. Is there anything regarding modules that I should know before starting? On Wed, Mar 24, 2010 at 10:27 AM, valdhor valdhorlists@wrote: I have an extremely large enterprise application (24 modules and counting) that does not use any framework. If you can discipline yourself in the way you organize your code, I don't really see the need for a framework. It just adds complexity in my view. I would recommend starting with modules if you see the need may be coming later on. I started with a monolithic app while I was learning Flex and had to change over to modules six months in. That was no fun I can tell you. Now that each part is in a module it makes it much easier for other team members to modify the code. It is also a lot easier to follow the logic. I would also recommend a versioning system - we use Subversion. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.comflexcoders% 40yahoogroups.com, Jake Churchill reynacho@ wrote: I have been tasked with architecting a large application for a company a friend of mine works at. I will also do some of the coding and act as a mentor, teaching people on staff the ins and outs of Flex. In the past, I've always used Cairngorm and Cairngorm w/ UM Extensions for a framework. I wrote a very basic app w/ Mate once just to learn it and I didn't really like it. So, my question to everyone here is what Framework would you chose? Keep in mind, the people I'll be working with are relatively new to flex and the application is going to end up being quite large. Down the road it will likely have an AIR counterpart. We might use modules but for now I'm staying away from that because it adds another layer of complexity that in the initial stages is not needed. My thoughts on this are that Cairngorm would be easier to learn for them and they had talked about brining more people on in the future for this project. If that's the case, it would likely be easier to find people familiar with Cairngorm than some of the alternatives. But, I don't want to rule out any of the alternatives if they might actually be a better choice. Opinions please. Thanks! -Jake Churchill
[flexcoders] Re: Adding Drag/Drop with selected text within a TextArea
When the drop is made, use the CursorManager class to set the cursor... CursorManager.setCursor(CursorManager.NO_CURSOR); --- In flexcoders@yahoogroups.com, gareth_arch gareth_a...@... wrote: OK, very close with this now. The final thing is that after I have dragged the value to the TextInputs, and dropped the value into them, the original TextArea still thinks the mouse is over it (so as you move the mouse around it looks like the mouse is still clicked in the TextArea and selects and deselects the text). I've tried firing mouse_click and mouse_out events from the TextArea, or setting the begin and end indices to 0, but nothing seems to stop it from thinking the mouse is still clicked in the TextArea. --- In flexcoders@yahoogroups.com, gareth_arch gareth_arch@ wrote: Our end user is wanting us to try to build something where they can drag text from the left side (in a TextArea) to TextInput boxes on the right hand side. I've tried some different ways to try to accomplish this: Making the TextArea draggable - This then prevents using the mouse to highlight the text because as soon as you start to select the text, you are now dragging the textarea. Trying to get the selected text, but it gets deselected as soon as you re-click the selected text. My latest solution (which I thought *might* be OK with the end user) is adding a mouse_up listener to the textarea, which then adds the selected text to a variable. The user can then double click the TextInput box, and the previously selected text is added to the TextInput.text This got an ah, hmm from our end user, so I'm trying to figure out something else, or this will be it :) I'm trying to figure out how to keep the text selected on re-click...so highlight text with mouse, left click on selected text (text stays highlighted), and then I can use the DragManager and some finagling to get the text to the TextInputs hopefully. Only problem is, as soon as I re-click, the selected text is deselected. Any way to prevent this from happening (or any other solutions that someone might have are always welcome)? Thanks.
[flexcoders] Re: Regarding CollapsiblePanel's minimize and restore Events
The problem is that the CollapsiblePanel component from http://hasseg.org/blog/?p=113 does not have minimize or restore events. When I try to put minimize or restore into the mxml, it does not pop up autocomplete details and gives me an error on compile. --- In flexcoders@yahoogroups.com, binoop_cv binoop...@... wrote: Yes valdhor. We are also using the same. For CollapsiblePanel, the events are of minimize and restore. We cant achieve this functionality using open or close events. Once again thanking you for the support. Regards, Binoop --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote: Which CollapsiblePanel are you using? (Note: CollapsiblePanel is not a built-in Flex component). If you are using the one from http://hasseg.org/blog/?p=113, you can check if the CollapsiblePanel is open or not to figure out if it's a open or close event. --- In flexcoders@yahoogroups.com, binoop_cv binoop_cv@ wrote: In mxml we can specify the minimize and restore Events as containers:CollapsiblePanel id=projectPanel title=Data collapseDuration=200 width=100% collapsed=false minimize=fnHndlerForMinimize() restore=fnHndlerForRestore My question is how can we determine whether its an minimize or restore events using actionscript? In the case of datagrid we can specify addEventListener as dg.addEventListener(DataGridEvent.ITEM_EDIT_BEGIN, checkFieldCanBeEdited); So in the ITEM_EDIT_BEGIN, it will call the function checkFieldCanBeEdited. How we can add minimize and restore events of CollapsiblePanel like the above? Thanks much, Binoop
[flexcoders] Re: Empty Combobox with confirmed data in dataProvider
Arrays don't have event dispatchers so when you change the array no event is dispatched to let the bound variable know about it. Change your array to an array collection... userlist = new ArrayCollection(ArrayUtil.toArray(event.result)); --- In flexcoders@yahoogroups.com, trefalgar trefal...@... wrote: I searched the forum and Google unsuccessfully to see if someone else reported this problem and I came up empty. A while back I posted about questions with AsyncTokens and it was suggested I update my SDK within Flex, I updated to 3.5 from the default Flex SDK version. Since that time, I've had random issues with any app I've rebuilt/updated and pushed out with this new SDK. The problem is simple, I have a bindable variable defined as an Array, with data being pushed into it: userlist = ArrayUtil.toArray(event.result); Within the MXML, the definition is pretty straight forward as well: mx:ComboBox id=userbox dataProvider={userlist} labelField=username prompt= - Select User - x=10 y=40/ The problem is, the combobox is never updated with the data. I can throw in debug or trace userlist, and the data is there. This isn't a problem if I compile the application with the older version of the SDK. My only workaround, that I've found, is to set the dataProvider directly, instead of populating the bindable variable: userbox.dataProvider = ArrayUtil.toArray(event.result); Has anyone else seen this? Was I just doing it the wrong way the first time, and it just happened to work? Thanks in advance.
[flexcoders] Re: FileReference.load() not found -- help please?
I get... Property http://www.adobe.com/2008/actionscript/Flash10/::save not found on flash.net.FileReference and there is no default value. at LiveCycle/onSaveText()[C:\ColdFusion8\wwwroot\LiveCycle\src\LiveCycle.mxml:15] at LiveCycle/___LiveCycle_Button1_click()[C:\ColdFusion8\wwwroot\LiveCycle\src\LiveCycle.mxml:41] using Flash Player 10 WIN 10,0,45,2 Debug. It looks like you are not calling the save method but are accessing save as a property of the FileReference class. I would check how you are trying to call this method. Also, is the data parameter non null? --- In flexcoders@yahoogroups.com, reflexactions reflexacti...@... wrote: No its not just in the IDE (and yes we did that). To be very clear what we have done as a final resort to test the problem We went to this site http://sherifabdou.com/2008/06/using-the-new-filereference-class-in-flex-to-save-and-load-without-a-server/ and accessed the flex app there. A number of users all using FP10 access this app get the above error even ones using FP10.1 I access the app and I dont get any error. The same issue happened with our own application. So we can compile the app , some people can use it others cant even if using same browser, same version of FP. Its a show stopper at moment --- In flexcoders@yahoogroups.com, tntomek tntomek@ wrote: If this problem is in the IDE open all your .project/.flexProperties etc files and manually search for 9.x. Flex libraries don't have version number exposed in the IDE which makes it even harder to troubleshoot -Tom Gruszowski (http://tomek.me) --- In flexcoders@yahoogroups.com, reflexactions reflexactions@ wrote: This API is marked as FP10. We have been having a problem with some people getting the above error and they are using FP10. One guy was using FP10.0.32.18 and got the error, another guy was using 10.1 the same version as I was using and they got they error but I didnt. We even tried an example of this API that was on the web The same issue, works for me but not for the other guys . Any idea on what the problem is??
[flexcoders] Re: Euros/Dollars conversion tools
Try http://www.xe.com/dfs/product.php. You can get an XML feed at whatever frequency you desire. Also, a lot of countries produce their own conversion tables on their government web sites (I know they do in Australia and New Zealand). These are usually Excel spreadsheets that you can download. You may like to see if you can get that and pick apart the data you need. --- In flexcoders@yahoogroups.com, Christophe christophe_jacque...@... wrote: Hello, I am searching a system to receive with a script the Euro/Dollars conversion every day. How to do this with Flex? Thank you, Christophe,
[flexcoders] Re: Regarding CollapsiblePanel's minimize and restore Events
Which CollapsiblePanel are you using? (Note: CollapsiblePanel is not a built-in Flex component). If you are using the one from http://hasseg.org/blog/?p=113, you can check if the CollapsiblePanel is open or not to figure out if it's a open or close event. --- In flexcoders@yahoogroups.com, binoop_cv binoop...@... wrote: In mxml we can specify the minimize and restore Events as containers:CollapsiblePanel id=projectPanel title=Data collapseDuration=200 width=100% collapsed=false minimize=fnHndlerForMinimize() restore=fnHndlerForRestore My question is how can we determine whether its an minimize or restore events using actionscript? In the case of datagrid we can specify addEventListener as dg.addEventListener(DataGridEvent.ITEM_EDIT_BEGIN, checkFieldCanBeEdited); So in the ITEM_EDIT_BEGIN, it will call the function checkFieldCanBeEdited. How we can add minimize and restore events of CollapsiblePanel like the above? Thanks much, Binoop
[flexcoders] Re: how to prevent multiple logins w/ same id
Use a PHP Session variable and a database to keep track of which user is logged in. --- In flexcoders@yahoogroups.com, hgnowhg hgno...@... wrote: My application is a .swf file inside a php wrapper. Since I have a paid subscription site, I want to prevent user A from giving his password to user B. If user B loggeds in w/ User A's username password, then I will simply log out User A. (In the case that User B stole the password/username of User A then User A can simply change his password...This would also allow User A to login at home if he forgets to logout of the application while at work). What's the best way to do this?
[flexcoders] Re: using custom components
I have no idea how you would use Catalyst - I haven't used it. I know you can't embed an MXML file like you are trying. You may like to peruse the archives of this list as I seem to remember seeing something like this before. Perhaps compiling your MXML file to a SWF and embedding that may help. I will leave this to people more in the know about skinning. --- In flexcoders@yahoogroups.com, hgnowhg hgno...@... wrote: thank you. Yeah, I've seen those but how do I use something created in catalyst? It gives me a bunch of mxml files that replace the jpeg or png files you'd normally have. How do I use those? I get an error w/ this: upArrowSkin: Embed(source=../assets/scrollUpArrow2.mxml); but when I replace it w/ a .png file there are no problems. --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote: Check these two sites out for good examples of custom scrollbars for datagrids... http://www.switchonthecode.com/tutorials/flex-fun-advanced-datagrid-topics http://www.pixelbox.net/2008/06/02/skinning-scrollbars-in-flex-3/ --- In flexcoders@yahoogroups.com, hgnowhg hgnowhg@ wrote: newbie here, using flex 4. I've seen many posts about creating custom components but none really explain how to use them in a text box or datagrid. How do I use my custom scrollbar in a datagrid? In my mxml application I have in the opening application tag the following: xmlns:custom=org.custom.* In my datagrid, I've tryed setting verticalScrollBarStyleName to my component's name, which is customSroll. I have no idea where to go from here. thx!
[flexcoders] Re: Pb with Amfphp
I would also need to see your remoting-config.xml file to see the destinations you have created. --- In flexcoders@yahoogroups.com, Christophe christophe_jacque...@... wrote: Please, find below my services-config file: services-config services service id=amfphp-flashremoting-service class=flex.messaging.services.RemotingService messageTypes=flex.messaging.messages.RemotingMessage destination id=amfphp channels channel ref=my-amfphp/ /channels properties source*/source /properties /destination /service /services channels channel-definition id=my-amfphp class=mx.messaging.channels.AMFChannel endpoint uri=http://www.mywebsite.com:80/amfphp/gateway.php; class=flex.messaging.endpoints.AMFEndpoint/ /channel-definition /channels /services-config Thank you, Christophe, --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote: How are you setting up the channel for AMFPHP? Is it with AS3 code or with a services-config.xml file? If it is the latter, check to see if you have channels set up in the XML and that you have a child channel-definition named amfphp with the endpoint set to the location of the gateway.php file inside your installation of AMFPHP. If you want, I can post the relevant sections of my services-config.xml file (Even though I use WebORB. It should be the same except for the location of the gateway.php file). --- In flexcoders@yahoogroups.com, Christophe christophe_jacquelin@ wrote: Hello, In local, my application is working but with the server I have this error: Message: [MessagingError message='Destination 'amfphp' either does not exist or the destination has no channels defined (and the application does not define any default channels.)'] Detail: Couldn't establish a connection to 'amfphp' What is the reason of this message ? Thank you, Christophe,
[flexcoders] Re: Pb with Amfphp
Forget the last message. It looks like you are not loading in a remoting-config.xml file. You could try adding the following to the services-config.xml file (This is actually in my remoting-config.xml file)... default-channels channel ref=my-amfphp/ /default-channels --- In flexcoders@yahoogroups.com, Christophe christophe_jacque...@... wrote: Please, find below my services-config file: services-config services service id=amfphp-flashremoting-service class=flex.messaging.services.RemotingService messageTypes=flex.messaging.messages.RemotingMessage destination id=amfphp channels channel ref=my-amfphp/ /channels properties source*/source /properties /destination /service /services channels channel-definition id=my-amfphp class=mx.messaging.channels.AMFChannel endpoint uri=http://www.mywebsite.com:80/amfphp/gateway.php; class=flex.messaging.endpoints.AMFEndpoint/ /channel-definition /channels /services-config Thank you, Christophe, --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote: How are you setting up the channel for AMFPHP? Is it with AS3 code or with a services-config.xml file? If it is the latter, check to see if you have channels set up in the XML and that you have a child channel-definition named amfphp with the endpoint set to the location of the gateway.php file inside your installation of AMFPHP. If you want, I can post the relevant sections of my services-config.xml file (Even though I use WebORB. It should be the same except for the location of the gateway.php file). --- In flexcoders@yahoogroups.com, Christophe christophe_jacquelin@ wrote: Hello, In local, my application is working but with the server I have this error: Message: [MessagingError message='Destination 'amfphp' either does not exist or the destination has no channels defined (and the application does not define any default channels.)'] Detail: Couldn't establish a connection to 'amfphp' What is the reason of this message ? Thank you, Christophe,
[flexcoders] Re: What book in Flex would you guys recommend for a newbie ?
Before you go and buy a book, I recommend doing the Flex in a Week video training (https://www.adobe.com/devnet/flex/videotraining/). It's free and a great start to learning Flex. After that, all you should need is the Flex Documentation and, perhaps, a good ActionScript 3 reference. I frequently use Google and search for Flex 3.5 Class-I-Want-To-Know-About. The Adobe help document is almost always the first link. Make sure you change the number to the current latest version of the SDK. --- In flexcoders@yahoogroups.com, fred44455 fred44...@... wrote: I already asked questions on this forum but I rarely get feed backs. I was told that the Adobe community was a fantastic one but I guess it is very much like linux if you are a newbie you are on your own. Anyway I would appreciate a recommendation on a good book to learn Flex. Also I was told to learn AS3. What Actionscript are you guys referring to? The AS3 for Flex seems to be totally different with mx classes than the AS3 for Flash. So I would appreciate that you guys let me know which one I need to learn. Thanks.
[flexcoders] Re: Problem reading an XML file
I am not very good with XML (That's Tracy's expertise) but you can get it with the following: myXML..woeid myXML[0]..woeid and probably a dozen different ways. You may like to check these out for more detail... http://www.adobe.com/devnet/flex/quickstart/accessing_xml_data/ http://livedocs.adobe.com/flex/3/langref/XML.html --- In flexcoders@yahoogroups.com, Sneha bhansal...@... wrote: Hello All, Can anybody help me find out the bug in my program which doesn't read children in an XML file. I am trying to get WOEID of the location provided from Yahoo webservice API. I have given below what I am doing and also the XML file generated from Yahoo. mx:HTTPService id=weatherService url = http://where.yahooapis.com/v1/places.q('{txtCity.text}');start=0;count=1?appid=your AppID result=getWOEID(event) fault=faultEventHandler(event) resultFormat= e4x/ This is what I am doing in Script tag. But nothing works. I am able to read the complete XML file but not the children of an XML file. Could someone help find the problem. private function init():void{ var city:String = txtCity.text; //Alert.show(Your City:+city); weatherService.cancel(); //var params:Object = new Object(); //params.q = city; //Alert.show(params.q+params.q); //weatherService.send(params); weatherService.send(); } private function getWOEID(event:ResultEvent):void{ var myXML:XML = XML(event.result); taXML.text = myXML; var cityList:XMLList = myXML.data.place.children(); Alert.show( getting woeid: +cityList); //taXML = cityList.toString(); //cityList = myXML.places.place.name ; //cityList = myXML.place.woeid; //Alert.show(in getWOEID() +cityList); //lblWOEID.text = cityList; } This is the XML file generated and I am interested in accessing woeid: places yahoo:start=0 yahoo:count=1 yahoo:total=55 #8722; place yahoo:uri=http://where.yahooapis.com/v1/place/2371464; xml:lang=en-us woeid2371464/woeid placeTypeName code=7Town/placeTypeName nameBuffalo/name country type=Country code=USUnited States/country admin1 type=State code=US-NYNew York/admin1 admin2 type=County code=Erie/admin2 admin3/ locality1 type=TownBuffalo/locality1 locality2/ postal/ #8722; centroid latitude42.885441/latitude longitude-78.878464/longitude /centroid #8722; boundingBox #8722; southWest latitude42.824860/latitude longitude-78.942909/longitude /southWest #8722; northEast latitude42.970741/latitude longitude-78.771393/longitude /northEast /boundingBox /place /places Any help would be appreciated. Thank you Sneha
[flexcoders] Re: Reuse a LabelFunction
You could write the Item Renderer as an MXML component or an ActionScript class. I have created a sample of both types that do the same thing. Sometimes it easier to do it in MXML; Sometimes AS is the best way. With this trivial example, both are about the same. Pick whichever way you like the best. DateRendererAS.as package ItemRenderers { import mx.controls.*; import mx.controls.dataGridClasses.DataGridListData; import mx.formatters.DateFormatter; public class DateRendererAS extends Label { private var myDateFormatter:DateFormatter = new DateFormatter(); public function DateRendererAS() { super(); myDateFormatter.formatString = DD/MMM/; } override public function set data(value:Object):void { if(value != null) { super.data = value; text = myDateFormatter.format(value[DataGridListData(listData).dataField]); } } } } DateRendererMXML.mxml ?xml version=1.0 encoding=utf-8? mx:Label xmlns:mx=http://www.adobe.com/2006/mxml; mx:Script ![CDATA[ import mx.controls.dataGridClasses.DataGridListData; override public function set data(value:Object):void { if(value != null) { super.data = value; text = myDateFormatter.format(value[DataGridListData(listData).dataField]); } } ]] /mx:Script mx:DateFormatter id=myDateFormatter formatString=DD/MMM// /mx:Label And here is an application to try them out with (Change the itemRenderer to DateRendererAS to try the AS version) ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical mx:Script ![CDATA[ private var dp:Array = [ {symbol: ADBE, name: Adobe Systems Inc., dateIncorporated: 3/1/50}, {symbol: MACR, name: Macromedia Inc., dateIncorporated: 1/1/84}, {symbol: MSFT, name: Microsoft Corp., dateIncorporated: 11/24/71}, {symbol: IBM, name: IBM Corp., dateIncorporated: 9/14/63} ]; ]] /mx:Script mx:DataGrid id=dg initialize=dg.dataProvider = dp verticalAlign=middle mx:columns mx:DataGridColumn headerText=Name dataField=name width=140/ mx:DataGridColumn headerText=Symbol dataField=symbol width=60 / mx:DataGridColumn headerText=Date dataField=dateIncorporated width=100 itemRenderer=ItemRenderers.DateRendererMXML / /mx:columns /mx:DataGrid /mx:Application --- In flexcoders@yahoogroups.com, Angelo Anolin angelo_ano...@... wrote: I do know a bit of using itemrenderer.. Inline that is.. if you could post some example, I'd greatly appreciate it. would the itemrenderer be an as file or would it be inline as well? Thanks. Angelo From: valdhor valdhorli...@... To: flexcoders@yahoogroups.com Sent: Wed, 17 March, 2010 14:41:19 Subject: [flexcoders] Re: Reuse a LabelFunction Use an itemRenderer instead. If you need help creating one, let me know. --- In flexcod...@yahoogro ups.com, Angelo Anolin angelo_anolin@ ... wrote: Hi FlexCoders, I have created a labelfunction which I use in my datagrid to format the display value. mx:DateFormatter id=df formatString= DD/MM/ / And this is the AS function private function labelFunctionTest( itm:Object, col:DataGridColumn) :String { return df.format(itm. DataFieldNamefor Col1); } Is there a way so that I could reuse the same label function to other datagrid columns? As you can see from the script above, I am only using the function to Col1 for the datagrid. How would I be able to specify the datafield if I am going to reuse the same with other datagrid columns? Thanks.
[flexcoders] Re: Pb with Amfphp
How are you setting up the channel for AMFPHP? Is it with AS3 code or with a services-config.xml file? If it is the latter, check to see if you have channels set up in the XML and that you have a child channel-definition named amfphp with the endpoint set to the location of the gateway.php file inside your installation of AMFPHP. If you want, I can post the relevant sections of my services-config.xml file (Even though I use WebORB. It should be the same except for the location of the gateway.php file). --- In flexcoders@yahoogroups.com, Christophe christophe_jacque...@... wrote: Hello, In local, my application is working but with the server I have this error: Message: [MessagingError message='Destination 'amfphp' either does not exist or the destination has no channels defined (and the application does not define any default channels.)'] Detail: Couldn't establish a connection to 'amfphp' What is the reason of this message ? Thank you, Christophe,
[flexcoders] Re: using custom components
Check these two sites out for good examples of custom scrollbars for datagrids... http://www.switchonthecode.com/tutorials/flex-fun-advanced-datagrid-topics http://www.pixelbox.net/2008/06/02/skinning-scrollbars-in-flex-3/ --- In flexcoders@yahoogroups.com, hgnowhg hgno...@... wrote: newbie here, using flex 4. I've seen many posts about creating custom components but none really explain how to use them in a text box or datagrid. How do I use my custom scrollbar in a datagrid? In my mxml application I have in the opening application tag the following: xmlns:custom=org.custom.* In my datagrid, I've tryed setting verticalScrollBarStyleName to my component's name, which is customSroll. I have no idea where to go from here. thx!
[flexcoders] Re: Flash Buidler and Flash
You could also look into some of the tweening libraries for Flex... http://blog.greensock.com/tweenmaxas3/ http://blog.greensock.com/tweenliteas3/ http://code.google.com/p/tweener/ http://www.gskinner.com/libraries/gtween/ http://code.google.com/p/tweensy/ Actually, these are better... http://mrdoob.com/blog/post/636 http://www.greensock.com/tweening-speed-test/ --- In flexcoders@yahoogroups.com, Nick Collins ndcoll...@... wrote: Flash Builder is a development tool. I would suggest using Flash CS4, as it is the successor of Flash 8, not Flash Builder. Even still, any fancy transitions, will still be custom work, either using a tweening library or the timeline. Also, I would suggest checking out the Gaia Flash Framework, or Soma UI for building the site. Nick On Tue, Mar 16, 2010 at 2:59 PM, Dan Pride danielpr...@... wrote: I am rebuilding a site done in Flash 8 in Flash Builder 4 beta 2 The original site has some pretty fancy transitions between screens and I don't see anything comparable in FB4. Whats the best way to go? Is there anyway to get the transititons out of the original Flash 8 files and bring them into FB4? thanks Dan Pride
[flexcoders] Re: Reuse a LabelFunction
Use an itemRenderer instead. If you need help creating one, let me know. --- In flexcoders@yahoogroups.com, Angelo Anolin angelo_ano...@... wrote: Hi FlexCoders, I have created a labelfunction which I use in my datagrid to format the display value. mx:DateFormatter id=df formatString=DD/MM/ / And this is the AS function private function labelFunctionTest(itm:Object, col:DataGridColumn) :String { return df.format(itm.DataFieldNameforCol1); } Is there a way so that I could reuse the same label function to other datagrid columns? As you can see from the script above, I am only using the function to Col1 for the datagrid. How would I be able to specify the datafield if I am going to reuse the same with other datagrid columns? Thanks.
[flexcoders] Re: How to use blue plastic theme plz. Guide
Is this the one from fleksray? If so, there is a sample that you can download and check out the source to see how it's done. --- In flexcoders@yahoogroups.com, raja_s_patil kpr.rspa...@... wrote: Hello, I am developing my first flex project and I would like to use Blue Plastic theme to my project. I have downloaded the zip file but I could not make out how to apply to my application. Can Somebody guide me in form of a short how to, URL to related material, a example application etc. etc. Thanks and Regards R. S. Patil
[flexcoders] Re: show handcursor on mouseOver UITextField
If it were me, I would create eventListener's for mouseOver and MouseOut and use the cursormanager to set and remove a cursor. For a hand cursor you can use MouseCursor.HAND. --- In flexcoders@yahoogroups.com, siddiq mfsid...@... wrote: Hi May i know how do i use useHandCursor for a UITextField.Basically i have a AdvancedDataGrid in which i am using AdvancedDataGirdGroupItemRenderer for displaying hierarchical data with textLinks i need useHandCursor on mouseOver of the label(i am using super.label to add styles and click functionality,which works fine).i am unable to find any Property in UITextField for displaying handCursor. Regards Sidd -- View this message in context: http://old.nabble.com/show-handcursor-on-mouseOver--UITextField-tp27890142p27890142.html Sent from the FlexCoders mailing list archive at Nabble.com.
[flexcoders] Re: Remove item from Array and loop messes up
While that may work, I have found that anytime you are looping over an array like this, modifying/deleting items in the array while iterating over it is problematic at best. I find the best way is to create a new array that holds the id's of the items you want to delete and iterating over this new array and deleting specific items in the original array is best. --- In flexcoders@yahoogroups.com, Matthew fume...@... wrote: I found that reversing the loop, i.e. decrementing thru it solves the problem. Hope that helps someone. --- In flexcoders@yahoogroups.com, Matthew fumeng5@ wrote: Hi - I remove an item in an array using splice() and when there's one object left in the array, the looping stops. Why is that? My loop is nested within another loop but I thought it should iterate over everything first before it goes back to the outside loop. Here's my code: for( var i:int=0; idpLength; i++ ){ var group:Object = model.groupingColl[i]; var children:Array = group.children as Array; /* if there are 2 items in 'children', the first is removed fine but then it doesn't iterate over the one remaining. */ for each( var acct:Object in children ){ if( acct.selected == true ){ children.splice( i,1 ); } } }
[flexcoders] Re: Automatically update ValueObjects...
What I generally do is not use a Working Folder on the server. I use the Live folder for everything. Is there any specific reason you need a Working Folder? If this is new code, don't you need new ValueObjects? If this is existing code and you need to add new properties to a ValueObject, (I don't know if ColdFusion does, but PHP does) you can subclass the existing ValueObject and add properties to the new class. Either way, there is a new ValueObject class that will not affect existing code. --- In flexcoders@yahoogroups.com, Tracy Spratt tr...@... wrote: I have not used Remote object enough to be an authority on your specific issue, but that looks like a package path and typically package paths are relative, starting at the project root, (in my setups, this is src) , so the deployment location is never an issue. Are yo sure you need to specify MyworkingFolder? Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Ivan Wang Sent: Saturday, March 13, 2010 7:46 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Automatically update ValueObjects... But In what case do you have to change a package name? If you really did, the Flex Builder has some refactor feature, but not too much. You can try it, I'm not sure. - Original Message - From: Laurence mailto:lmacne...@... To: flexcod...@yahoogro mailto:flexcoders@yahoogroups.com ups.com Sent: Saturday, March 13, 2010 6:46 AM Subject: [flexcoders] Automatically update ValueObjects... I have several ValueObjects in my app... When I work with them in my test website, everything's fine. But when I want to export a release build, the ValueObjects no longer work because the folder-name is different... All my VO's have the following type of declaration at the top: [RemoteClass(alias=MyWorkingFolder.cfcs.vo.MyValueObjectVO)] And on the ColdFusion9 side it's: cfcomponent output=false alias=MyWorkingFolder.cfcs.vo.MyValueObjectVO Thus, when I export the release-build from MyWorkingFolder to MyLiveFolder (for example) all of the VOs stop working -- they're still looking for MyWorkingFolder. How do I get FlexBuilder to change the names inside the VOs automatically to match the release-build destination? So far, I've been doing it manually, but what a pain that is -- my patience is wearing thin, having to manually update a bunch of damn VOs, then change them back, every time I want to export a release build... There has to be a better way that I'm just not aware of... Thanks, Laurence MacNeill Mableton, Georgia, USA
[flexcoders] Re: Adding a button Icon
Yes, this requires a class. Try creating variables to hold your icons and then declaring them in your class... [Embed(source=icons/more.gif)] private var moreIcon:Class; Then use the class in the setStyle method... (issButArray[i] as Button).setStyle(icon, moreIcon); --- In flexcoders@yahoogroups.com, criptopus sd_br...@... wrote: issButArray[i].setStyle(icon,@Embed(source='icons/more.gif')); Type Coercion failed: cannot convert @Embed(source='icons/more.gif') to Class? - New error? --- In flexcoders@yahoogroups.com, Robert VanCuren Jr robert.vancuren.jr@ wrote: you need to use the setStyle method because icon is a style not a property. myButton.setStyle(icon, source); On Mon, Mar 15, 2010 at 8:20 AM, criptopus sd_brown@ wrote: // Add TLink To Issue Box issButArray.push(new Button()); issButArray[i].icon=@Embed(source='icons/more.gif'); issHbxArray[i].addChild(issButArray[i]); Error : Cannot create property icon on mx.controls.Button how do I set a buttons icon programatically? - Stephen
[flexcoders] Re: Send a fax
It depends. If you are using AIR, you could use Merapi to connect with a Java application to send the fax. If you are using a browser, you would have to send the data to a back end server which could send the fax. For example, using PHP, you could create a PDF with TCPDF (http://www.tecnick.com/public/code/cp_dpage.php?aiocp_dp=tcpdf) and then use a service like InterFax (http://www.interfax.net/en/dev/php) to send the fax. --- In flexcoders@yahoogroups.com, Christophe christophe_jacque...@... wrote: Hello, Is it possible to send a Fax from a Flex application ? Thank you, Christophe,
[flexcoders] Re: Adding a click to a button
(issButArray[i] as Button).addEventListener(MouseEvent.click, moreDetail); --- In flexcoders@yahoogroups.com, criptopus sd_br...@... wrote: Thanks for those that helped with setting the Icon style with a button programatically but now I have a problem with the click event. // Add Link To Issue Box issButArray.push(new Button()); issButArray[i].setStyle(icon,moreIcon); -- Thanks! issButArray[i].click=moreDetail();; --- How? issButArray[i].width = 43; issButArray[i].height = 13; usrColArray[usrColCnt].addChild(issButArray[i]);
[flexcoders] Re: I need some basic ActionScript help that I'm stumped on
I'm not great with XML (That's more Tracy's forte) but shouldn't it be trace(myADG.selectedItem.links.length); --- In flexcoders@yahoogroups.com, Mark mark.pusat...@... wrote: I'm having an issue with finding the length of the number of children items in my ArrayCollection. A small part of the xml that is being pulled in is below. You'll see that I have a node links with a child or children node link. If I have 2 or more link nodes then the length comes back with the proper number, but if I only have 1 it comes back as undefined. Here's my basic function that I'm putting together now private function dgChanged(evt:Event):void { if (myADG.selectedItem.links != null) { trace(myADG.selectedItem.links.link.length); } else { trace (NULL ); } items item eID4/eID eName![CDATA[3 Event with link]]/eName sDate1/2/2010/sDate eDate2/18/2010/eDate sTime12:00:00 PM/sTime eTime3:00:00 PM/eTime description![CDATA[Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.]]/description aNameAIT/aName cNameLearning/cName lNameUK/lName links link ID=1 description=description of the link title=Apple url=www.apple.com/ /links /item Any ideas as to why I'm getting undefined? Thanks, Mark
[flexcoders] Re: flexlib | CanvasButtonAccordionHeader | Identify Child
In HeaderRenderer.mxml change the Checkbox to: mx:CheckBox click=checkBoxHandler(event) mouseDown=event.stopImmediatePropagation() / then add a function to the Script block: private function checkBoxHandler(event:Event):void { event.stopImmediatePropagation(); trace(_label); } --- In flexcoders@yahoogroups.com, ilikeflex ilikef...@... wrote: I mean to say when you click on checkbox then How to identify which child of Accordion is clicked? --- In flexcoders@yahoogroups.com, ilikeflex ilikeflex@ wrote: Hi I am using the http://flexlib.googlecode.com/svn/trunk/examples/CanvasButtonAccordionHe\ ader/CanvasButtonAccordionHeader_Sample.swf How to identify which child of Accordion is clicked? Thanks ilikeflex
[flexcoders] Re: DragTile code help
I have had a cursory look at the example code. Your first problem will not be easy to accomplish. It looks like you will need to modify the generateLayout function in DragTile.as. I did not look into this further. I recommend you study the code to see how it works and read all the articles at the link you mentioned. This code is not for the beginner to tackle. --- In flexcoders@yahoogroups.com, flexas3dev lea.sab...@... wrote: Hello I need help to use the dragtile component http://kuwamoto.org/2007/05/15/making-the-world-better-via-refactoring-step-1/ You can download the source code here http://examples.kuwamoto.org/DragTile/DragTile_step1.zip And just import this into flex project using the flex sdk 2.0.1 hotfix 3 Play with that and if you have time to help me it will be great here are my 2 questions 1) I need on the second VBOX to have a horizontalScrollbar and no vertical I tried to comment out the horizontalScrollPolicy = ScrollPolicy.OFF; on the FlexibleContainer.as and also to change the VBOX by an HBOX but it's not working 2) for each of my items I need to add a rollover event which do a scale animation of the items so I added DisplayObject(renderer).addEventListener(MouseEvent.MOUSE_OVER,dragOver); DisplayObject(renderer).addEventListener(MouseEvent.MOUSE_OUT,mouseOut); I added this two lines on the FlexibleContainer line 143 into the commitProperties function in the for loop but its doing some wierd behaviour :( I would appreciate your help Thanks in advance
[flexcoders] Re: mxlm component instantiation using ActionScript
Your code should work fine. I do this all the time. In all likelihood there is another error in your code. What is the error? Is it a null reference of some kind? if so, have you tracked down what is null and why? Maybe some judicial use of callLater will help. --- In flexcoders@yahoogroups.com, normc_actionscript normcousin...@... wrote: Is it possible/advisable to add an mxml component to the application by doing this from a Flex container: var myComp:myCustomPanel = new myCustomPanel(); // myCustomPanel is myCustomPanel.mxml containing a Panel container. AddChild(myComp) On creation complete of myCustomPanel.mxml I attempt to set text in a mx:TextField sub component, but error occurs at runtime. Any other suggestions on how to pop up panels in the application? Popup manager? Include them on application startup and toggle visibility? Thanks, Norm C.
[flexcoders] Re: TypeError - Please Help
Have you installed the Flash Debug Player? Did you run your application from inside Flex Builder? Did you run it using the Debug option (ie. click the debug button or select the menu option Run-Debug Your application Name). That is what is meant by a debug build. Perhaps you should go over the Flex Documentation to make sure you understand how Flex applications are built and debugged. --- In flexcoders@yahoogroups.com, chefbrittison britton.j...@... wrote: What do you mean by a 'debug build'? Are you referring to a debug build of the Flex SDK? If so, where would I find that or how would I set that up? Thanks in advance. --- In flexcoders@yahoogroups.com, Alex Harui aharui@ wrote: If you use a debug build, you should get line numbers as well in the stacktrace, which will help us track it down. On 3/11/10 12:20 PM, chefbrittison britton.jeff@ wrote: I'm having problems with a custom component. I'm creating a Grid in the createChildren() method and adding rows dynamically within the updateDisplayList() method based on the value of a property. I continue to get this error and I don't have any idea how to fix it. TypeError: Error #1010: A term is undefined and has no properties. at mx.containers::Grid/updateDisplayList() at mx.core::UIComponent/validateDisplayList() at mx.core::Container/validateDisplayList() at mx.managers::LayoutManager/validateDisplayList() at mx.managers::LayoutManager/doPhasedInstantiation() at Function/http://adobe.com/AS3/2006/builtin::apply() at mx.core::UIComponent/callLaterDispatcher2() at mx.core::UIComponent/callLaterDispatcher() -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
[flexcoders] Re: ViewStack and CreationComplete...
As I understand it, yes. CreationComplete will only fire once (When the component is first created). From then on you will need to monitor the show event if you need to make changes based on when the component is displayed. --- In flexcoders@yahoogroups.com, Laurence lmacne...@... wrote: I have not. show happens every time the child of the ViewStack shown, I assume? And no other times? Sounds like that might work. The first time you switch to that view, the CreationComplete event happens, of course. Does the Show event occur after CreationComplete is done, or before? I assume after, but I don't want to guess incorrectly. Thanks, L. --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote: Have you tried the show event? --- In flexcoders@yahoogroups.com, Laurence LMacNeill@ wrote: I've been using a ViewStack to switch between views in my app... The first time you jump to a particular view, that view runs throws its CreationComplete event, whereupon I have it running an init() function. The subsequent times you jump to that view, there is no CreationComplete event, obviously... So what I need is an event that happens every time you jump to that view in the ViewStack... So I can intialize the view properly on the 2nd, 3rd, 4th, etc, time you jump to that view... Any ideas? Thanks, Laurence MacNeill Mableton, Georgia, USA
[flexcoders] Re: right click (view source)
http://livedocs.adobe.com/flex/3/html/help.html?content=build_7.html http://livedocs.adobe.com/flex/3/langref/flash/ui/ContextMenu.html http://blog.flexexamples.com/2008/11/07/adding-custom-context-menu-items-to-a-flex-application/ --- In flexcoders@yahoogroups.com, cholid cholid cholid_rid...@... wrote: HI all any one know where is script right click to view source in flex? and how to unactive it, and how to add more thanks regards
[flexcoders] Re: range of values checked in a case (switch)
Yes. You need to change the expression you are switching on... switch(true) { case age = 0 age = 4: ageGroup = 1; break; } The reason for this: Your case expression returns a true or false value. This does not match the expression in the switch so change the expression in the switch to reflect what will be returned in the case expression. HTH. Steve --- In flexcoders@yahoogroups.com, Wally Kolcz wko...@... wrote: Is there a way to check for a range of conditions inside a case of a switch case? I want to so something like this: switfch(age){ case (age = 0 age = 4): ageGroup = 1; break; ... }
[flexcoders] Re: Module's setup / ready event is not dispatched
How are you loading the module and how are you adding the event listener for the ModuleEvent.READY event. Also, have you tried loading the module with the ModuleLoader class instead of the ModuleManager class? --- In flexcoders@yahoogroups.com, Mayur ondemand_ma...@... wrote: I am having a problem with Module - SETUP event is not dispatched. Though I am getting the mdoule's PROGRESS event fully - continuous until all the bytes of the specified module are loaded. That means, the required module has fully reached at client side but I still I am not getting module's READY event. I am using ModuleManager to load modules dynamically with RSLs. Thanking in Advance, Mayur
[flexcoders] Re: HTTPService not returning ArrayCollection...
I use new ArrayCollection(ArrayUtil.toArray(event.result)). It works for 1 or more items in the result. --- In flexcoders@yahoogroups.com, Laurence lmacne...@... wrote: I'm trying to read data from an XML file, and put that data into an ArrayCollection. This works great when I have more than one object in the XML file. But when there's only one object in there, my HTTPService RPC returns it as an Object instead of an ArrayCollection of Objects. So when I assign the event.result to my ArrayCollection I get a Cannot Convert to ArrayCollection error message... Let me give an example: MyXMLFile.xml: people person firstNameJoe/firstName lastNameSmith/lastName /person /people If I have more than one person/person pair in my XML file, then they get returned as an ArrayCollection in event.result.people.person. But with only one person/person pair in my XML file, event.result.people.person is an ObjectProxy -- which can't be converted to an ArrayCollection, apparently. If event.result.people had a length property, I could just loop over it for {length} number of times and addItem() each person to my ArrayCollection -- but I see no length property on the event.result... So how do I get this to work? I won't know in advance how many person/person pairs are in the XML file, so I can't make any assumptions about the length... Could be 1, could be 100... Is there a way to programmatically tell whether or not event.result.people.person is an ArrayCollection or an ObjectProxy? If I could tell what it was, then I could use that information to let the program decide how to deal with it... Thanks for any suggestions... Laurence MacNeill Mableton, Georgia, USA
[flexcoders] Re: range of values checked in a case (switch)
Probably. But that's not what he asked for ;-} --- In flexcoders@yahoogroups.com, Richard Rodseth rrods...@... wrote: That's very creative! But I think an if statement would be clearer... On Wed, Mar 10, 2010 at 6:00 AM, valdhor valdhorli...@...wrote: Yes. You need to change the expression you are switching on... switch(true) { case age = 0 age = 4: ageGroup = 1; break; } The reason for this: Your case expression returns a true or false value. This does not match the expression in the switch so change the expression in the switch to reflect what will be returned in the case expression. HTH. Steve --- In flexcoders@yahoogroups.com, Wally Kolcz wkolcz@ wrote: Is there a way to check for a range of conditions inside a case of a switch case? I want to so something like this: switfch(age){ case (age = 0 age = 4): ageGroup = 1; break; ... }
[flexcoders] Re: ViewStack and CreationComplete...
Have you tried the show event? --- In flexcoders@yahoogroups.com, Laurence lmacne...@... wrote: I've been using a ViewStack to switch between views in my app... The first time you jump to a particular view, that view runs throws its CreationComplete event, whereupon I have it running an init() function. The subsequent times you jump to that view, there is no CreationComplete event, obviously... So what I need is an event that happens every time you jump to that view in the ViewStack... So I can intialize the view properly on the 2nd, 3rd, 4th, etc, time you jump to that view... Any ideas? Thanks, Laurence MacNeill Mableton, Georgia, USA
[flexcoders] Re: Httpservices as3 class
Have you tried using Remote Objects? With something like WebORB (http://www.themidnightcoders.com/) --- In flexcoders@yahoogroups.com, Jose adriano Alves alves.jadri...@... wrote: Hi Does anybody have a httpservice class, implemented in as3, for flahs builder 4? I am trying to create an application in as3, connecting and returnig dynamic data from php... So I need to have my hhtpservice created at runtime and calling my data functions dynamically... It's usefull when we configure call in a database... So, imagine you have table to configure your querries and grid definitions... and you can create it run-time... It´s a lot of productivity for developers... I tried to created one, but I have some problems when loading and setting data to my dataproviders... So, anyone have a class or some ideia on how to build a class to better handle or mantain dynamic data ? Thanks in advance. -- Att. José Adriano Alves Analista de Sistemas - Móveis Gazin. Cel..: +55 44 8802 3994 Fone: + 55 44 3663 8000 - 2319 Mail: alves.jadri...@... MSN: jose.adri...@... WEB-SITE: http://www.gazin.com.br/institucional Este e-mail, seu conteúdo e seus anexos estão sujeitos à privilégio de comunicação podendo este documento incluir informação confidencial e de propriedade restrita da GAZIN e apenas pode ser lido por aqueles a qual o mesmo tenha sido endereçado. Se você recebeu essa mensagem de e-mail indevidamente, por favor avise-nos imediatamente. Quaisquer dados, opiniões ou informações expressadas neste e-mail pertencem ao seu remetente e não necessariamente coincidem com aquelas da GAZIN, são de exclusiva responsabilidade do signatário. Este documento não pode ser reproduzido, copiado, distribuÃdo, publicado ou modificado por terceiros, sem a prévia autorização por escrito da GAZIN. Antes de imprimir pense em seu compromisso com o Meio Ambiente
[flexcoders] Re: Flex Module System ( Different programmers working on a single Project)
Create an interface that all modules as well as the main application implement. http://livedocs.adobe.com/flex/3/html/help.html?content=04_OO_Programming_10.html http://livedocs.adobe.com/flex/3/html/help.html?content=mxmlcomponents_advanced_5.html --- In flexcoders@yahoogroups.com, Fahim Akhter akhter.fa...@... wrote: and I do not want to copy things manually, sometimes you forget to copy and someone is sitting ducks with an old copy. *Fahim Akhter* |* Software Design Engineer | White Rabbit Inc* | +92.321.5307672 | akhter.fa...@... | http://apps.facebook.com/feline-frenzy/ Signature powered by WiseStamp http://www.wisestamp.com/email-install On Thu, Mar 4, 2010 at 3:06 PM, Fahim Akhter akhter.fa...@... wrote: What about communication between different modules? *Fahim Akhter* |* Software Design Engineer | White Rabbit Inc* | +92.321.5307672 | akhter.fa...@... | http://apps.facebook.com/feline-frenzy/ Signature powered by WiseStamp http://www.wisestamp.com/email-install On Thu, Mar 4, 2010 at 10:54 AM, Alex Harui aha...@... wrote: Just build different SWFs with the classes you need and use Loader to load them. On 3/3/10 3:25 AM, akhter.fahim akhter.fa...@... wrote: Hi, I was looking into flex's modular approach where you create one main project and then say 5 smaller modules(projects) on which different people work on different things. But when the main project is compiled all smaller modules are compiled with it. Similarly, one module can use the class of another module. I found the adobe documentation for such a approach in flex. But I need the same approach to work for AS3 , I'm using FlexBuilder. Any Ideas? Fahim. -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
[flexcoders] Re: Flex Module System ( Different programmers working on a single Project)
Interfaces are pure ActionScript Classes. --- In flexcoders@yahoogroups.com, Fahim Akhter akhter.fa...@... wrote: Isn't that mxml? I have a pure as3 project without MXML *Fahim Akhter* |* Software Design Engineer | White Rabbit Inc* | +92.321.5307672 | akhter.fa...@... | http://apps.facebook.com/feline-frenzy/ Signature powered by WiseStamp http://www.wisestamp.com/email-install On Thu, Mar 4, 2010 at 7:55 PM, valdhor valdhorli...@... wrote: Create an interface that all modules as well as the main application implement. http://livedocs.adobe.com/flex/3/html/help.html?content=04_OO_Programming_10.html http://livedocs.adobe.com/flex/3/html/help.html?content=mxmlcomponents_advanced_5.html --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Fahim Akhter akhter.fahim@ wrote: and I do not want to copy things manually, sometimes you forget to copy and someone is sitting ducks with an old copy. *Fahim Akhter* |* Software Design Engineer | White Rabbit Inc* | +92.321.5307672 | akhter.fahim@ | http://apps.facebook.com/feline-frenzy/ Signature powered by WiseStamp http://www.wisestamp.com/email-install On Thu, Mar 4, 2010 at 3:06 PM, Fahim Akhter akhter.fahim@ wrote: What about communication between different modules? *Fahim Akhter* |* Software Design Engineer | White Rabbit Inc* | +92.321.5307672 | akhter.fahim@ | http://apps.facebook.com/feline-frenzy/ Signature powered by WiseStamp http://www.wisestamp.com/email-install On Thu, Mar 4, 2010 at 10:54 AM, Alex Harui aharui@ wrote: Just build different SWFs with the classes you need and use Loader to load them. On 3/3/10 3:25 AM, akhter.fahim akhter.fahim@ wrote: Hi, I was looking into flex's modular approach where you create one main project and then say 5 smaller modules(projects) on which different people work on different things. But when the main project is compiled all smaller modules are compiled with it. Similarly, one module can use the class of another module. I found the adobe documentation for such a approach in flex. But I need the same approach to work for AS3 , I'm using FlexBuilder. Any Ideas? Fahim. -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
[flexcoders] Re: Dumb Question - Transition after a module has loaded
I don't think I would apply the effect to the module itself; I would add the effect to the main component that the module displays once loaded. --- In flexcoders@yahoogroups.com, Wally Kolcz wko...@... wrote: I have my kids site where when they click a 'button' I want to have the module open in an iris effect. The modules load and are added to a canvas as a place holder. Can anyone tell me or point out how to apply an effect to a module?
[flexcoders] Re: Context Menu
Angelo According to the documentation at http://livedocs.adobe.com/flex/3/html/help.html?content=Menus_4.html - The primary drawback to using the context menu API is that it does not support submenus. But, there are other ways to skin a cat. Check these links out... http://code.google.com/p/custom-context-menu/ http://flexology.wordpress.com/2008/12/12/custom-right-click-contextmenu-in-flex/ I tried the code from the second link and it worked great. --- In flexcoders@yahoogroups.com, Angelo Anolin angelo_ano...@... wrote: Hi FlexCoders, Has anyone implemented a right mouse click context menu which contains sub-menu items? I have been able to create a datagrid control with right mouse menu and the context menu I have defined appears, but I have no idea on how to implement one which contains sub-menu. Any help/inputs would be appreciated. Thanks. Regards, Angelo
[flexcoders] Re: new augmented reality + PV3D project, check it out.
Before I even got to look at it I get: TypeError: Error #1009: Cannot access a property or method of a null object reference. at com.transmote.flar.source::FLARCameraSource/initCamera() at com.transmote.flar.source::FLARCameraSource/init() at com.transmote.flar::FLARManager/initFlarSource() at com.transmote.flar::FLARManager/init() at com.transmote.flar::FLARManager/parseFlarConfigFile() at com.transmote.flar::FLARManager/onFlarConfigLoaded() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::URLLoader/onComplete() --- In flexcoders@yahoogroups.com, Willy Ci will...@... wrote: Hi guys, I've work on this concept for two weeks now. using augmented reality to build a floor plan, place fixtures, then conver it into 3D envirment. here is what I come up so far, http://flexcode.org/ar/ I would appreciate your opinions on it. So tell me what u think good/bad/like/hate. Thanks ahead. I use Sketch build 9 very simple fixtures (KMZ format), and FlarManager + paperversion 3D. Willy 617-606-3437 -- 6 X 9 = 42 http://www.wolframalpha.com/input/?i=meaning+of+life --
[flexcoders] Re: new augmented reality + PV3D project, check it out.
Flash Player WIN 10,0,45,2 Debug with Firefox 3.6. Does this only work on MacOS X? --- In flexcoders@yahoogroups.com, Willy Ci will...@... wrote: sorry about that, looks like the webcam is not able to init on your computer, can you tell me which version of Flash player you are using? and what browser? I tested it on OSX with FF 3.6, safari , with FP 10, and XP, FF, FP10.1 (netbook), never saw this kind error. thanks. Willy 617-606-3437 -- 6 X 9 = 42 http://www.wolframalpha.com/input/?i=meaning+of+life -- On Wed, Mar 3, 2010 at 12:05 PM, valdhor valdhorli...@...wrote: Before I even got to look at it I get: TypeError: Error #1009: Cannot access a property or method of a null object reference. at com.transmote.flar.source::FLARCameraSource/initCamera() at com.transmote.flar.source::FLARCameraSource/init() at com.transmote.flar::FLARManager/initFlarSource() at com.transmote.flar::FLARManager/init() at com.transmote.flar::FLARManager/parseFlarConfigFile() at com.transmote.flar::FLARManager/onFlarConfigLoaded() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::URLLoader/onComplete() --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Willy Ci willyci@ wrote: Hi guys, I've work on this concept for two weeks now. using augmented reality to build a floor plan, place fixtures, then conver it into 3D envirment. here is what I come up so far, http://flexcode.org/ar/ I would appreciate your opinions on it. So tell me what u think good/bad/like/hate. Thanks ahead. I use Sketch build 9 very simple fixtures (KMZ format), and FlarManager + paperversion 3D. Willy 617-606-3437 -- 6 X 9 = 42 http://www.wolframalpha.com/input/?i=meaning+of+life --
[flexcoders] Re: Using Flex Builder 3 With PHP and MYSQL
I use WebORB. Check out http://www.themidnightcoders.com/products/weborb-for-php/overview.html --- In flexcoders@yahoogroups.com, James garymoorcroft_...@... wrote: Can anybody link me to any examples of using flex in conjunction with php and mysql? I need to display data stored in my mysql table in my flex project within a tilelist. Does anyone know of any examples that allow you to display both images stored on a server and data held within mysql tables in flex in a tilelist via php? I'm struggling to find any good examples/tutorials on this. Cheers.
[flexcoders] Re: Flex with Google Checkout
From one extreme to the other... http://lce-com.com/ http://www.flashcomponents.net/component/simple_shopper_2.0.html --- In flexcoders@yahoogroups.com, Wally Kolcz wko...@... wrote: Anyone know of a true example/tutorial (or inexpensive component) that allows a flex app to work with Google Checkout to process payments?
[flexcoders] Re: Flex Logging in a Web Application
In my case, I have created a logging class in Flex that sends the log data to a back end PHP server. The PHP, in turn, writes all the data to a MySQL database. I'd post the code but I'm afraid I cannot as it is proprietory to my company. I will say that it is pretty trivial to do. --- In flexcoders@yahoogroups.com, as sass apar...@... wrote: Hi everyone,, i want to achieve to log a web flex application into a file. But i'm not able to success it. Anyone help me?