Solved

Easy Flash nextHighestDepth Problem

Posted on 2004-09-27
11
485 Views
Last Modified: 2007-12-19
Hi
I am dynamically loading images from a database..three different rows for three different queries.. i can see all the images load but then a couple will dissapear becuase they are in line with images on a different row... to make more sense ive created a mock up version with a couple of images and text file as the dynamic part..

it can be download @
http://www.geocities.com/mrsigma/FlashStore.zip

Any help would be greatly appreciated.
0
Comment
Question by:chizzy60
  • 3
  • 3
  • 2
11 Comments
 

Author Comment

by:chizzy60
ID: 12166764
Anyone?
0
 
LVL 39

Expert Comment

by:blue-genie
ID: 12168881
why don't u just use a uniqueID # from the database as a _level?
0
 
LVL 39

Expert Comment

by:blue-genie
ID: 12169030
ok, i just downloaded the file, the trace looks right, its incrementing by 1 each time.

i'm not familiar with the new Flash 7 stuff like myLoader = new MovieClipLoader(); and set...

i'll have a look if i have a brainwave, u'll be the first 2 know.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:chizzy60
ID: 12175057
ok thanks
0
 

Author Comment

by:chizzy60
ID: 12176815
I have upped the points for this one.. ANy healp would be great..
0
 
LVL 27

Accepted Solution

by:
negatyve earned 340 total points
ID: 12227213
I'll try to make it as easy as I can. Create a new blank movie in the same folder where you are working. Past these codes:

// FIRST FRAME
function loaderOnLoadComplete(targetMC)
{
      targetMC.onRollOver = function()
      {
            this._alpha = 50;
      };
      targetMC.onRollOut = function()
      {
            this._alpha = 100;
      };
      targetMC.onPress = function()
      {
            photoName = targetMC._name;
            trace("pname = " + photoName);
            photoName = photoName.slice(5);
      };
};
function loadPics(images_array, offset)
{
      for (var i = 0; i < images_array.length; i++) {
            var nextDepth = this.getNextHighestDepth();
            var mc = this.attachMovie("image", "image" + nextDepth, nextDepth);
            var ld = new MovieClipLoader();
            ld.onLoadComplete = loaderOnLoadComplete;
            ld.loadClip(images_array[i], mc);
            mc._x = 160 * i;
            mc._y = 100 * offset;
      }
}
myVars = new LoadVars();
myVars.path = this;
myVars.onLoad = function()
{
      this.path.loadPics(this["images_list" + this.letter].split(","), this.offset);
      this.path.nextFrame();
};
myVars.loadInfo = function(what, letter, offset)
{
      this.letter = letter;
      this.offset = offset;
      this.load(what);
};



// SECOND FRAME
myVars.loadInfo("cfm.txt", "", 0);


// THIRD FRAME
myVars.loadInfo("cfm.txt", "M", 1);


// FOURTH FRAME
myVars.loadInfo("cfm.txt", "L", 2);
0
 
LVL 39

Expert Comment

by:blue-genie
ID: 12227441
hey, welcome back neg.
0
 
LVL 27

Expert Comment

by:negatyve
ID: 12227539
>hey, welcome back neg.

hehe, thanks, glad to read you..! ;)
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user how to how to record live broadcast.

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question