Re: [flexcoders] Air App loads swf loads image

2010-08-06 Thread Oleg Sivokon
If I can guess, then, probably you've loaded the SWF into the same domain,
and if the URLs were relative to the loaded SWF they become relative to the
loading SWF. Does it make sense?


Re: [flexcoders] Air loading Swf loading image

2010-08-06 Thread Oleg Sivokon
When you embed an image, the path is resolved relative to the file, where
you put the Embed meta. If you load it, the path is resolved relatively to
the file that loads an image.


Re: [flexcoders] Air loading Swf loading image

2010-08-06 Thread Oleg Sivokon
Julian. That's really not so relevant... if you embed an image, the image
goes inside SWF, when you load it, it remains outside of the SWF, just lives
somewhere on the HD. When loading, the way you load a SWF may affect the how
the player will resolve relative URLs. I believe, that if the SWF is loaded
into the same application domain as the loading SWF (especially, if that SWF
was loaded using Loader.loadBytes()), there's no reason to think that URLs
should be resolved relatively to the loaded SWF original domain simply
because it may not even have one.


[flexcoders] Re: Interface Over Public/Dispatch

2010-08-06 Thread Stephen
Thanks for that, all sorted out now.



[flexcoders] Dynamic Validation

2010-08-06 Thread Stephen
Take a dropDownList dynamically created and added to a dynamically created 
HGroup and placed in a static VGroup. See bellow..
--

protected var cohab_hgroup:Array = new Array();
protected var cohab_gender:Array = new Array();

cohab_gender.push(new DropDownList());
cohab_gender[cohab_hgroup.length-1].width = 100;
cohab_gender[cohab_hgroup.length-1].prompt = Select;
cohab_gender[cohab_hgroup.length-1].dataProvider = gender_list;

cohab_hgroup[cohab_hgroup.length-1].addElement(cohab_gender[cohab_hgroup.length-1]);

cohab_list.addElement(cohab_hgroup[cohab_hgroup.length-1]);

s:VGroup id=cohab_list width=100% clipAndEnableScrolling=true/

---

But now I need to add a validator...

protected var cohab_gender_validator:Array = new Array();

cohab_gender_validator.push(new NumberValidator());
cohab_gender_validator[cohab_hgroup.length-1].source = 
cohab_gender[cohab_hgroup.length-1];
cohab_gender_validator[cohab_hgroup.length-1].property = selectedIndex;
cohab_gender_validator[cohab_hgroup.length-1].minValue = 0; 
cohab_gender_validator[cohab_hgroup.length-1].lowerThanMinError=A 
choice must be made.;

---

I's just not working, anyone with an idea of whats missing?

- Stephen




[flexcoders] DataProvider in AdvancedDataGrid itemRenderer

2010-08-06 Thread Davis Ford
Can someone tell me what's wrong with this code?  It generates the error:

1120: Access of undefined property list

List exists, but it seems like the scope of the DropDownList can't see
it?  I've seen other example like this...how can I bind to the
dataProvider on the list if the property/var lives in the parent
container?


?xml version=1.0 encoding=utf-8?
s:Application xmlns:fx=http://ns.adobe.com/mxml/2009;
   xmlns:s=library://ns.adobe.com/flex/spark
   xmlns:mx=library://ns.adobe.com/flex/mx 
minWidth=955 minHeight=600
fx:Script
![CDATA[
import mx.collections.ArrayCollection;

[Bindable]
public var list:Array = [one, two, three];
]]
/fx:Script

mx:AdvancedDataGrid id=grid
 width=100% height=100%
mx:columns
mx:AdvancedDataGridColumn 
mx:itemRenderer
fx:Component
s:DropDownList dataProvider = 
{list}/
/fx:Component
/mx:itemRenderer
/mx:AdvancedDataGridColumn
/mx:columns
/mx:AdvancedDataGrid
/s:Application


[flexcoders] How to display a LARGE dataset of images

2010-08-06 Thread Wally Kolcz
I have a request to create an application that allows up to 20,000 
images to be uploaded and displayed on a component using a DataGroup 
using a TileLayout. It starts out displaying the images 10px x 10px, 
then, as you mouse over it, it explands to 50px x 50px. The application 
starts by displaying a logo taken from a single image, then as people 
upload their images to specific places, the logo is replaced.

As you can imagine, the application crashes if I go above 1000 images. 
Any way to do that and not have it blow up?



Re: [flexcoders] How to display a LARGE dataset of images

2010-08-06 Thread Oleg Sivokon
Load them and draw to a single bitmapdata and then unload? Anyways, just out
of curiosity, what kind of application would need to display that many
images at once?


Re: [flexcoders] How to display a LARGE dataset of images

2010-08-06 Thread wkolcz
One of those 'community' photo wall type apps. 

Do you know of an example of your solution or what I should google. Thanks!
Sent via BlackBerry by ATT

-Original Message-
From: Oleg Sivokon olegsivo...@gmail.com
Sender: flexcoders@yahoogroups.com
Date: Fri, 6 Aug 2010 23:27:54 
To: flexcoders@yahoogroups.com
Reply-To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] How to display a LARGE dataset of images

Load them and draw to a single bitmapdata and then unload? Anyways, just out
of curiosity, what kind of application would need to display that many
images at once?



Re: [flexcoders] How to display a LARGE dataset of images

