RE: [flexcoders] Re: With the latest eula agreement from Apple
I have no idea how Elips are doing it, but they haven’t got the Player code, so they must be pulling some other trick to get it all to hang together! From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Nick Collins Sent: 14 April 2010 23:54 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: With the latest eula agreement from Apple If that were the case, then OpenPlug wouldn't be able to to it with Elips Studio, but they are. They basically are providing a modified Flex 3.x SDK to use within Flex Builder. Then their IDE extensions output an XCode project that even will give you hooks so you can tie into native services, like the camera, address book, etc.
Re: [flexcoders] Installation of Flex Builder 3 plugin on Eclipse 3.5
On Tuesday 13 Apr 2010, sachindev tripathi wrote: Any one could please update my knowledge? FB3 and FB4 both allow you to make Flash applications, with or without the Flex framework, so calling it Flash Builder 4 makes more sense. -- Helping to biannually maintain seamless intuitive B2B scalable metrics 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.
Re: [flexcoders] SWC's vs. source
You can use SWC in three different ways: - external library (none of the SWC contents are included into the resulting SWF), this is if you want to have RSLs (runtime shared libraries). Example, you are developing an app that uses Cairngorm and has several modules. You would than link the Cairngorm library as external for the modules. - on demand. This is the default option. Only the referenced classes should be imported. - the whole thing. This is a nice option if you need to embed things like resources already compiled elsewhere. (Flash graphics for example). Best. Oleg
[flexcoders] Loading FXG files at runtime
Hi is it possible to load FXG files at runtime and render them? Thanks.
[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] EPUB reader in Flex
Is there any open-source project which implements EPUB reader in Flex? Thanks for any info Zdenek M
Re: [flexcoders] EPUB reader in Flex
Well, ePub is basically just HTML. As far as I am aware off... What about using the new text engine and load the text as HTML? That might work.
[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: Installation of Flex Builder 3 plugin on Eclipse 3.5
Also, be aware that FB3 plugin is only supported through Eclipse 3.3. Beyond that, Adobe says at your own risk... we have successfully installed it on 3.4 (ganymede) but had troubles with 3.5 (galileo) and decided to wait until we could upgrade to fb4. --- In flexcoders@yahoogroups.com, s.m.srini...@... wrote: Hi Sneha, For First question, You want all of those in one place, then it is suggested to have it installed. For second question, Go to adobe.com and download latest version. I believe Flex 3 Builder is discontinued to download from the site, you could always download the latest version that is Flex 4 [also know as Flash Builder 4] use Flex 3.5 SDK while building the project. If you already have the Eclipse other plugins installed and want the Flex Builder Plugin to install on top of it, it's easy, the installer will guide you through steps u will be able to set it up perfectly. Srinivas On Apr 12, 2010 9:18am, Sneha sneha_mod...@... wrote: Hello All, I have few questions regarding Flex Builder 3 and Eclipse. I would greatly appreciate any help. First, when I have Flex Builder 3 installed do I need to have Flex Builder 3 plug-in installed on Eclipse for LCDS, BlazeDS, and flex with spring plugin. Second, Where do I get a flex builder 3 plug-in for eclipse 3.5 for Windows XP and what are the steps involved in installing it. Could anyone please let me know. Thanks in advance. --- Sneha
[flexcoders] MXML Component Call Event in Parent
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] flex online training
Hi, is there any online flex training Could you please let me know Regards, Manoj. --- On Thu, 4/15/10, Zdenek Mikan zde...@amsoft.cz wrote: From: Zdenek Mikan zde...@amsoft.cz 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: 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] How to skip null ColumnSeries values in a clustered ColumnChart?
(this is a simple but difficult problem; call-out to clever chart-coders): When displaying multiple ColumnSeries in a clustered ColumnChart (3.5 SDK), the default behavior is to allocate a blank space when one of the series has no value in the dataprovider. Below is a simple example (slightly modified from the base example of ColumnCharts in the help docs): when it comes to Feb, it shows the values for Profit and Expenses, but also leaves a blank space for VaryingOccurence. This only happens when the Chart type is clustered (the default). This may seem like nitpicking, but in my context I have about 12 different series, many of which do not occur for each category value - so each of my category values has a whole lot of empty space between the clustered columns. I just want to tell the Chart, don't allocate any space for the chartItem in the series if its null (or even 'if it's zero' would be fine): i.e., ColumnSeries.showNullValues=false - but that doesn't exist. Overriding updateDisplayList (to draw nothing) in a custom itemRenderer for the series does not work: the chart still allocates space for the row. I'm thinking there's got to be someplace in ColumnChart where it's allocating space for the series (referring to properties like columnWidthRatio), but I can't find where to tell it don't bother if the chartItem is null. If this is impossible to achieve via subclassing the Chart or the Series, does anyone have any creative ideas to achieve the end-result? To reiterate, the goal would be to show the result of the code below, but without the empty space for the null value in Feb. thanks, -Ped ?xml version=1.0? !-- charts/BasicColumn.mxml --mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; mx:Script![CDATA[ import mx.collections.ArrayCollection; [Bindable] public var expenses:ArrayCollection = new ArrayCollection([ {Month:Jan, Profit:2000, VaryingOccurence:1750, Expenses:1500}, {Month:Feb, Profit:1000, Expenses:200}, //no instance of VaryingOccurence {Month:Mar, Profit:1500, VaryingOccurence:750, Expenses:500} ]); ]]/mx:Script mx:Panel title=Column Chart mx:ColumnChart id=myChart dataProvider={expenses} showDataTips=true type=clustered mx:horizontalAxis mx:CategoryAxis categoryField=Month / /mx:horizontalAxis mx:series mx:ColumnSeries yField=Profit displayName=Profit / mx:ColumnSeries yField=VaryingOccurence displayName=Varying Occurence / mx:ColumnSeries yField=Expenses displayName=Expenses / /mx:series /mx:ColumnChart mx:Legend dataProvider={myChart}/ /mx:Panel /mx:Application
[flexcoders] highlight a cell in datagrid
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] Datagrid cell's x and y coordinates
I want a way to find out the Datagrid cell's x and y coordinates.
[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
Re: [flexcoders] Re: flex online training
Thanks --- On Thu, 4/15/10, valdhor valdhorli...@embarqmail.com wrote: From: valdhor valdhorli...@embarqmail.com Subject: [flexcoders] Re: flex online training To: flexcoders@yahoogroups.com Date: Thursday, April 15, 2010, 12:27 PM One place I always recommend is the Learn Flex in a Week at http://www.adobe. com/devnet/ flex/videotraini ng/ --- In flexcod...@yahoogro ups.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: flexcod...@yahoogro ups.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
Re: [flexcoders] flex online training
Manoj Kumar wrote: is there any online flex training Could you please let me know Hi Manoj, You shouldn't hijack a thread. If you have a new question, don't reply to an existing thread. Start a new one. Did you try Google? A search on Adobe flex online training turns up dozens of sites. I'd recommend Lynda.com. Adobe also has its own training at http://www.adobe.com/devnet/flex/videotraining/. Cordially, Kerry Thompson
[flexcoders] Uploading An Image Without Browse
Is there any way to let a user upload an image from an air app without having them browse for it? I want to let my users enter their name into a text input, take a snapshot and then the image will be uploaded to my server as whatevernametheuserhasentered.jpg Is there any way to do this and does anyone know of any similar examples? All I can find is uploading via the browse function.
Re: [flexcoders] Re: MXML Component Call Event in Parent
Hi Valdhor, Care to show some examples? Or some links? Thanks. Angelo From: valdhor valdhorli...@embarqmail.com 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: 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
Re: [flexcoders] Uploading An Image Without Browse
When you say take a snapshot, what do you mean? On Thu, Apr 15, 2010 at 10:52 AM, James garymoorcroft_...@yahoo.co.ukwrote: Is there any way to let a user upload an image from an air app without having them browse for it? I want to let my users enter their name into a text input, take a snapshot and then the image will be uploaded to my server as whatevernametheuserhasentered.jpg Is there any way to do this and does anyone know of any similar examples? All I can find is uploading via the browse function. -- 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: Uploading An Image Without Browse
My app has a html component which allows the user to enter a website into it. When the website is fully loaded a snapshot is made of the html component and then saved in the application directory automatically. I want this file to then automatically upload to my server rather than just being saved on in the app directory. I can easily do it using the browse method but can't figure out how to get it to simply go straight to the server without the user having to save it somewhere and then browse to upload it if that makes sense.. --- In flexcoders@yahoogroups.com, Steve Mathews happy...@... wrote: When you say take a snapshot, what do you mean? On Thu, Apr 15, 2010 at 10:52 AM, James garymoorcroft_...@...wrote: Is there any way to let a user upload an image from an air app without having them browse for it? I want to let my users enter their name into a text input, take a snapshot and then the image will be uploaded to my server as whatevernametheuserhasentered.jpg Is there any way to do this and does anyone know of any similar examples? All I can find is uploading via the browse function. -- 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: Exceeding Flash's Capabilities?
66 line series with 218 plot points each for a total of 14388 plot points, if we're looking for specifics. It's a lot of data that doesn't look particularly good because of the sheer volume, but it's what they want. I'm using a line chart. Using AMF3 to retrieve the data. The time it takes to query the data, or transmit the data, isn't an issue. Also, the problem doesn't happen over time, it could be the first request someone makes on the application - I don't believe it's a memory leak. The method used to populate the graph is thus: var ls:LineSeries = new LineSeries(); ls.dataProvider = data[o]; ls.yField = counter; ls.xField = dtime; ls.displayName = o.valueOf(); if ( circleplots.selected ) { ls.setStyle('itemRenderer', new ClassFactory(CircleItemRenderer)); } var currentSeries:Array = linechart1.series; currentSeries.push(ls); linechart1.series = currentSeries; Storing the data in an internal array, and possibly sending it to the clip board isn't a big issue. It's trying to display that much data within a flex construct that causes the problem(s). Jacob --- In flexcoders@yahoogroups.com, Richard Rodseth rrods...@... wrote: How many items are you (and the Excel user) talking about? What sort of Flex charts are you using? Are you using AMF, XML or JSON to retrieve the data? On Wed, Apr 14, 2010 at 3:48 PM, trefalgar trefal...@... wrote: The majority of my flex work revolves around graphing data. If for some reason a user picks a lot of statistics to graph, over an even longer period of time, the amount of data that comes back to the Flash application overwhelms flash, consuming all of the boxes resources and regularly crashing the browser. Is there anything in the developers bag of tricks to help with this kind of problem, or is the sheer amount of data too much for the application/SDK/solution to handle? I understand I can put a limit on the amount of data returned, but as the user states, I can pull it out of the database, via Excel, and it works. Tref
Re: [flexcoders] Re: highlight a cell in datagrid
I am having the same challenge right now too. My DataGrid is a custom extension and did try using the protected highlightItemRenderer with a public method I exposed but didnt work for me, even with an invalidateDisplayList and validateNow after setting the poperty. Many web examples do it by setting the selectedItem of the dataGrid to the item under the dragEvent, but I cant change my selection. So I have been able to do it by: - CustomDataGrid exposes two new functions highlightItem( ir:IListItermRenderer) and clearHighlight( ir:IListItemRenderer ) - DataGrid.dragOver handler calls highlightItem and clearHighlight on last highlighted item(holds reference) - DataGrid.dragExit handler calls clearHighlight public function highlightItem( ir:IListItemRenderer ):void { drawItem( ir, false, true ); } public function clearHighlight( ir:IListItemRenderer ):void { drawItem( ir ); } Works for me, just make sure you dont highlight/clear the selected item as my logic prevents that. HTH, Greg On Thu, Apr 15, 2010 at 2:42 PM, valdhor valdhorli...@embarqmail.comwrote: Use the data grid highlightItemRenderer? --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.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] flex as3 programming pdf
hi guys does anyone know where to get the updated version of PROGRAMMING ACTIONSCRIPT 3.0 FOR FLEX pdf? the latest version i have is 2009. does anyone know where to get latest? that resource is a huge godsend for explaining actionscript in a clear and provides tons of examples ... :)
RE: [flexcoders] What is the MXML syntax for this?
Thanks for the response Alex. And this works great for my test example! However, I am curious, is this as deep as you can go, one level? Or is it possible to nest it deeper? Just trying to get an idea of whats allowed and how its actually working. Nesting one level deeper, in a simple test application, I get the error : could not resolve local:imageVar to a component implementation. so, for an example, if you had a ParentContainer, that had a variable named childComponent, that has a variable named imageVar. local:ParentContainter local:childComponent local:imageVar mx:Image source=myTestImage.jpg / /local:imageVar /local: childComponent /local: ParentContainter This gives the could not resolve local:imageVar to a component implementation. error. From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Alex Harui Sent: Wednesday, April 14, 2010 10:06 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] What is the MXML syntax for this? Are you looking for: local:myContainerComponent id=containerComponent local:imageVar mx:Image source=myTestImage.jpg / /local:imageVar /local:myContainerComponent On 4/14/10 12:53 PM, Christopher McArthur cmcart...@riotgames.com 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. -- Alex Harui Flex SDK Team Adobe System, Inc.
Re: [flexcoders] What is the MXML syntax for this?
You can go as deep as you want. What you are doing is declaring a component, then naming one of its properties, then declaring the value of the property to be another component. Once you do that you can name one of that component’s properties and define its value to be another component, etc. It is easier to see the pattern if all of your components start with uppercase letters and properties start with lower case. thirdParty:SomeContainer thirdParty:somePropertyInSomeContainer local:MyContainer local:somePropertyInMyContainer s:Group s:layout s:VerticalLayout / On 4/15/10 3:03 PM, Christopher McArthur cmcart...@riotgames.com wrote: Thanks for the response Alex. And this works great for my test example! However, I am curious, is this as deep as you can go, one level? Or is it possible to nest it deeper? Just trying to get an idea of whats allowed and how its actually working. Nesting one level deeper, in a simple test application, I get the error : could not resolve local:imageVar to a component implementation. so, for an example, if you had a ParentContainer, that had a variable named childComponent, that has a variable named imageVar. local:ParentContainter local:childComponent local:imageVar mx:Image source=”myTestImage.jpg” / /local:imageVar /local: childComponent /local: ParentContainter This gives the could not resolve local:imageVar to a component implementation. error. From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Alex Harui Sent: Wednesday, April 14, 2010 10:06 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] What is the MXML syntax for this? Are you looking for: local:myContainerComponent id=”containerComponent” local:imageVar mx:Image source=”myTestImage.jpg” / /local:imageVar /local:myContainerComponent On 4/14/10 12:53 PM, Christopher McArthur cmcart...@riotgames.com 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. -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
Re: [flexcoders] What is the MXML syntax for this?
If you want to do it purely in MXML, I would just use a [Bindable] variable. So you can do this: mx:Image id=myImage source={myvar}/ Then you can change the variable myvar to store any image you like and it will automatically update the mxml. So to add what Alex wrote you could do this: local:myContainerComponent id=”containerComponent” local:imageVar mx:Image source=”{myvar}” / /local:imageVar /local:myContainerComponent Amanda On Wed, Apr 14, 2010 at 3:53 PM, Christopher McArthur cmcart...@riotgames.com 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. -- ´¨) __o .·´ .·´¨)¸.·´¨) _'\ . (¸.·´ (¸.·´ (¸.·´¨¨ Amanda ¨¨( * ) ( )
[flexcoders] How to load a file from a relative path with Air 2.0
Hi, so I am using FlashBuilder 4, and I'm using FlexUnit4 to create unit tests. For some tests I need to load a file as input. I can't seem to load a file from a relative path. All the air examples have you use the static defined places and want you to navigate from there (e.g. File.documentsDirectory), but this isn't really a good option for running unit tests. My project structure is the standard Flex layout. Let's say I have this: src/assets/file.txt When the project builds, this is copied into bin-debug/assets/file.txt The .swf that has the test runner also executes from bin-debug, so why can't I do this: var file:File = new File(assets/file.txt); When I do, it throws an exception. Same thing if I try var file:File = new File(); file.nativePath = assets/file.txt; Interestingly enough, I can load this file using URLLoader, but that seems to be the only way. It seem bizarre that URLLoader works, but File does not, unless I am missing something? Regards, Davis