preloader for database images, and linking HTML questions

  • jpmad4it
  • Novice
  • Novice
  • jpmad4it
  • Posts: 25

Post 3+ Months Ago

hello there

I have a website here:

Its easier to explain my problem by viewing the website, once it loaded up click on photo gallery in the navigation bar, then when the small image loads up, click it.

This is my problem - once the small image is clicked a large image should eventually be displayed - what i want to do is create a preloader for the large image.

the problem is all images are stored on a server and linked to by a database. Flash communicates with PHP (which grabs all necessary info out of the database i.e. in this case the location of the image on the server).

I have a function, in which the image location (php gets this information from the database) is loaded into a loadMovie object/holder:

n.htmlText += imageHolder.loadMovie (this["Image"+e]);

when the function is called flash communicates with a PHP script and grabs the necassary info - in this case the image location (something like images/pic.jpg) that is displayed in the 'Image' table in the database is displayed.

the same method is used for the displaying the large image too, when the thumbnail is clicked the same function is called and the large image is displayed in the same way.

can i use a preloader for the large image?

can anyone help here im totally lost

My second question is this:

on the home page of my site, you should see 3 paragraphs of text. This test is taken from a database and displayed in a dynamic textfield. Is it possible to take a single word from that text and create a link on it??

Again, the same function is used to display the content from the database, this is a snippet where the content is loaded in the function:

n.htmlText += this["Content"+e];

The problem is that each paragraph is taken from the database in one go, i.e. the code above handles the first paragraph. Is it possible to create links on a single word in that paragraph??

Please help im totally stuck!!!

I hope that my post made sense - any questions just ask.

regards Jonathan
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • contstrictor
  • Novice
  • Novice
  • contstrictor
  • Posts: 26

Post 3+ Months Ago

In order to preload something you need to know where it's loading to and the you can use the getBytesLoaded in the case of simple movieclips or loadedBytes if you're using a loader component in anycase, you can have have a preload bar indicate the status of the load action. you can find the tutorials at under the tutorials section see how that goes.

About your second question i'd suggest that you put the data into the database with a few <html> tags around the words you want to give special features such as hyperlinking etc and then make the dynamic text render loaded text as html.

good luck
  • roarmeow
  • Professor
  • Professor
  • User avatar
  • Posts: 861
  • Loc: BKNY

Post 3+ Months Ago

you need to check, when dynamically loading an image into an empty movieclip, that the getTotalBytes returns a value greater than 4 (so you can be sure you're preloading the whole image, not just the bytes of the empty mc or whatev's...)

if you want something more specific than this, just hollar... there's plenty of ways to do it... you want a progress bar? just something to keep the viewer engaged?...
  • jpmad4it
  • Novice
  • Novice
  • jpmad4it
  • Posts: 25

Post 3+ Months Ago

YES - you are the man, adding HTML code to the Database works!!! thanks man.

Im still struggling with the preloader though. Yes , i want a progress bar and an increasing percentage value to show the loading progress of the large picture, to keep the user engaged in the site.

thanks again J

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 29 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.