2010-08-06 Thread Oleg Sivokon
Just have one Loader and one Bitmap (or probably 16 or about that number in
the second case). When you handle the load complete you get the loader's
content and draw it to the bitmapdata, remember where it was the last time,
load next image, draw again and so on... However it will work, I would
imagine that it will take some time to load all the images... I still don't
understand why would anyone want to view so many images simultaneously...
Can you maybe convince the customer that seeing 2 images at once isn't
the best user experience? I mean, what will they see on an image 10x10? you
won't be even able to tell if that's a man portrait or a flowers pot...


Re: [flexcoders] How to display a LARGE dataset of images

2010-08-06 Thread Karim Beyrouti
how about an image pool - so you cache a number of images - better if you have 
thumbnails available to load otherwise, i would recommend resizing the bitmap 
data ... 

2 at once is a lot - if it's a list type thing you want, I found Spark 
lists with a custom item-renderer worked well with pools of images - especially 
as the spark list uses pools of object for it's list items - so you wont have 
to load all that at once..  your app should load the images as required... it's 
what i used for the AIR app @ http://gedit.kurst.co.uk/ - but - well, 
definitely not tested for so many images. 

MXML List I used :

s:List 
id=imageList
itemRenderer=com.kurst.galleryEditor.skins.DataListItemRenderer
dataProvider={galleryData.imageCollection}
creationComplete={dataController.imageList = imageList}
left=10 
right=0 
top=0 
bottom=0

dragEnabled=true
dropEnabled=true
dragMoveEnabled=true

borderVisible=false borderAlpha=0.0 contentBackgroundAlpha=0.0


!-- ++ --
!-- DATA - IMAGE LIST LAYOUT--
!-- ++ --

s:layout
s:TileLayout columnWidth=130 rowHeight=130 
horizontalGap=10 verticalGap=10 /
/s:layout

/s:List

Item Renderer:

http://kurst.co.uk/transfer/DataListItemRenderer.mxml

And object pool:

http://kurst.co.uk/transfer/DataListItemController.as

won't compile but might give you and idea, the only thing i did not build into 
the pool was a size limit. 
code is is not commented ( sorry ), but might help... and not tested for 2 
images... but that should be the concept.

good luck

- karim

On 6 Aug 2010, at 21:44, Oleg Sivokon wrote:

 
 Just have one Loader and one Bitmap (or probably 16 or about that number in 
 the second case). When you handle the load complete you get the loader's 
 content and draw it to the bitmapdata, remember where it was the last time, 
 load next image, draw again and so on... However it will work, I would 
 imagine that it will take some time to load all the images... I still don't 
 understand why would anyone want to view so many images simultaneously... Can 
 you maybe convince the customer that seeing 2 images at once isn't the 
 best user experience? I mean, what will they see on an image 10x10? you won't 
 be even able to tell if that's a man portrait or a flowers pot...
 
 



Re: [flexcoders] DataProvider in AdvancedDataGrid itemRenderer

2010-08-06 Thread Tim Statler
Try {outerDocument.list} or {parentDocument.list} ?

http://flextips.corank.com/tech/framed/using-parentdocument-or-outerdocument-

Tim

On Aug 6, 2010, at 10:44 AM, Davis Ford davisf...@zenoconsulting.biz
wrote:



Can someone tell me what's wrong with this code? It generates the error:

1120: Access of undefined property list

List exists, but it seems like the scope of the DropDownList can't see
it? I've seen other example like this...how can I bind to the
dataProvider on the list if the property/var lives in the parent
container?

?xml version=1.0 encoding=utf-8?
s:Application xmlns:fx= http://ns.adobe.com/mxml/2009
http://ns.adobe.com/mxml/2009;
xmlns:s=library://ns.adobe.com/flex/spark
xmlns:mx=library://ns.adobe.com/flex/mx minWidth=955 minHeight=600
fx:Script
![CDATA[
import mx.collections.ArrayCollection;

[Bindable]
public var list:Array = [one, two, three];
]]
/fx:Script

mx:AdvancedDataGrid id=grid
width=100% height=100%
mx:columns
mx:AdvancedDataGridColumn 
mx:itemRenderer
fx:Component
s:DropDownList dataProvider = {list}/
/fx:Component
/mx:itemRenderer
/mx:AdvancedDataGridColumn
/mx:columns
/mx:AdvancedDataGrid
/s:Application
 


[flexcoders] Flex 4.1 , automation_spark.swc and OSMF 1.o issues

2010-08-06 Thread superabe superabe
Hi ,

There seems to an issue when trying to compile in the automation libraries
into a Flex 4.1 app that also includes the OSMF1.0 swc.
I get the compiler error:

Description Resource Path Location Type
1046: Type was not found or was not a compile-time constant:
DimensionEvent. Test  Unknown Flex Problem

The app is essentially a basic empty mxml application, with the OSMF 1.0 swc
added to the build path-libraries and the following mxmlc arguments:

-include-libraries ${flexlib}/libs/automation/automation.swc
${flexlib}/libs/automation/automation_dmv.swc
${flexlib}/libs/automation/automation_agent.swc
${flexlib}/libs/automation/automation_spark.swc

Is there some way to workaround this ?

TIA,


[flexcoders] Making the background of a spark list transparent

2010-08-06 Thread dorkie dork from dorktown
I can't seem to find it anywhere. Is there a property that I can set to set
the white background of the transparent?

JP