FFighter
06-01-2005, 01:07 AM
Hello Friends... :)
I have several doubts about the way AS2 and Flash works... first, let me explain what I want to do:
In sum, I want to load all the pictures from a specific album from the server, then load all the data beforehand (loaders and pages) so I can use them later in my mod of the pFLIPv2.
The number of pages is calculated using a very simple algorithm - number of fotos DIV fotos per page. Then instances of the page are created it the pages array using the duplicateMovieClip() method.
After that comes the hard part - An array of loader objects is created and the contentPath property is set for each item. I just want to load all the pics before a specific frame and show the progress to the user - in this part the loaders won´t show them, they will be just non UI objects inside the arrays.
The Array of Loaders is created inside an empty movieclip created in the root trought the createEmptyMovieClip() method.
thumbs_loader = _root.createEmptyMovieClip('tl',_root.getNextHighe stDepth());
The app receives data from the server and in loads the thumbs inside the loaders trough a loop:
count = picture_array.length; //this array contains the path to the thumb pic
aux:Loader; //just to make typing easier
for(i=0;i<count;i++) {
_root['tl'].thumbs[i] = new mx.controls.Loader();
aux = _root['tl'].thumbs[i];
aux.contentPath = picture_array[i];
}
- As you can see I created the Loaders in the array using the new keyword... what´s the difference of creating class objects using the createClassObject() method?
- I would like to load all the pics in the loaders and show the progress of the loading to the user - I know its possible to do with individual loaders but I want to pick up the array of loaders - I want all the pics to be loaded before going ahead - The array of loaders is inside the thumbs_loader movieclip - I thought that as the loaders are inside the thumbs_loader, I could just measure this mv loaded bytes? How could I do that?
Thanks in advance,
Marcelo.
I have several doubts about the way AS2 and Flash works... first, let me explain what I want to do:
In sum, I want to load all the pictures from a specific album from the server, then load all the data beforehand (loaders and pages) so I can use them later in my mod of the pFLIPv2.
The number of pages is calculated using a very simple algorithm - number of fotos DIV fotos per page. Then instances of the page are created it the pages array using the duplicateMovieClip() method.
After that comes the hard part - An array of loader objects is created and the contentPath property is set for each item. I just want to load all the pics before a specific frame and show the progress to the user - in this part the loaders won´t show them, they will be just non UI objects inside the arrays.
The Array of Loaders is created inside an empty movieclip created in the root trought the createEmptyMovieClip() method.
thumbs_loader = _root.createEmptyMovieClip('tl',_root.getNextHighe stDepth());
The app receives data from the server and in loads the thumbs inside the loaders trough a loop:
count = picture_array.length; //this array contains the path to the thumb pic
aux:Loader; //just to make typing easier
for(i=0;i<count;i++) {
_root['tl'].thumbs[i] = new mx.controls.Loader();
aux = _root['tl'].thumbs[i];
aux.contentPath = picture_array[i];
}
- As you can see I created the Loaders in the array using the new keyword... what´s the difference of creating class objects using the createClassObject() method?
- I would like to load all the pics in the loaders and show the progress of the loading to the user - I know its possible to do with individual loaders but I want to pick up the array of loaders - I want all the pics to be loaded before going ahead - The array of loaders is inside the thumbs_loader movieclip - I thought that as the loaders are inside the thumbs_loader, I could just measure this mv loaded bytes? How could I do that?
Thanks in advance,
Marcelo.