Solved

Easy Flash nextHighestDepth Problem

Posted on 2004-09-27
11
483 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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
playing flash video on kiosk at startup 6 409
how can flash builder 4.X version make use of java 8 5 309
bandwidth 5 70
Running Mp4 or Flash Video 1 115
Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
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…

776 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