Solved

Easy Flash nextHighestDepth Problem

Posted on 2004-09-27
11
486 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Independent Software Vendors: 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

738 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