Re: [flexcoders] Re: Getting ByteArray.uncompress() to work in Flash - looking for an example tex
On Mon, Mar 2, 2009 at 5:13 PM, Bjorn Schultheiss bjorn.mailingli...@gmail.com wrote: ASCompress supports GZIP http://code.google.com/p/ascompress/ Thanks very much for the link, I've downloaded the code to experiment with. I have now managed to sort out that my server-side encoder is adding 5 bytes in front of the zipped data that chokes Flex, so that's a help as well. I can always pull those bytes off before transfer, if necessary. Thanks again.
Re: [flexcoders] Re: image snapshot in flex
Err...sorry that was a typo. I've had trouble sending jpeg images to the server UNLESS they are base64 encoded. I'd like to send the data from the bytearray directly to the server, but for some reason it seems that flash is only allowing the first four bytes that identify the binary as a jpeg file to be sent. On the server side, I just get 4 bytes. So I've resorted to first encoding the data in base64, then decoding on the server. I know this can easily be done with cold fusion, or web orb, but we're not using them. Rob On Feb 27, 2009, at 6:49 AM, Anggie Bratadinata wrote: I've never had any problems sending base64-encoded images to a server (PHP). Could it be a server issue that you had? -- Anggie Bratadinata | www.masputih.com | Indonesia On Fri, Feb 27, 2009 at 6:44 PM, Rob Kunkle mon...@goodlux.com wrote: i've had a lot of trouble trying to send jpeg to a server with base64 encoding. It seems that flash only allows the first four bytes of the byte array to be sent when it is a jpeg. Anyone else come across this issue? I'd like to not base64 encoded/decode if possible. --- In flexcoders@yahoogroups.com, netdeep deep...@... wrote: Can the data not be passed simply as a ByteArray instead of a base64 string? This is from the Adobe documentation for URLRequest: - data property An object containing data to be transmitted with the URL request. This property is used with the method property. In Adobe AIR, data is sent when any HTTP method other than GET is used. In Flash Player, data is set when the POST HTTP method is used. The URLRequest API offers binary POST support and support for URL-encoded variables, as well as support for strings. The data object can be a ByteArray, URLVariables, or String object. The way in which the data is used depends on the type of object used: If the object is a ByteArray object, the binary data of the ByteArray object is used as POST data. For GET, data of ByteArray type is not supported. --- My problem is that I am also deficient in my experience with servlets and don't know how to decode a byte array there, but this is how I send the byte array var imageSnap:ImageSnapshot = ImageSnapshot.captureImage(component); var imageByteArray:ByteArray = imageSnap.data as ByteArray; var request:URLRequest = new URLRequest(imgServURL); request.data = imageByteArray; request.method = URLRequestMethod.POST; navigateToURL(request); --- In flexcoders@yahoogroups.com, leds usop rptlead@ wrote: without remoting, and using string param only, encode the image as jpeg or png (depending on your requirement) . then convert it to base64 string which you can pass to the serlvet via post (or get, whatever) . Then decode at the backend accordingly as a jpeg file or png file which is you can make available to the user. This is not the fastest solution performance-wise but it does get the job done expecially for snapshots. --- On Thu, 6/26/08, netdeep deepnet@ wrote: From: netdeep deepnet@ Subject: [flexcoders] image snapshot in flex To: flexcoders@yahoogroups.com Date: Thursday, June 26, 2008, 12:47 AM I'd like to add a button so the user can snapshot a graph in my flex app. I can do this storing it on the server with Java, but I'd like for the user to have direct access to it. Since I don't think this can be done for instance saving to the desktop, I thought the next best solution would be to send the image to say a new browser window, possibly via a servlet? But I'm not sure how to do this or if this is the best solution. Any ideas or examples of how this should be done? Here is a little snippet of the method I use to encode the image into a byteArray: private function saveImage(e: ImageUpdateEvent ):void { var comp:UIComponent = e.comp; var imageSnap:ImageSnap shot = ImageSnapshot. captureImage( comp); var imageByteArray: ByteArray = imageSnap.data as ByteArray; imgSave.saveImage( imageByteArray, e.name+-img. png); }
[flexcoders] Modules Communication
Hi, suppose that i have a main application. The main application has plus panel, created at runtime, and every panel can load or unload a specific module.In ths scenario how can i achieve the communication between modules? Any suggestions? thanks in advance Lorenzo
[flexcoders] Streaming media files over RTSP
Hi, I have a requirement to stream video files over the RTSP (Real Time Streaming Protocol), and display in the VideoDisplay component in Flex. Is the RTSP supported in Flex? - Chandru
[flexcoders] Passing parameter to swf
Hi, I have a requirement where I have to send a String value as a parameter to a swf (created from Flash). If this is possible, can anybody let me know how this can be done? Example Usage: I want an animated button like thing in Flex. I would be given an swf file created in Flash, which looks like an animated button, but with no Label on it. I will load this animated swf into my Flex application using SWFLoader component. Say, I want to pass in a String value - Login to this swf, so that, I can use it as an animated button with the label - Login. -Chandru
Re: [flexcoders] static function and getDefinitionByName
Hi Alex. I actually tried that, it doesn't work... On Mon, Mar 2, 2009 at 8:13 AM, Alex Harui aha...@adobe.com wrote: ClassRef[“staticFunctionName”]() Alex Harui Flex SDK Developer Adobe Systems Inc. http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *Sefi Ninio *Sent:* Sunday, March 01, 2009 2:07 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] static function and getDefinitionByName Hi. I am using getDefinitionByName from flash.utils to get a class definition / instance from a string: var ClassRef:Class = getDefinitionByName(className) as Class; That works great, I can create an instance if I want. Problem is, I need to call a static function on that ClassRef class, and I'll know the function name only at runtime from XML. Any idea on how to do this?
[flexcoders] Re: Menubar sub menu pop up orientation
Hmm... No-one can think of a way? I have tried everything I can think of, but nothing makes the menu bar open upwards instead of downwards... I am desperate! Any help would be greatly appreciated. Thanks, Sefi On Sun, Mar 1, 2009 at 9:38 AM, Sefi Ninio sefi.ni...@gmail.com wrote: Bump... Anyone? On Thu, Feb 26, 2009 at 11:41 AM, Sefi Ninio sefi.ni...@gmail.com wrote: OK, some updates: What caused me to ask this, was that when I tried it, the sub menu appears to flow off the bottom of the screen. I tried it again, and it seems it only does this for the first time the sub menu appears. The second time, it kinda found out that it was flowing off the screen, and on consecutive clicks after the first the sub menu appears as it should (upwards instead of downwards). I hope I am making sense... :) So, an altered question: Any thoughts on how to control the direction the MenuBar sub menu appears (up or down)? Thanks, Sefi On Thu, Feb 26, 2009 at 10:37 AM, Sefi Ninio sefi.ni...@gmail.comwrote: Hi. I have a working MenuBar, with sub menus - all working exactly as I need it to. I was wondering, however, if there was a way to force the sub menu to open upwards instead of downwards in relation to the menu bar. I plan to place the MenuBar on the bottom of the component, and would like to make sure that if the component is placed near the bottom of the screen, that the sub menu pop up won't disappear from lack of screen space. Thanks, Sefi
[flexcoders] Re: redundancy in custom ItemRenderer
~flashrookie -- er... flexrookie (flash masta!) ; )
Re: [flexcoders] flex component kit
All links are broken except Flex component kit on: http://www.adobe.com/cfusion/entitlement/index.cfm?e=flex_skins e.g. http://www.adobe.com/go/flexskin_flash On 17 Jul 2008, at 19:06, Matt Chotin wrote: http://www.adobe.com/go/flex3_skinning Matt On 7/17/08 11:01 AM, [p e r c e p t i c o n] percepti...@gmail.com wrote: i saw that...but i have FB3 which comes with the sdk.. what am i missing? On Thu, Jul 17, 2008 at 10:57 AM, dnk d.k.emailli...@gmail.com wrote: On 17-Jul-08, at 10:52 AM, [p e r c e p t i c o n] wrote: Hi experts... can anyone tell me where i can download the flex component kit for flash cs3... adome exchange seems to be down...and i don't need the whole sdk...i have FB3 thanks percy According to labs, it seems to only be available from the Flex 3 SDK. I could be wrong though. d quote Flex Component Kit for Flash CS3From Adobe Labs Flex Component Kit for Flash CS3 for Flex 2.0.1 shipped on Septemper 18, 2007 and is available from the Adobe Exchange. The version that supports Flex 3 is included within theFlex 3 SDK.
RE: [flexcoders] Passing parameter to swf
You should check out this video tutorial http://www.webkitchen.be/2008/12/12/video-tutorial-make-flex-components- with-flash-cs4/ . Note I've tried doing this sort of stuff in CS3 and the exact same code can sometimes work and other times fail in CS3, and I do mean the exact same code. But since creating components in CS4 I've had no issues. Something that didn't work in CS3, I imported to CS4 and it works fine, so use CS4 otherwise you could easily be banging your head for no reason. Kenneth. From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of chandruflex Sent: 02 March 2009 11:13 To: flexcoders@yahoogroups.com Subject: [flexcoders] Passing parameter to swf Hi, I have a requirement where I have to send a String value as a parameter to a swf (created from Flash). If this is possible, can anybody let me know how this can be done? Example Usage: I want an animated button like thing in Flex. I would be given an swf file created in Flash, which looks like an animated button, but with no Label on it. I will load this animated swf into my Flex application using SWFLoader component. Say, I want to pass in a String value - Login to this swf, so that, I can use it as an animated button with the label - Login. -Chandru Disclaimer --- This electronic message contains information which may be privileged and confidential. The information is intended to be for the use of the individual(s) or entity named above. If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of the contents of this information is prohibited. If you have received this electronic message in error, please notify us by telephone on 0131 476 6000 and delete the material from your computer. Registered in Scotland number: SC 172507. Registered office address: Quay House 142 Commercial Street Edinburgh EH6 6LB. This email message has been scanned for viruses by Mimecast. ---
Re: [flexcoders] Passing parameter to swf
Hi Chandru, This is actually pretty easy...one the swfLoader.source, simply add the traditional ? and tabs to the source with the values you want to pass...then in your called swf, you access the passed values via the document.parameters.valueName i.e. Main App: var swf:SWFLoader = new SWFLoader(); swf.source = swfFile.swf?label=Login; swfFile.swf: button.label = document.parameters.label; HTH, Adrian chandruflex wrote: Hi, I have a requirement where I have to send a String value as a parameter to a swf (created from Flash). If this is possible, can anybody let me know how this can be done? Example Usage: I want an animated button like thing in Flex. I would be given an swf file created in Flash, which looks like an animated button, but with no Label on it. I will load this animated swf into my Flex application using SWFLoader component. Say, I want to pass in a String value - Login to this swf, so that, I can use it as an animated button with the label - Login. -Chandru
[flexcoders] How to retrive info send as HashMap in ActionScript using blazeds RemoteObject
Hi helper, I Have a class in java and one of its properties is: private MapString,UpperlColumnHeader upperColumnHeaders; public HashMapString,UpperlColumnHeader getUpperColumnHeaders() { return upperColumnHeaders; } public void setUpperColumnHeaders(HashMapString,UpperlColumnHeader upperColumnHeaders) { this.upperColumnHeaders = upperColumnHeaders; } UpperlColumnHeader is a bean translated to ActionScript class as well. I am sending the data by RemoteObject to Flex. my identical ActionScript class: [RemoteClass(alias=PresentationModel.PresentationModel)] public class PresentationModel { // How do I link this Object to UpperlColumnHeader class? (.. column.UpperlColumnHeader ) public var upperColumnHeaders:Object; } I know Map is translated to Object in Flex. How do I retrieve all elements from this Object? Is my AS is correct? remember the key of the map is String and the value is UpperlColumnHeader AS class i created. Thanks Jo
[flexcoders] Re: How to retrive info send as HashMap in ActionScript using blazeds RemoteObject
Ok, I solved the issue, just by itterating through the Object key's and values's, Thanks --- In flexcoders@yahoogroups.com, yossi.baram yossi.ba...@... wrote: Hi helper, I Have a class in java and one of its properties is: private MapString,UpperlColumnHeader upperColumnHeaders; public HashMapString,UpperlColumnHeader getUpperColumnHeaders() { return upperColumnHeaders; } public void setUpperColumnHeaders (HashMapString,UpperlColumnHeader upperColumnHeaders) { this.upperColumnHeaders = upperColumnHeaders; } UpperlColumnHeader is a bean translated to ActionScript class as well. I am sending the data by RemoteObject to Flex. my identical ActionScript class: [RemoteClass(alias=PresentationModel.PresentationModel)] public class PresentationModel { // How do I link this Object to UpperlColumnHeader class? (.. column.UpperlColumnHeader ) public var upperColumnHeaders:Object; } I know Map is translated to Object in Flex. How do I retrieve all elements from this Object? Is my AS is correct? remember the key of the map is String and the value is UpperlColumnHeader AS class i created. Thanks Jo
[flexcoders] Re: Image scaleContent=false causes Security Sandbox Violation in AIR 1.5.x
Thanks, Alex :)
[flexcoders] Rotate a custom Marker icon with Google Maps Flex API
Greetings ladies and gentlemen of Flex, My name is Jean. I'm something of a Flex newby, though I've done a few small Flex Apps successfully which are in deployment. Right now I'm trying to do a project involving the Google Maps API. Currently I have the API working in Flex, I'm testing out the use of overlays and markers and specifically, trying to rotate some arrow-shaped custom markers I put on the map. From seeing this example http://blog.sunild.com/2009/02/custom-google-map-markers-made-easy.html ...of a Flex app with custom markers that rotate, I understand this is possible but I don't know how to do it. I have played around with the Animateproperty effect but I couldn't see any way to do it that way, so I tried using the rotate effect based on an example I found here: http://blog.flexexamples.com/2008/02/27/setting-effects-with-actionscript-in-flex/ So far without luck. I can create code which compiles, and I attempted to rotate the icon object, but it doesn't do anything. My code is posted here: http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?catid=585threadid=1428709 I gather it could also be possible using the Degrafa controls but that is yet another entire layer of complexity. Can anyone help? Is anyone here familiar with using the Google Maps API with Flex? D.
[flexcoders] Re: Binding property of object in dataProvider
Hi Garth, Thanks very much for the lead. I am currently following the anonymous object advice but would like to investigate more ObjectProxy approach later once I have more time. Just another quick question. It seems both approaches entail serializing objects in Flash Player at client side. Which one would be better performance wise if I will be dealing with a large collection of data (say 600-1000 per page)? Best regards, geng --- In flexcoders@yahoogroups.com, Garth Somerville therealga...@... wrote: If the point of your question is that you are starting with anonymous objects, then wrapping each item with a mx.utils.ObjectProxy will do what you want by making each property of the proxied object bindable. The other alternative is not to use an anonymous object, but to create a concrete class for the tasks: class Task { [Bindable] public var label:String; } Ultimately this way is better for several reasons. (Note that as shown the mxml compiler will have to rewrite the class to implement IEventDispatcher)
[flexcoders] Hand Cursor on Flex Menu
Hello everyone, I am trying to add hand cursor on Flex menu can anyone guide me how to do this. Here is my code snippet. reportMenu = Menu.createMenu(null, xmlReportMenu, false); //reportMenu = Menu.createMenu(null, CMMModelLocator.getInstance().reportsMenuXmlData, false); reportMenu.addEventListener(MenuEvent.MENU_SHOW,ReportMenuShowHandle); reportMenu.addEventListener(MenuEvent.MENU_HIDE,ReportMenuHideHandle); reportMenu.labelField=@label; reportMenu.iconField =@icon; reportMenu.addEventListener(MenuEvent.ITEM_CLICK,reportMenuHandler); reportMenu.addEventListener(MenuEvent.ITEM_ROLL_OVER,reportMenuHandlerRollOv er); reportMenu.setStyle( fontFamily , 'Verdana' ); I have tried this but failed reportMenu.usehandCursor = true; reportMenu.buttonMode= true; reportMenu.mouseChildren = false; regards Parksah
[flexcoders] HandCursor (pointing version)
I am having bugs with handCursor, where can i find that little pointer png. So I can make my own cursor I would just clip one out of a screenshot, but screenshots hide the mouse :(
[flexcoders] Re: redundancy in custom ItemRenderer
ok, new code, this time with IDs on dataProvider items for tracking. yes, i know there's no direct renderer-to-provider relationship. i now realize that the extra renderer instance is created for measurment (according to alex harui). but i'm still looking for an explanation on the multiple set data and commitProperties() calls. i am curious, partly from a performance perspective, and partly because i want to understand how this works so i can slowly become better at architecting flex apps. code follows. StockApp.mxml ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute applicationComplete=applicationCompleteListener(event) mx:Script ![CDATA[ import mx.collections.ArrayCollection; import mx.controls.HorizontalList; import mx.events.FlexEvent; import mx.core.ClassFactory; protected var list:HorizontalList; protected var provider:ArrayCollection; protected function applicationCompleteListener (e:FlexEvent):void { // Provider provider = new ArrayCollection(); provider.addItem({stockInfo:new StockInfo(), id:1}); // UI list = new HorizontalList(); list.width = 400; list.height = 100; list.dataProvider = provider; list.itemRenderer = new ClassFactory(StockInfoRenderer); addChild(list); } ]] /mx:Script /mx:Application StockInfoRenderer.as package { import mx.containers.Canvas; import mx.controls.Button; public class StockInfoRenderer extends Canvas { protected var button:Button; public function StockInfoRenderer () { trace(); trace(StockInfoRenderer CONSTRUCTOR CALLED.); } override protected function createChildren ():void { trace(StockInfoRenderer CREATE CHILDREN CALLED.); super.createChildren(); if (button == null) { button = new Button(); button.width = 100; } addChild(button); } override protected function commitProperties ():void { trace(StockInfoRenderer COMMIT PROPERTIES CALLED for ID: + data.id); super.commitProperties(); button.label = data.stockInfo.getPrice(); } override public function set data (value:Object):void { super.data = value; trace(StockInfoRenderer SET DATA CALLED for ID: + data.id); invalidateProperties() } } } StockInfo.as package { import flash.events.Event; import flash.events.EventDispatcher; import flash.events.TimerEvent; import flash.utils.Timer; public class StockInfo extends EventDispatcher { private var t:Timer; public function StockInfo () { t = new Timer(1000); t.addEventListener(TimerEvent.TIMER, timerListener); t.start(); } public function timerListener (e:TimerEvent):void { dispatchEvent(new Event(UPDATE)); } public function getPrice ():Number { return Math.floor(Math.random()*1000)/100; } } } output StockInfoRenderer CONSTRUCTOR CALLED. StockInfoRenderer CREATE CHILDREN CALLED. StockInfoRenderer SET DATA CALLED for ID: 1 StockInfoRenderer COMMIT PROPERTIES CALLED for ID: 1 StockInfoRenderer SET DATA CALLED for ID: 1 StockInfoRenderer COMMIT PROPERTIES CALLED for ID: 1 StockInfoRenderer CONSTRUCTOR CALLED. StockInfoRenderer SET DATA CALLED for ID: 1 StockInfoRenderer CREATE CHILDREN CALLED. StockInfoRenderer COMMIT PROPERTIES CALLED for ID: 1 ~flexrookie --- In flexcoders@yahoogroups.com, Tracy Spratt tspr...@... wrote: Why do you think the renderer's commitProperties is being called more than once for a single item? Your trace statements do not identify the item. You understand that there is no direct relationship between the number of items and the number of renderer instances? The number of instances depends on the number of visible rows, plus a few for buffering. And are you just curious? The specific renderer instantiation behavior is normally not of concern to a developer, but such concern sometimes indicates misuse. Tracy _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of flexrookie Sent: Saturday, February 28, 2009 9:35 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] redundancy in custom ItemRenderer another question about ItemRenderers, using my previous stock example. i have noticed that my custom item renderer seems to be performing redundant executions. for a single dataProvider item, i see two renderer instances created. and for each instance, set data and commitProperties() are called repeatedly. here's my code: StockApp.mxml
[flexcoders] Re: updating an item renderer
hi amy, the manager class approach is interesting, and sounds safe from a memory-management perspective. thanks! you also wrote: You could potentially set up your itemRenderers to register/unregister for these events in the set data() override for your renderer. -- can i ask, how would you guarantee that all itemrenderers safely unregister for the UPDATE event? ~flexrookie --- In flexcoders@yahoogroups.com, Amy amyblankens...@... wrote: --- In flexcoders@yahoogroups.com, Tracy Spratt tspratt@ wrote: The core concepts are that item renderers need to update their visual UI elements when the associated item changes, and need to update that item on user interaction. You assign a dataProvider(StockInfo) to the List, which results in item renderers being instantiated. Note, do not use an Array as a dataProvider, use ArrayCollection. When the underlying item changes, the framework calls the renderer's set data method(setter). When any pending changes are done, the framework calls commitProperties. Well, sort of. If a property of an object that's stored in an ArrayCollection changes, the ArrayCollection has no idea, and hence the List will not call setData(). You could potentially set up your itemRenderers to register/unregister for these events in the set data() override for your renderer. But that means your renderer can only ever be used to render this type of object. That's not necessarily a bad thing, but I try to keep my renderers barefoot and pregnant if you know what I mean. So my approach would be to have a manager that contains an ArrayCollection of StockInfo objects as one of its public properties. Bind the dataProvider on your HorizontalList to that public property. I'd probably limit that to read-only by just using a getter on it. Make sure your manager component takes care of all of the adding and deleting of StockInfos into the AC, so it can register for your change events on all items that are currently stored there and unregister for them once they're gone. Then when the manager gets the event, calls itemUpdated on whichever SockInfo changed, and the HorizontalList will update normally with no more special effort on your part. HTH; Amy
[flexcoders] Re: redundancy in custom ItemRenderer
thanks amy, i found that info confirmed by alex harui's famous itemrenderer post, under recycling, here: http://blogs.adobe.com/aharui/2007/03/thinking_about_item_renderers_1.html ~flexrookie --- In flexcoders@yahoogroups.com, Amy amyblankens...@... wrote: --- In flexcoders@yahoogroups.com, flexrookie flexrookie@ wrote: another question about ItemRenderers, using my previous stock example. i have noticed that my custom item renderer seems to be performing redundant executions. for a single dataProvider item, i see two renderer instances created. and for each instance, set data and commitProperties() are called repeatedly. http://flexdiary.blogspot.com/2008/04/is-horizontallist-faster-than- hbox-with.html
Re: [flexcoders] Re: Help the Flex Team by taking our survey!
Which questions do you see that? On 2/28/09 9:43 PM, Guy Morton g...@alchemy.com.au wrote: it doesn't accept something in the other section to be an answer in some cases, which is a bit counter-intuitive. On 01/03/2009, at 10:01 AM, djhatrick wrote: Matt, i had a problem with the survey, it wouldn't let me finish it, it said my answer was needed on a question i answered already. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Matt Chotin mcho...@... wrote: That's what the Other section is for, help us figure out what we're missing :-) So far according to the results I've looked at we're not missing a huge swath though... On 2/28/09 2:00 PM, Guy Morton g...@... wrote: Your survey is a bit frustrating. surely I can't be the only one to have used SVG before using Flex? Also, you list Ruby as a back end tech but not perl - I bet there's more perl serving data to Flex than there is Ruby... ! nbsp; On 28/02/2009, at 6:01 AM, flex_coders wrote: Help the Flex team better understand who you are and what you're working on. This information is incredibly valuable to us. Please take 20 m! inutes and fill out our survey: http://www.surveymonkey.com/s.aspx?sm=vCfoIoZ0_2bLG6CTgVcntsVA_3d_3d Thanks for your time and help!
Re: [flexcoders] Re: Help the Flex Team by taking our survey!
It all worked great for me. Alan
[flexcoders] jQuery for Flex - a Behavior Injection Framework
jQuery for Flex - a Behavior Injection Frameworkhttp://code.seanhess.net/?p=156 [...] I’ve just finished my pre-alpha version of a Behavior Injection framework for Flex. It adds support for functionality similar to jQuery for flex, along with support for a more complete CSS syntax. The approach is slightly different than jQuery, and hopes to play along with Flex’s strengths as well. [...]
[flexcoders] Compressed swf
swf files appear to be compressed - headers start with PK. I was comparing the swf filesizes of different flex frameworks Cairngorm, Mate, PureMVC, etc and found significant differences. Cairngorm, for example, was down to 11 KB. How does one compress your swf down to this size.
[flexcoders] Re: redundancy in custom ItemRenderer
not an answer to my question, but a follow up for new itemrenderer coders. i just changed my implementation of the renderer from a canvas to a UIComponent, following alex harui's performance recommendation. here's the updated renderer code (big thanks to peter ent's renderer post at http://weblogs.macromedia.com/pent/archives/2008/04/itemrenderers_p_4.html): === package { import mx.core.UIComponent; import mx.controls.Button; import mx.controls.listClasses.IListItemRenderer; import mx.events.FlexEvent; import flash.display.Shape; public class StockInfoRenderer extends UIComponent implements IListItemRenderer { private var _data:Object; // Make the data property bindable. [Bindable(dataChange)] protected var button:Button; public function StockInfoRenderer () { trace(); trace(StockInfoRenderer CONSTRUCTOR CALLED.); } override protected function createChildren ():void { trace(StockInfoRenderer CREATE CHILDREN CALLED.); super.createChildren(); if (button == null) { button = new Button(); button.width = 100; addChild(button); var tmp:Shape = new Shape(); tmp.graphics.beginFill(0); tmp.graphics.drawRect(0,0,10,10); tmp.graphics.endFill(); addChild(tmp); mask = tmp; } } override protected function commitProperties ():void { trace(StockInfoRenderer COMMIT PROPERTIES CALLED for ID: + data.id); super.commitProperties(); if (data.id != null) { button.label = data.stockInfo.getPrice(); } else { if (button contains(button)) { removeChild(button); } } } // Define the getter method. public function get data():Object { return _data; } // Define the setter method, and dispatch an event when the property // changes to support data binding. public function set data(value:Object):void { _data = value; dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE)); trace(StockInfoRenderer SET DATA CALLED for ID: + data.id); invalidateProperties() } override protected function updateDisplayList (unscaledWidth:Number, unscaledHeight:Number):void { super.updateDisplayList(unscaledWidth, unscaledHeight); if (button) { button.setActualSize(100, 50); } if (mask) { mask.width = unscaledWidth; mask.height = unscaledHeight; } setActualSize(unscaledWidth, unscaledHeight); } } } === ~flexrookie --- In flexcoders@yahoogroups.com, flexrookie flexroo...@... wrote: ok, new code, this time with IDs on dataProvider items for tracking. yes, i know there's no direct renderer-to-provider relationship. i now realize that the extra renderer instance is created for measurment (according to alex harui). but i'm still looking for an explanation on the multiple set data and commitProperties() calls.
[flexcoders] LCDS: Potential LCDS bug - Commit on one DataService(assembler), commits dirty data of another unrelated DataService
hi All, I am facing a weird issue in LCDS 2.6. There are two unrelated entities A and B, i.e. they dont' have any relationship defined in data-management-config.xml My application is MDI based and consists of multiple mini-apps. Steps: 1. User opens miniapp for entity A, makes it dirty, don't save it. 2. Then opens minapp for entity B, does an operation which causes B's assembler to refill. immediately B's assembler complains that B's data is dirty. This shouldn't happen as A and B don't have any defined relationship . 3. Save dirty entity A 4. miniapp for entity B stops complaining for dirty data. 5. now dirty data in B. 6. dirty an entity in A, save it. B also gets committed to db. somehow these are getting linked together. Printed uid of DataService.dataStore for both, it is different. Any help in this would be appreciated. regards, Rajeev
Re: [flexcoders] Re: Help the Flex Team by taking our survey!
in the multiple choice questions. it's not that it's wrong per se, just not very intuitive. On 03/03/2009, at 4:52 AM, Matt Chotin wrote: Which questions do you see that? On 2/28/09 9:43 PM, Guy Morton g...@alchemy.com.au wrote: it doesn't accept something in the other section to be an answer in some cases, which is a bit counter-intuitive. On 01/03/2009, at 10:01 AM, djhatrick wrote: Matt, i had a problem with the survey, it wouldn't let me finish it, it said my answer was needed on a question i answered already. --- In flexcoders@yahoogroups.com mailto:flexcoders %40yahoogroups.com , Matt Chotin mcho...@... wrote: That's what the Other section is for, help us figure out what we're missing :-) So far according to the results I've looked at we're not missing a huge swath though... On 2/28/09 2:00 PM, Guy Morton g...@... wrote: Your survey is a bit frustrating. surely I can't be the only one to have used SVG before using Flex? Also, you list Ruby as a back end tech but not perl - I bet there's more perl serving data to Flex than there is Ruby... ! nbsp; On 28/02/2009, at 6:01 AM, flex_coders wrote: Help the Flex team better understand who you are and what you're working on. This information is incredibly valuable to us. Please take 20 m! inutes and fill out our survey: http://www.surveymonkey.com/s.aspx?sm=vCfoIoZ0_2bLG6CTgVcntsVA_3d_3d Thanks for your time and help!
[flexcoders] tree control finding patent node
Hi, in a tree control if a leaf node if clicked how do I find out which folder it belongs to or which node is its parent? Regards...
RE: [flexcoders] tree control finding patent node
This actually from a change event, but an itemClicked one is very similar ... (It presumes that you use xml as the dataprovider for the tree, and listen for the event by adding 'change=onTreeChange(event)' in your trees attributes ) private function onTreeChange(event:ListEvent):void { var targetTree:Tree = event.target as Tree; var item:XML = XML(targetTree.selectedItem); var theParent:XML = item.parent(); } It does seem a bit unintuitive to get an XML object, but normally that works fine for what you're likely to want to do, I've found. Hope that's enough to be helpful! -Original Message- From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of hworke Sent: 02 March 2009 21:18 To: flexcoders@yahoogroups.com Subject: [flexcoders] tree control finding patent node Hi, in a tree control if a leaf node if clicked how do I find out which folder it belongs to or which node is its parent? Regards... __ This communication is from Primal Pictures Ltd., a company registered in England and Wales with registration No. 02622298 and registered office: 4th Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT registration No. 648874577. This e-mail is confidential and may be privileged. It may be read, copied and used only by the intended recipient. If you have received it in error, please contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 1010. Please then delete the e-mail and do not disclose its contents to any person. This email has been scanned for Primal Pictures by the MessageLabs Email Security System. __
Re: [flexcoders] tree control finding patent node
thanks a lot!! On Mon, Mar 2, 2009 at 1:34 PM, Jim Hayes j...@primalpictures.com wrote: This actually from a change event, but an itemClicked one is very similar ... (It presumes that you use xml as the dataprovider for the tree, and listen for the event by adding 'change=onTreeChange(event)' in your trees attributes ) private function onTreeChange(event:ListEvent):void { var targetTree:Tree = event.target as Tree; var item:XML = XML(targetTree.selectedItem); var theParent:XML = item.parent(); } It does seem a bit unintuitive to get an XML object, but normally that works fine for what you're likely to want to do, I've found. Hope that's enough to be helpful! -Original Message- From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of hworke Sent: 02 March 2009 21:18 To: flexcoders@yahoogroups.com Subject: [flexcoders] tree control finding patent node Hi, in a tree control if a leaf node if clicked how do I find out which folder it belongs to or which node is its parent? Regards... __ This communication is from Primal Pictures Ltd., a company registered in England and Wales with registration No. 02622298 and registered office: 4th Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT registration No. 648874577. This e-mail is confidential and may be privileged. It may be read, copied and used only by the intended recipient. If you have received it in error, please contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 1010. Please then delete the e-mail and do not disclose its contents to any person. This email has been scanned for Primal Pictures by the MessageLabs Email Security System. __
Re: [flexcoders] jQuery for Flex - a Behavior Injection Framework
I think you forgot the link (or my phone's playing tricks with me). http://code.seanhess.net/?p=156 Nice work btw. I'm going to have to think about how it fits in with Flex and my current workflow, but I'll give it a shot in my new project :) On 3/3/09, Sean Clark Hess seanh...@gmail.com wrote: jQuery for Flex - a Behavior Injection Frameworkhttp://code.seanhess.net/?p=156 [...] I’ve just finished my pre-alpha version of a Behavior Injection framework for Flex. It adds support for functionality similar to jQuery for flex, along with support for a more complete CSS syntax. The approach is slightly different than jQuery, and hopes to play along with Flex’s strengths as well. [...] -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:flexcoders-dig...@yahoogroups.com mailto:flexcoders-fullfeatu...@yahoogroups.com * To unsubscribe from this group, send an email to: flexcoders-unsubscr...@yahoogroups.com * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Re: redundancy in custom ItemRenderer
--- In flexcoders@yahoogroups.com, flexrookie flexroo...@... wrote: not an answer to my question, but a follow up for new itemrenderer coders. i just changed my implementation of the renderer from a canvas to a UIComponent, following alex harui's performance recommendation. Some suggestions: 1) Use a flag in set data so that you don't go through your logic in commitProperties that's only relevant when data changes when commitProperties is called for other reasons. 2) I don't think you can make a variable bindable by putting [Bindable] AFTER the variable (unless you were intending to make your button variable bindable on dataChange). 3) There's a lot of overhead in adding and removing children. Consider hiding and showing instead.
Re: [flexcoders] jQuery for Flex - a Behavior Injection Framework
I like the possibility of using it with Mate/Cairngorm. So then it would be the decaf versions of mate/cairngorm? :-) Seriously though this is quite cool. Sam Lai wrote: I think you forgot the link (or my phone's playing tricks with me). http://code.seanhess.net/?p=156 Nice work btw. I'm going to have to think about how it fits in with Flex and my current workflow, but I'll give it a shot in my new project :) On 3/3/09, Sean Clark Hess seanh...@gmail.com wrote: jQuery for Flex - a Behavior Injection Frameworkhttp://code.seanhess.net/?p=156 [...] I’ve just finished my pre-alpha version of a Behavior Injection framework for Flex. It adds support for functionality similar to jQuery for flex, along with support for a more complete CSS syntax. The approach is slightly different than jQuery, and hopes to play along with Flex’s strengths as well. [...] -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
Re: [flexcoders] Re: Can't seem to get Myriad Pro to encode in Flex
Hi Adrian, Did this ever get worked out? And by any chance did you publish your swf font to Flash 8? I seem to remember the docs saying Flex uses Flash 8 for swf fonts. I'll have to look that up to be sure if that's a requirement though. Oh and Flex can only transcode TTF files so yeah, OTF files are out. Michael Adrian Gillette wrote: By the way, I used Flash CS4 to create my font swf. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com, Adrian Gillette gille...@... wrote: I'm trying to embed couple versions of Myriad Pro into my Flex project: Myriad Pro Semibold Condensed Myriad Pro Semibold Condensed Italic Myriad Pro Condensed I've tried two different methods to embed the fonts using CSS: 1. Using an OTF file. 2. Using a fla file with embedded fonts using dynamic text boxes. I can embed fonts that has any combination of these styles: bold, italic, or normal. But it does not seem to allow me to transcode fonts that have anything outside of those styles, such as semibold, condensed, etc. Has anyone successfully dealt with this problem or knows how to? Thanks, Adrian
[flexcoders] Help with a smarter custom LabelRenderer
Hello- I've been able to successfully implement Ely's Custom LabelRenderer for my own purposes (Custom LabelRenderer http://www.quietlyscheming.com/blog/charts/chart-sampler/ ) however I was hoping to make it smarter. In my app, I have a Line Chart with my primary piece of data being modified LineSeries (basically a vertical line series to plot a spectrum so its a line starting at x,y values and drawn down to the x-axis) and 3-4 plotseries. My labelRenderer has been customized to label points from the the plot series I add. The label is a string about 2-3 chars long, however the nature of my lineseries chart is such that some line ends up intersecting my labels, and some labels actually overlap making for a relatively cluttered look. What I was hoping to do within the labelrenderer is to find out if I have any points near the point I am labeling, and adjust my labels when needed. I played a bit with the findDataPoints function within the chart object, but I'm not 100% sure what I'm doing and it seems as though if I ever return and hits they are all from the same series and never include other series hits. Am I on the right track? I am guessing i need to customize the findAllDatapoints function but I'm not sure where to start... Any input is appreciated... a demo of the app is here: https://caribou.med.harvard.edu/core/www/giggle/giggle.html here is the labelRenderer: package { import flash.display.Graphics; import flash.geom.Point; import flash.geom.Rectangle; import mx.charts.ChartItem; import mx.charts.LineChart; import mx.charts.series.PlotSeries; import mx.charts.series.items.PlotSeriesItem; import mx.controls.Label; import mx.core.IDataRenderer; import mx.core.UIComponent; public class LabelRenderer extends UIComponent implements IDataRenderer { private var _label:Label; public function LabelRenderer() { super(); _label = new Label(); addChild(_label); } private var _chartItem:ChartItem; private var _chart:LineChart; [Inspectable(environment=none)] public function get data():Object { return _chartItem; } public function set data(value:Object):void { if (_chartItem == value) return; _chartItem = ChartItem(value); var out:String; if (_chartItem != null) { if (this.data.item.bmatch == PlotSeriesItem(_chartItem).xNumber) { out = b+value.item.Nnum; _label.text = out; _label.setStyle(color, 0x0066FF); fill = fills[0]; } else if (this.data.item.ymatch == PlotSeriesItem(_chartItem).xNumber) { out = y+value.item.Cnum; _label.text = out; _label.setStyle(color, 0xFF0033); fill = fills[1]; } } } private static const fills:Array = [0x0066FF,0xFF0033]; private var fill:Number; override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void { super.updateDisplayList(width, height); //var fill:Number = fills[5]; //var rc:Rectangle = new Rectangle(0,0, width, height); var series:PlotSeries = PlotSeries(this.parent); _chart = LineChart(series.owner); var pt:Point = _chart.contentToLocal(new Point(PlotSeriesItem(_chartItem).x,PlotSeriesItem(_chartItem).y)); //var array:Array = _chart.findDataPoints(PlotSeriesItem(_chartItem).x,PlotSeriesItem(_chart\ Item).y); var array:Array = _chart.findDataPoints(pt.x,pt.y); trace(checking for points around +PlotSeriesItem(_chartItem).x+,+PlotSeriesItem(_chartItem).y+ peak is:+PlotSeriesItem(_chartItem).xNumber); trace(checking for points around +pt+ peak is:+PlotSeriesItem(_chartItem).xNumber); //checking to see if anything on our chart is within the width of the label, if so we can move it if (array.length 1) { trace(found some stuff overlapping with my chartItem: +PlotSeriesItem(_chartItem).xNumber); //trace(array); } var rc:Rectangle = new Rectangle(2.5,3.5, 5,5); var g:Graphics = graphics; g.clear(); g.moveTo(rc.left, rc.top); g.beginFill(fill) g.lineTo(rc.right, rc.top); g.lineTo(rc.right, rc.bottom); g.lineTo(rc.left, rc.bottom); g.lineTo(rc.left, rc.top); g.endFill(); //g.clear();
[flexcoders] Re: updating an item renderer
--- In flexcoders@yahoogroups.com, flexrookie flexroo...@... wrote: hi amy, the manager class approach is interesting, and sounds safe from a memory-management perspective. thanks! you also wrote: You could potentially set up your itemRenderers to register/unregister for these events in the set data() override for your renderer. -- can i ask, how would you guarantee that all itemrenderers safely unregister for the UPDATE event? I'd unregister for the last one (when the renderer is recycled and the renderer is now associated with a new object) in the set data() override. For completely unregistering it, maybe removedFromStage or something like that...?
RE: [flexcoders] Compressed swf
The first bytes of a SWF will never be PK. A SWC will, but not a SWF. SWFs produced by Flex are compressed, but cannot be de-compressed by ZIP. Depending on how you built your SWF, there might be different sets of classes or classes that will be loaded via RSL and therefore not in the main SWF. Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of smitade Sent: Monday, March 02, 2009 11:37 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Compressed swf swf files appear to be compressed - headers start with PK. I was comparing the swf filesizes of different flex frameworks Cairngorm, Mate, PureMVC, etc and found significant differences. Cairngorm, for example, was down to 11 KB. How does one compress your swf down to this size.
RE: [flexcoders] static function and getDefinitionByName
What does the class definition look like? I’m pretty sure I’ve used this successfully. Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Sefi Ninio Sent: Monday, March 02, 2009 5:10 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] static function and getDefinitionByName Hi Alex. I actually tried that, it doesn't work... On Mon, Mar 2, 2009 at 8:13 AM, Alex Harui aha...@adobe.commailto:aha...@adobe.com wrote: ClassRef[“staticFunctionName”]() Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com] On Behalf Of Sefi Ninio Sent: Sunday, March 01, 2009 2:07 PM To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com Subject: [flexcoders] static function and getDefinitionByName Hi. I am using getDefinitionByName from flash.utils to get a class definition / instance from a string: var ClassRef:Class = getDefinitionByName(className) as Class; That works great, I can create an instance if I want. Problem is, I need to call a static function on that ClassRef class, and I'll know the function name only at runtime from XML. Any idea on how to do this?
RE: [flexcoders] Modules Communication
Model-View (MV) or MVC architecture. The modules reference a central data model Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of thelordsince1984 Sent: Monday, March 02, 2009 12:57 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Modules Communication Hi, suppose that i have a main application. The main application has plus panel, created at runtime, and every panel can load or unload a specific module.In ths scenario how can i achieve the communication between modules? Any suggestions? thanks in advance Lorenzo
[flexcoders] Re: Adding verticalaxis(es) via actionscript
--- In flexcoders@yahoogroups.com, Amy amyblankens...@... wrote: A quick scan of your code isn't revealing to me what you changed. Could you add in comments that show where you've modified it? I'm getting close. I've got the lines graphing, but each line is on a different axis (I'll attach the code below). It only displays two axises (which is what I want), but it's obvious that there's more than two since I have 4 lines, all with a value of 1, appearing one above the other (not on the same dot). I need a way to bind multiple rows to a single axis, I just haven't stumbled across it yet. As always, suggestions are welcome ;) Tref var renderers:Array=new Array(); var ar:AxisRenderer=new AxisRenderer(); for ( var o:Object in event.result ) { var ls:LineSeries = new LineSeries(); ls.dataProvider = event.result[o]; ls.yField = counter; ls.xField = dtime; ls.displayName = o.valueOf(); ls.setStyle('itemRenderer', new ClassFactory(CircleItemRenderer)); var currentSeries:Array = linechart1.series; var temp:String = o.valueOf(); var index:int = temp.indexOf(scc); if ( index != -1 ) { ar=new AxisRenderer(); ar.axis=la; renderers.push(ar); } else { } var la:LinearAxis = new LinearAxis(); /* first salesperson will show 0-whatever, subsequent ones will start at the lowest value */ la.baseAtZero = false; ls.verticalAxis = la; currentSeries.push(ls); linechart1.series = currentSeries;
Re: [flexcoders] jQuery for Flex - a Behavior Injection Framework
@Sam, Thanks for adding that link. Guess I shouldn't try to do fancy html emails for the first time when making important announcements :) @Michael - Thanks! I wouldn't say it would be a decaf *version* of anything :) It's supposed to play friendly with application frameworks. On Mon, Mar 2, 2009 at 3:00 PM, Michael Wills mich...@mawills.com wrote: I like the possibility of using it with Mate/Cairngorm. So then it would be the decaf versions of mate/cairngorm? :-) Seriously though this is quite cool. Sam Lai wrote: I think you forgot the link (or my phone's playing tricks with me). http://code.seanhess.net/?p=156 Nice work btw. I'm going to have to think about how it fits in with Flex and my current workflow, but I'll give it a shot in my new project :) On 3/3/09, Sean Clark Hess seanh...@gmail.com seanh...@gmail.com wrote: jQuery for Flex - a Behavior Injection Frameworkhttp://code.seanhess.net/?p=156 http://code.seanhess.net/?p=156 [...] I’ve just finished my pre-alpha version of a Behavior Injection framework for Flex. It adds support for functionality similar to jQuery for flex, along with support for a more complete CSS syntax. The approach is slightly different than jQuery, and hopes to play along with Flex’s strengths as well. [...] -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
Re: [flexcoders] Modules Communication
Have you read the section Using interfaces for module communication in the docs? That's been working for me.
[flexcoders] Re: Sending POST requests to php script??Help
I don't want to bind the object. The {...} was suggested in a previous post. I don't understand why I can't reference the object's value in the HTTPService request. Frank --- In flexcoders@yahoogroups.com, Tracy Spratt tspr...@... wrote: But you are using Object, and Object is not bindable and you are trying to bind: first{modelName.name.first}/first The braces mean binding. Tracy _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of fprihoda Sent: Sunday, March 01, 2009 7:09 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Sending POST requests to php script??Help I CAN access the flex object at run-time. And it need not be bindable. For example: Alert.show(modelName.name.first,title=modelName.name.first Value); Correctly displays the modelName.name.first value. However, when I access the same object in the HTTPService request, I can not access the objects value. I don't know what the problem is. This problem is driving me nuts. Frank
RE: [flexcoders] LCDS: Potential LCDS bug - Commit on one DataService(assembler), commits dirty data of another unrelated DataService
It really sounds like somehow the DataStore's for each DataService are the same though, I don't see how they could have different uids in that case.Can you turn on the mx:TraceTarget/? That should show what is happening... you can send that to me offlist (jvr...@adobe.commailto:jvr...@adobe.com) and I'll take a look at it. Jeff From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Rajeev Goel Sent: Monday, March 02, 2009 10:18 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] LCDS: Potential LCDS bug - Commit on one DataService(assembler), commits dirty data of another unrelated DataService hi All, I am facing a weird issue in LCDS 2.6. There are two unrelated entities A and B, i.e. they dont' have any relationship defined in data-management-config.xml My application is MDI based and consists of multiple mini-apps. Steps: 1. User opens miniapp for entity A, makes it dirty, don't save it. 2. Then opens minapp for entity B, does an operation which causes B's assembler to refill. immediately B's assembler complains that B's data is dirty. This shouldn't happen as A and B don't have any defined relationship . 3. Save dirty entity A 4. miniapp for entity B stops complaining for dirty data. 5. now dirty data in B. 6. dirty an entity in A, save it. B also gets committed to db. somehow these are getting linked together. Printed uid of DataService.dataStore for both, it is different. Any help in this would be appreciated. regards, Rajeev inline: image001.jpginline: image002.jpg
[flexcoders] Passing params (flashvars) to sub-applications
I'm experimenting with loading sub applications using SWFLoader. I've read numerous posts about this, but for the life of me can't figure out how to pass flashvars to the sub application. In particular, the technique described here (the second one) doesn't work for me http://stackoverflow.com/questions/407858/passing-flashvars-style-parameters-to-a-loaded-swf Surely there's a definitive way to do this? Thanks.
[flexcoders] Actionscript question
I have created an empty actionscript class, and I'm trying to use metadata to change the background color: package { [SWF(backgroundColor=#ff)] import flash.display.Sprite; public class SampleClass extends Sprite { public function SampleClass() { } } } But the background color is not changing to red. Can anybody see what I'm doing wrong? Thanks.
Re: [flexcoders] HandCursor (pointing version)
I'm not sure that they look the same cross-platform and/or cross-browser. But if you're on Windows, they're in C:\Windows\Cursors. There's probably some app out there that converts .cur files to .pngs. 2009/3/3 djhatrick djhatr...@yahoo.com: I am having bugs with handCursor, where can i find that little pointer png. So I can make my own cursor I would just clip one out of a screenshot, but screenshots hide the mouse :( -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
[flexcoders] Re: Feedback and ideas re: publishing a collection of poems
I saw this component somewhere that had a poem that scrolled slowly automatically, like you would if you read a page and it doesn't all fit in the window, such as with this window where I am typing this. Now, if there was an automatically scrolling feature, it would be important for a reader to be able to have some control, like scrolling back to the top, pause scrolling, etc. So, what would be needed is a pause button, to stop the scrolling, a start/play button to resume, and a way to manually move up and down, to scroll up and down. Bruce --- In flexcoders@yahoogroups.com, alinmircea_s alinmirce...@... wrote: Wow, first If a different computer on the web could use a different font you don t have to worry about that, font s are embeded into the app, not accessed on the user side. mx:TextArea text={'this'+ '\n' +'is'+ '\n' +'a'+ '\n' +'test'} width=100% height=100/ \n = new line OR mx:TextArea width=100% height=100% selectable=false editable=false mx:htmlText ![CDATA[ thisbr/isbr/abr/testbr/thisbr/textbr/areabr/hasbr/abr/scrollbr/barbr/alsobr/itbr/is br/notbr/selectablebr/orbr/editablebr/ thisbr/isbr/abr/testbr/thisbr/textbr/areabr/hasbr/abr/scrollbr/barbr/alsobr/itbr/is br/notbr/selectablebr/orbr/editablebr/ thisbr/isbr/abr/testbr/thisbr/textbr/areabr/hasbr/abr/scrollbr/barbr/alsobr/itbr/is br/notbr/selectablebr/orbr/editablebr/ thisbr/isbr/abr/testbr/thisbr/textbr/areabr/hasbr/abr/scrollbr/barbr/alsobr/itbr/is br/notbr/selectablebr/orbr/editablebr/ thisbr/isbr/abr/testbr/thisbr/textbr/areabr/hasbr/abr/scrollbr/barbr/alsobr/itbr/is br/notbr/selectablebr/orbr/editablebr/ ]] /mx:htmlText /mx:TextArea br/ = break text scrolling automatically, but with controls added for the person reading the poem - like what ? play scroll pause scroll stop scroll ?
[flexcoders] Re: Was feedback on publishing poems, embedding images
In the example I discussed recently, about publishing poems online using flex, I used images to hold the actual text of the poem. I thought initially, not sure why, that I had to use that to ensure the layout of the text. Obviously there are ways to use a '\n' to force a newline. However, let's say I kept the use of images to hold the poems. I used Accordions that exist within a Panel component, where each Accordion and Panel component held 5-6 poems or pages (some poems had to span more than one page, or pane). Each of the Panels is a custom component based on the Panel component (which holds an Accordion). I also have an ApplicationControlBar at the top that selects between different instancesAccordion instances. So, the ApplicationControlBar has Poems 1 - 4 followed by Poems 5-8 and etc. like that, where each selection, holds a different Panel that holds an Accordion. When you are on a slower internet connection, this doesn't look too good. Each time you click on a new pane of the Accordion you have to wait a bit for the next pane to load, because the pane holds an image file. I was thinking that if each custom component, each Panel, could embed the images but load as an external component then there would be a wait only when the different groups of poems load, in other words, when you click on Poems 5-8 to go from reading Poems 1 - 4, the application would load an external component, perhaps a swc, if I understand things right. That reduces the time that the user has to wait when going from poem 5 to 6 and 6 to 7, or page 2 of poem 6 from page 1 of poem 6. Hopefully, I'm explaining this clearly. How would I compile each custom component into a separate application, or separate swc component? and then how do I include each of these into the main application? Thanks in advance for any help, Please let me know if I'm unclear. Bruce --- In flexcoders@yahoogroups.com, alinmircea_s alinmirce...@... wrote: Wow, first If a different computer on the web could use a different font you don t have to worry about that, font s are embeded into the app, not accessed on the user side. mx:TextArea text={'this'+ '\n' +'is'+ '\n' +'a'+ '\n' +'test'} width=100% height=100/ \n = new line OR mx:TextArea width=100% height=100% selectable=false editable=false mx:htmlText ![CDATA[
[flexcoders] flexlib and subversion
i'm new to subversion, so i need some help understanding how to do this: I want to attach my local source to the flexlib repository on google code so i can detect changes to the library, but also... I want to attach my local source of flexlib to my own projects repository so that other developers can use the modified flexlib i have. how do i accomplish this?
Re: [flexcoders] static function and getDefinitionByName
It has a few private static members, and a few public static getter functions that manipulate the private members (no arguments on any of the functions). Nothing out of the ordinary. I get the fully qualified class name, and the static getter to be executed - at run time via XML. I use the class name to create a Class instance, and then I tried ClassRef[getter](); Nothing. When I debug it, the debugger doesn't event break on the breakpoint in the getter. On Tue, Mar 3, 2009 at 12:58 AM, Alex Harui aha...@adobe.com wrote: What does the class definition look like? I’m pretty sure I’ve used this successfully. Alex Harui Flex SDK Developer Adobe Systems Inc. http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *Sefi Ninio *Sent:* Monday, March 02, 2009 5:10 AM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] static function and getDefinitionByName Hi Alex. I actually tried that, it doesn't work... On Mon, Mar 2, 2009 at 8:13 AM, Alex Harui aha...@adobe.com wrote: ClassRef[“staticFunctionName”]() Alex Harui Flex SDK Developer Adobe Systems Inc. http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *Sefi Ninio *Sent:* Sunday, March 01, 2009 2:07 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] static function and getDefinitionByName Hi. I am using getDefinitionByName from flash.utils to get a class definition / instance from a string: var ClassRef:Class = getDefinitionByName(className) as Class; That works great, I can create an instance if I want. Problem is, I need to call a static function on that ClassRef class, and I'll know the function name only at runtime from XML. Any idea on how to do this?
RE: [flexcoders] Re: Sending POST requests to php script??Help
You can, but you have to use Actionscript, not declarative mxml. Build the request object in an AS function, something like this: var oRequest:Object = {first:modelName.name.first, last:modelName.name.last, email:modelName.name.email} srv2.send(oRequest); and remove the entire mx:request/ tag. This approach is generally easier to work with because you can debug the values you are sending to the server. Tracy _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of fprihoda Sent: Monday, March 02, 2009 7:27 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Sending POST requests to php script??Help I don't want to bind the object. The {...} was suggested in a previous post. I don't understand why I can't reference the object's value in the HTTPService request. Frank --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com, Tracy Spratt tspr...@... wrote: But you are using Object, and Object is not bindable and you are trying to bind: first{modelName.name.first}/first The braces mean binding. Tracy _ From: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com [mailto:flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com] On Behalf Of fprihoda Sent: Sunday, March 01, 2009 7:09 PM To: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com Subject: [flexcoders] Re: Sending POST requests to php script??Help I CAN access the flex object at run-time. And it need not be bindable. For example: Alert.show(modelName.name.first,title=modelName.name.first Value); Correctly displays the modelName.name.first value. However, when I access the same object in the HTTPService request, I can not access the objects value. I don't know what the problem is. This problem is driving me nuts. Frank
RE: [flexcoders] Passing params (flashvars) to sub-applications
This works fine for me, perhaps you are doing something wrong? Tracy _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Richard Rodseth Sent: Monday, March 02, 2009 7:34 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Passing params (flashvars) to sub-applications I'm experimenting with loading sub applications using SWFLoader. I've read numerous posts about this, but for the life of me can't figure out how to pass flashvars to the sub application. In particular, the technique described here (the second one) doesn't work for me http://stackoverflo http://stackoverflow.com/questions/407858/passing-flashvars-style-parameter s-to-a-loaded-swf w.com/questions/407858/passing-flashvars-style-parameters-to-a-loaded-swf Surely there's a definitive way to do this? Thanks.
Re: [flexcoders] updating an item renderer
The way I see it all the the item renderer is there only for display purposes. All the sock retrievals goes in to the provider, rr I mean the model which feeds the list provider. If you use binding the list will automatically display that changes. Now here-s something we do to avoid object creation... We use an array for fast retieval on the element and an array collection for binding ... In your case that would be translated into something like a stocks collection manager which has an stocksArray : Array and stocksAC: ArrayColection. U use an id to identify the element in the collection and that is unique ... when a stock comes in if it's new u add it, otherwise just update an existing one ... The rest is the magic of binding ... public function addStock(stock : Stock) : void { if (this._stocksArray.id + _] == null) { this._stocksArray[stock.id + _] = stock; this._stocksArrayCollection.addItem(stock); } else { Stock(this._stocksArray[stock.id + _]).update(stock); } } the update function shoul be in the Stock class and jus update stock properties... HTH, Claudiu Probably you have an answer by now form other peeps but I just started readimng tehm emails From: flexrookie flexroo...@yahoo.com To: flexcoders@yahoogroups.com Sent: Sunday, March 1, 2009 3:58:30 AM Subject: [flexcoders] updating an item renderer hi list, first post... i have an architectural question about datatproviders and itemrenderers that i'll pose with a canonical example. suppose i have an array of StockInfo objects that is populated by a 3rd party library. each StockInfo object dispatches UPDATE events when a stock price changes. i want to render the prices in HorizontalList with a custom renderer. here's the general application shell: = ?xml version=1.0 encoding=utf- 8? mx:Application xmlns:mx=http://www.adobe. com/2006/ mxml layout=absolute applicationComplete =applicationCom pleteListener( event) mx:Script ![CDATA[ import mx.controls. HorizontalList; import mx.events.FlexEvent ; import mx.core.ClassFactor y; protected var list:HorizontalList ; protected var stocks:Array; protected function applicationComplete Listener (e:FlexEvent) :void { // Stock data (hardcoded for the example) stocks = [new StockInfo()] ; // UI list = new HorizontalList( ); list.width = 400; list.height = 100; list.itemRenderer = new ClassFactory( StockInfoRendere r); addChild(list) ; } ]] /mx:Script /mx:Application = i need to wire the stocks array to the list. of course, given that i already have an array of StockInfo objects, it's tempting to make an ArrayCollection wrapper that gives direct access to the StockInfo objects. e.g., provider = new ArrayCollection( ); provider.addItem( {stockInfo: someStockInfoObj ect}); then the StockInfoRenderer could register for UPDATE events and redraw when the event occurs. but i'm hesitant about that approach. if i went that route, 1) within the StockInfoRenderer, where would i register for the UPDATE event? in commitProperties( )? 2) within the StockInfoRenderer, where would i *remove* the UPDATE listener? 3) given that renderers are reused, are there issues with synching, or with stranded listeners causing memory build-up? more generally, what's the right way to wire my list to the stocks array? it feels like i might be forced to handle UPDATE for each StockInfo object, and write a 'price' variable into a data provider. e.g., provider.getItemAt( i).price = value; provider.itemUpdate d(provider. getItemAt( i), price); seems a shame, given that i already have an array of StockInfo objects. the above two lines presuppose that i'm going to hunt for the item index every time a stock price changes. : ( another general question, do i even need the itemUpdate() call, or is that part automated? thanks for any advice! flexrookie