Welcome, Guest. Please login or register.
Did you miss your activation email?
02/07/12, 09:01
Home Help Search Login Register
News: Parsley Flex framework review featuring quiz application, in our Flex frameworks series
Flex SDK 4.5 mobile roadmap: begin with your mobile development
Swiz Flex framework review featuring quiz application
New homepage we release our new Homepage, take a look ...

+  Flash-db
|-+  General
| |-+  V2 Components (Flash MX 2004 - Flash 8) (Moderators: vesa kortelainen, Ronald Wernecke, Jorge Solis, ..:: Mazhar Hasan ::.., papachan)
| | |-+  Help with preloader for Simple Photo Gallery 2.0
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: Help with preloader for Simple Photo Gallery 2.0  (Read 3312 times)
Brendon
Server what's that
*
Posts: 13


View Profile WWW
« on: 08/27/07, 08:20 »

Hi Guys,

I have been trying to understand and modify the "simple photo gallery 2" which I found on Flash DB. I have made some major changes, like cross-fading instead of blur, and added thumbnail selection (not too successfully I must admit), and now I am trying to add a preloader function for each new photo.
Can anyone help me with this topic as my knowledge of classes and more advanced as 2.0 is very limited? I can't seem to figure out how to integrate the preloader into the existing classes or AS files.

http://www.flash-db.com/Tutorials/simplegallery/

Thanks.
Brendon
« Last Edit: 08/27/07, 08:36 by Brendon » Logged

papachan
Moderator
Systems Administrator
*****
Posts: 507


View Profile WWW
« Reply #1 on: 08/27/07, 09:25 »

in fotogallery.as you have the MovieClipLoader object.
so you can add a private method there...
like this one:

        private var preload_mc:MovieClip // a movieclip on the movieclip you need to instance it before use it
	
private function 
onLoadProgress (target:MovieClipbytesLoaded:NumberbytesTotal:Number) {
	
	
	
target._visible false // if you want your image invisible
	
	
	
var 
p:Number Math.round(bytesLoaded/bytesTotal*100);
	
	
	
preload_mc.percent_txt.text = (String(p).substr(1)==undefined)? "0"+p;
	
	
	
preload_mc.percent_txt.text += " %"
	
	
	
preload_mc.bar._xscale p;// a bar progress
	
}


i hope it help you !

Logged

Brendon
Server what's that
*
Posts: 13


View Profile WWW
« Reply #2 on: 08/27/07, 16:40 »

Thanks alot Papachan! That worked perfectly. I am really stoked!

All I need to do now is improve the way my thumbnails intercept the slideshow as there is a delay of one whole slide plus the loading times, after the user clicks the thumbnails and before they see the slide they selected. I will give it my best shot first, but I might have to bug you again later, if you don't mind.

Take care.
Brendon
Logged

Pages: [1] Print 
« previous next »
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!