choose the type of item to be loaded?

20 views
Skip to first unread message

Hadi Tavakoli

unread,
Sep 7, 2010, 3:58:25 AM9/7/10
to BulkLoader users
this seems to be great, but I have a question, how about deciding on
the load data format? flash.net.URLLoaderDataFormat

imagine we're adding an image like this: loader.add("http://
www.emptywhite.com/bulkloader-assets/cats.jpg");

will I be able to set its data format to URLLoaderDataFormat.BINARY ?
if not, will you give me some guide on where I can find the related
code so I can add this to the class files myself? (I'm wiling to share
it with you after I applied the change)

if this feature is not included, maybe we can add it object parameters
of the 'add" method?

Regards,
Hadi

Hadi Tavakoli

unread,
Sep 7, 2010, 7:23:42 AM9/7/10
to BulkLoader users
ok, that was too soon to post that message :)

I found out that we have "getBinary" method to retrive the byteArray
from what is loaded.... but unfortunaitly, it always returns null!
anyone else had this problem?

Arthur Debert

unread,
Sep 9, 2010, 12:43:32 PM9/9/10
to bulkload...@googlegroups.com
Hi Hadi.

If you simply pass bulkloader a URL, then bulkloader will guess the
loading type from the file extension. In this case, it's a jpg file,
so it will treat it as a Loader object.

From there you have two options:
a) Get the bitmap data from that image and load it's bytes.
b) Force bulkloader to treat that url as a binary, with:
loader.add("http://www.emptywhite.com/bulkloader-assets/cats.jpg",
{'type":BulkLoader.TYPE_BINARY);
and then you can use the getBinary.

Best regards,

> --
> You received this message because you are subscribed to the Google Groups "BulkLoader users" group.
> To post to this group, send email to bulkload...@googlegroups.com.
> To unsubscribe from this group, send email to bulkloader-use...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/bulkloader-users?hl=en.
>
>

--
Arthur Debert
www.stimuli.com.br

Hadi Tavakoli

unread,
Sep 14, 2010, 9:11:14 AM9/14/10
to BulkLoader users
yep, awesome :) thanks, it saves a lot of time.

Reply all
Reply to author
Forward
0 new messages