[Laszlo-user] Dynamic resources?

Michael Gregor mgregor at laszlosystems.com
Fri Mar 17 16:44:40 EST 2006


Thanks everyone for their answers.

I was a bit in the middle of the 2 platforms.  Flash and LZX.

There is a nebulous zone that many of you will never have to visit given 
that you have very little flash experience.  That as you know is a good 
thing.

I needed to make sure that the jpgs,  whose URLs are in an xml file that 
'the client' can edit on the server so they can make changes to the 
presentation without needing the flash authoring tool, (whoa) were 
preloaded.  I wanted to have the splash progress bar reflect this 
activity.

It is a solo app.

In the end I just load all the images with the visibility turned off and 
count the onload events until every requested image is done loading. 
Then I start the app...

thanks again everyone.

MG


On Thu, Mar 16, 2006 at  7:36 PM, Benjamin Shine wrote:

> Is this a solo app? If you know the resources at compile time, you 
> could write a little script to transform your dataset description 
> from arbitrary xml to lzx resource descriptions. Depending on how 
> much automation you need, an ant task could invoke the script.
> Say you've got your dataset specified like this in mydataset.xml
> <images>
> 	<myniceimage file="foo/bar/nicey.jpg" />
> ...
> </images>
>
> Then do something like this:
> sed -e "s/myniceimage/resource name=\"myresource\"/" -e s/file/ 
> source/ < mydataset.xml > mydataset.lzx
>
> That would get the resources compiled in; a bit more regexp magic 
> would give the resources unique names.
>
> -ben
>
>
>
> On Mar 16, 2006, at 8:24 AM, Michael Gregor wrote:
>
>>
>> How would one load resources based on information in a dataset?
>>
>> or in other words.
>>
>> I have a set of 6 jpegs which are specified in an XML document.  I 
>> want
>> to have those jpegs included as resources in my app at compile time.
>> I want the src attribute of a <resource> tag to be programatically
>> specified.  Is this possible? If not, what is the best way to 
>> 'preload'
>> these jpegs so that the app has access to them on the client upon
>> startup?
>>
>> thanks,
>>
>> MG
>>
>> _______________________________________________
>> Laszlo-user mailing list
>> Laszlo-user at openlaszlo.org
>> http://www.openlaszlo.org/mailman/listinfo/laszlo-user
>
> benjamin shine
> software engineer
> ben at laszlosystems.com
>
>
>



More information about the Laszlo-user mailing list