Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Developer
gerardkcohen
Posts: 48
Registered: ‎10-06-2009
My Device: Not Specified

Problems building app with too many images

I get build errors when trying to build an app that has too many images included. If I remove the images, the app builds fine. Does anyone have any ideas? Thanks in advance for your help.
Please use plain text.
Developer
JRab
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: Problems building app with too many images

there have been a few threads about this in the past. this thread might be able to help you out:

 

http://supportforums.blackberry.com/t5/Tablet-OS-SDK-for-Adobe-AIR/Size-limit-of-application/m-p/726...

 

good luck!

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Please use plain text.
Developer
jffurlan
Posts: 1,003
Registered: ‎01-16-2011
My Device: PlayBook (sim)

Re: Problems building app with too many images

Wow, I was just experiencing this last night and couldn't find that thread. It doesn't really answer the question though, is there an image threshold in the SDK, or does burrito have a limit?
I also found that if I cleared all the .bar files in my bin-debug folder it seemed to help.
- If you like my response/post, or it helped you find an answer you were looking for, please provide a Kudo - white star to the bottom right of this post. -
- Please use the search bar at the top, or check out the PlayBook FAQ's for help getting started -
- Hockey DrillBook -
Please use plain text.
Developer
JRab
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: Problems building app with too many images

i've seen people say 50 is the limit. im not too famiiar with the situation, never ran into it (i use an IDE if that matters). i embed all my images so its not included in the packaging command line (assming flash builder uses the same command line). so worst comes to worst, if you dont plan on removing the images you need in your app during runtime, then embed them.

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Please use plain text.
Developer
jffurlan
Posts: 1,003
Registered: ‎01-16-2011
My Device: PlayBook (sim)

Re: Problems building app with too many images

Hmm. Well I'll certainly have over 50 images by launch time. Is embedding them as easy as
Embed = "assets/image1"
And then using the image later with setImage?

(I know that code probably isn't right, I'm on my phone and just tried to get the general idea across)
- If you like my response/post, or it helped you find an answer you were looking for, please provide a Kudo - white star to the bottom right of this post. -
- Please use the search bar at the top, or check out the PlayBook FAQ's for help getting started -
- Hockey DrillBook -
Please use plain text.
Developer
JRab
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: Problems building app with too many images

[ Edited ]

yes, its quite easy as that. what i do is have a sepeate class called AssetManager that i embed all my images into. then whenever i need an image, i simply call that class and the name of the image and viola its there. best part is that it doesnt take any time to load. so no need to wait for the Event.COMPLETE because its always there pre-loaded. and you can also use it in the setImage() method of the Image class.

 

the downside is that it will increase your project load time if there are too many images. but i havent run into that problem (my images are small in size).

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Please use plain text.
Regular Contributor
L7ColWinters
Posts: 82
Registered: ‎11-12-2010
My Device: Android Droid Incredible

Re: Problems building app with too many images

@Embed('image location') will embed them. Has anyone gotten a SWC compiled to have just images in it so that i could reference the swc instead?

Please use plain text.
Developer
gerardkcohen
Posts: 48
Registered: ‎10-06-2009
My Device: Not Specified

Re: Problems building app with too many images

Thanks for the responses. I will have at least 600 images, half of them small, the other half rather large. I expect this to be a large application. Can either of you expound on the embedding image class idea? Thank you!
Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: Problems building app with too many images

You could create a module that has the images public (or via an interface api) that gets loaded at run time.  This will allow the app to load quicker.

 

However, if you are not using all the images all the time, you are probably wasting memory so dynamically loading them still might be bettter.  However, there is a limit (bug) in how many files can be installed with the app.  A third choice is to host the images on a server and download them the first time the app is run.

Please use plain text.