IDE :: Storing MANY Images In Effeciently
Feb 3, 2012
In a project I am working on, I will have hundreds- no, thousands- of small (32x32 pixels) images that I need to store in some way. What I need to know is what the most effective way would be. By effective, I mean "How can I keep the file size as small as possible and still retain its speed?". I thought this would be something somebody has discussed (and I still believe so), but I can't find it via Kirupa's search feature or googling.
View 2 Replies
Similar Posts:
Jun 6, 2010
I am having trouble storing bitmap images into an array. The following code snippet creates an array called "imageArr" and its intention is to store all the bitmap images in it. The images are captured from the user's webcam and should then be stored in the array. However, when I display the images it can only display the last image taken.
ActionScript Code:
var bitmapData:BitmapData = new BitmapData(video.width,video.height);
var bitmap:Bitmap = new Bitmap(bitmapData);
var imageArr:Array = new Array();
[Code].....
View 7 Replies
Dec 6, 2011
I have a flash assignment that. The assignment is to create an application for playing a card game, I have to create an MXML component that has two variables, one variable stores the image of the back of a playing card, the other variable has t store all 52 options of a front facing card (the second variable will store over 50 images).
I've written the variable for the back of the card image like this:
[Code]...
View 1 Replies
Jan 6, 2010
I have a web based slide show that reads an xml file and loads images from a folder on the server. The client would now like to also offer this slideshow on a cd. I'm pretty sure that I can save all the assets to on the cd and the slideshow will work. But the client is concerned that someone with the cd will be able to directly access the images on the cd. So, here's my non-flash flash question, can the folder storing the images on the cd be hidden yet still be read by the flash movie?
View 1 Replies
Jan 9, 2009
i have 4 txt boxes which load 4 prices from a txt file that works ok. if the user then changes the price in the box and hits a button:-
on (release) {
time = new Date();
url = "./store.php?time="+time.getTime()+"&post="+escape(po
[Code].....
View 4 Replies
Feb 2, 2011
What is the best way to store data gathered from a flash file, and load it into another flash file? Would xml or php work? and could it be instantaneous? Here is a diagram of what i am trying to do...
[URL]
View 2 Replies
Aug 26, 2010
I have multiple swf files for background . I have to load the entire swf's first and have to store it in array . Is it good to store swf in array or dictionary?
View 9 Replies
May 6, 2009
I need some help with my code please. I have a for loop that creates sprites and loads images into the sprites theough XML. I have additional nodes for each image and sprite that get created that I want to store and call when I roll over the thumbs. What would be the best way to do this? I had to "improvise" and have the for loop create text fields to hold the data and then call it when I roll over throught "evt.target.
[Code]...
View 1 Replies
Jul 29, 2008
I'm not entirely sure how to go about this, but I want to store a path inside a var to reuse throughout some interface code:
Code:
var thisPath:Object = pageText_mc.pageCntrls_mc;
[thisPath + "."]prevButton_mc._visible = false;
[code]....
View 3 Replies
Jan 13, 2009
i'm trying to make a shoutbox/guestbook for my site in flash but i'm running into this problem. I'd like to have some sort of ip check, and i've got flash loading a var from php, and when I assign a text field the variable the users ip shows up just fine. my question is this-
how do i save whats in said text field as a string or something to use?
View 6 Replies
Jul 15, 2009
I'm building a website which is entirely in flash. There is a large main flash file and as you navigate through the site, many other external SWF's are loaded. The problem is that some of these are quite large and take a while to load. I was wondering if there is a way to load an SWF without showing the user that it is loading (no progress bars or anything) and then not doing anything with it once it is loaded, but having it ready for when I want to use itsee the site to understand: If you click on the "band" link, it will load a page with several other links. Most of them you click will simply say "Coming Soon", but the Media, Contact, and Tour links currently work and are good examples of what I am talking about. How would I load one of these before the user has clicked it so it is ready?
View 4 Replies
May 16, 2007
I am doing an AS3 application. In the beginning of my AS file, I need to embed different textures as the following:
Code:
[Embed (source = "./myImage1")]
public var Image1:Class;
I have to embeed n bitmaps. Then I have to create an instance of each oh thease classes.
I want to store the names of thease classes in an array so I will be able to create an instance of a class by accessing the array.
Something like this:
Code:
var arrayOfClasses : Array = new Array();
arrayOfClasses.push(Image1);
arrayOfClasses.push(Image2);
...
Then I want to go through the array and do :
Code:
var variable : Object = new arrayOfClasses[0];
But this dosen't work! How Can I build an array of classes? Is it doable?
View 5 Replies
Aug 19, 2009
I want to have a TV screen and hundreds of (small) flash animations load up in the 'TV'. I'm assuming I'm going to have to use Actionscript, so I'm looking into that right now. However, what would be the best way to organise this? Each "TV" will have a different set of "Channels". Do I create each 'channel' and save them as seperate SWF files, or is it possible to have them all in one main file. I can then flick through each 'channel', which essentially unloads the current animation and loads the next one
View 2 Replies
Sep 19, 2010
When a key is pressed, data is sent to PHP to be stored in a MySQL database. For each key press, only one entry should be posted. it re-posts exponentially (e.g., 1st key press = one post, 2nd key press = two posts, 3rd key press = three posts; thus, totaling six posts).Initially, the event listener for key press existed alone on a single frame. When that was the case. This issue did not occur. I added an additional frame so that I could set to clear out all variables and start fresh.
so frame 4 will have :
KeyListener = new Object();
KeyListener.onKeyDown = function(){
if (Key.isDown(69)){ // if key pressed is "E"
[code]....
View 1 Replies
Jan 5, 2011
This script from MC 1 loads an template from the library and then creates as many instances as the XML says.
It also creates a dynamic variable called ppp. This variable i want to store in each of the newly ceated instances and then use it in another movieclip to load the right path where i want to load another xml file in Flash....
This is what i want to accomplish:
xmlData.load("albums/album"+ppp+"/images.xml");
This code is in another movieclip (MC2) and gets loaded in frame 5 of MC1.
Another soltuions is if it is possible to read the value that is loaded in the dynamic textfield nummer_txt from the template:
Actionscript Code:
[Code].....
View 2 Replies
May 17, 2006
There is a combo-box by the name "cbJobs" and it gets its value from the XML file named "data.xml".. I want to store the value transferred from this XML file into a variable.. so basically someone told me to use the code
on (change) {
_root.subject = this.getValue();
}
the only problem with this code is that it gets activated only after I "change" the value in combobox by pulling it down.. I want to use this value obtained from _root.subject as a subject in the script
getURL("mailto:abc@abc.com?subject="+_root.subject);
View 1 Replies
Apr 9, 2009
I have 1 buttons in my flash movie. and want to use this swf in some other projects. just this button link will change in each project, so will also the button text. I dont want to edit flash file for each project. Can I use a text file for URL of button and I change text file to edit link of buttons and text of button?
View 2 Replies
Sep 9, 2009
I have 15 sets of x and y values, that should be stored together. I was thinking I could have an array, holding 15 other arrays, each holding the x and y value? Is that a valid way to do this? Also, is there a way to create those arrays holding the x and y, dynamically, so they just get numbered?
MainArray[
subArray[x1, y1];
subArray[x2, y2];
[Code]...
Obviously, above is not correct AS. Is this even a way to do this? Are there other much better ways?
View 3 Replies
May 30, 2011
I know you can store instance names in an array and call on the array values to reference the instance names in it.I was wondering if there is any way I can take an instance name, feed it directly into a function and use the name of the function variable/array/whatever to affect the object instance of whatever I name.
if it's an array of instance names, what is it actually an array of? Also, is there any way to hold and reference an instance name in a single value? sidenote: this doesnt have much to do with my question, but can arrays be fed directly into the header of a function?
View 6 Replies
Jan 21, 2011
The code
for ( var i:int = 0; i < markers.length; i++ )
{
markers[i].addEventListener( MapMouseEvent.CLICK, function( e:Event ):void
[code].....
View 3 Replies
Jul 28, 2009
I have made a variable and am trying to store it as a number that the user enters from an input text field. I am trying this, but it does not work:
var myNumber:Number = myTextField.text;
when i trace myNumber, it comes out blank. How do i get the variable to be the number that is typed in the myTextField?
View 9 Replies
Oct 14, 2009
I am trying to create a navigation where a button is highlighted with a glowfilter when clicked and then unhighlighted when another is clicked. I have this code that I think should be working, but for some reason the variable lastClicked is never assigned and always returns null.[code]
View 4 Replies
Nov 12, 2009
I have randomly generated 6 numbers, I need to know how I can store these in an array, and from this array the numbers will be compared with 6 number of another array to see how many balls are matching!
View 2 Replies
Jul 13, 2010
i wonder if someone know i way to save different numbers to a new var everytime the enterframe is updating. and then be able get the number out of that war later when its needed.[code]when i traced(theX);in the first.i can se that it got my numbers. but they do not get stored. so i cant use them when i want to get the numbers back.
View 6 Replies
Nov 7, 2011
This is my fully working brightness slider.
ActionScript Code:
var colorTransform:ColorTransform = new ColorTransform();
function Main():void
{
[Code]....
today I'm attempting to store the current value in my slider so I can trace the value...
How should I store the brightness value?? should I create a new variable such as
ActionScript Code:
Var:currentValue:colorTransform
I tried to do that and it just gave me 'null' when I traced it. I used trace(currentValue). and it gives me '0'. even when I go brighter!
View 5 Replies
Dec 9, 2008
I'm planning out an app that will (amongst other things) let the user speak into his mic and replay his voiceclip. I don't really need to permanently store the sound, it's enough if I can record it, replay it and overwrite it again if the user records another sound clip.
So far I gather this is impossible in Flash without the use of a mediaserver. Then again if I'm right the only way a media server can help me is by actually streaming the microphone input to the mediaserver, actually storing the sound as an mp3 file or similar, and then serving the mp3 file back to the app. It seems a bit overkill for just replaying short soundclips while the app is up, soundclips which are going to be re-recorded over and over while the user is using the app and trashed when he stops using the app.
Anyway, I recently heard something about how the flash 10 player actually allows you to store an mp3 or dynamically generated sound in a bytearray. It doesn't seem like a great leap to me to assume that if you can generate a sound and stick it in a bytearray, you can store mic input in a bytearray. But I haven't been able to find any info on the latter.
Has anyon experimented with this or found out a nay or yay on (temporarily) storing mic input in bytearrays?
View 2 Replies
Oct 11, 2010
I'm now writting a little drawing tool, that will allow users to save their drawings and the redraw them. Now I'm only concerning myself with diferent colored lines with diferent thickness. So now I only need to store the values, that will be used later on when calling the canvas object's graphics.lineTo(....); method. I'm planning to save all of my drawings in XML, but I still need to load them up when I want to use them.
Given my situation, what's the best way to load up my data (after loading it in chunks): Arrays, Dictionaries, anonymous objects. We're talking about loading up, let's say ~ 1000 Point instances for a very simple shape, since I want the drawing to be pixel-perfect, since I will be modifying it to a more sophisticated tool later.
View 4 Replies
Feb 1, 2004
anyone know if it's possible to have arrays indexing a series of functions say something a bit like this as an example?
[AS]genelist[0] = Math.random()*10;[/AS]
I am currently trying to get some geneticsstuff i did in director to flash so it can be used in a game, gonna suck if i have to have a LOAD of variables with different names...er this is in mx btw
View 5 Replies
Sep 17, 2004
This is really holding me up, so I hope someone can help me fast. I need to store each value of my for loop in a separate instance of my movieclip, but the movieclip only seems to pick up the last value of the loop.
Why is this and can I do this any other way apart from storing the value in a textfield or creating a loop within the movieclip?
View 3 Replies
Jan 28, 2006
Is it possible to save more complex expressions in variables and use it later/in an other object?
For example:If i want to store the expression (not the value) of in a variable, for exampe type something in an input textfield and then use it during runtime.
Say i type "mc._x +100" (without "-marks) into the textfield myText on stage (while the movie is running)
[Code]...
View 7 Replies