Solved

Easy Flash nextHighestDepth Problem

Posted on 2004-09-27
11
482 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
Comment Utility
Anyone?
0
 
LVL 39

Expert Comment

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

Expert Comment

by:blue-genie
Comment Utility
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
 

Author Comment

by:chizzy60
Comment Utility
ok thanks
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 

Author Comment

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

Accepted Solution

by:
negatyve earned 340 total points
Comment Utility
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
Comment Utility
hey, welcome back neg.
0
 
LVL 27

Expert Comment

by:negatyve
Comment Utility
>hey, welcome back neg.

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

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
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 how to record live broadcast.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

728 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now