Do Not Sell My Personal Information Jump to content


Can Anyone Help Me Out?


Wosket
 Share

Recommended Posts

ok, so ive done a flash xml slideshow in flash mx 2004 which works great on its own. prob is when i take that slideshow into another flash movie (nesting it) it wont work in the new movie. so i think i'm missing some code but cant figure out where? obviously it needs to be told to work in the new parent movie im taking it into?

xml is all new to me so be gentle.

my xml code from flash mx is:

function loadXML(loaded) {

if (loaded) {

xmlNode = this.firstChild;

image = [];

description = [];

total = xmlNode.childNodes.length;

for (i=0; i<total; i++) {

image = xmlNode.childNodes.childNodes[0].firstChild.nodeValue;

description = xmlNode.childNodes.childNodes[1].firstChild.nodeValue;

}

firstImage();

} else {

content = "file not loaded!";

}

}

xmlData = new XML();

xmlData.ignoreWhite = true;

xmlData.onLoad = loadXML;

xmlData.load("bslides.xml");

/////////////////////////////////////

listen = new Object();

listen.onKeyDown = function() {

if (Key.getCode() == Key.LEFT) {

prevImage();

} else if (Key.getCode() == Key.RIGHT) {

nextImage();

}

};

Key.addListener(listen);

previous_btn.onRelease = function() {

prevImage();

};

next_btn.onRelease = function() {

nextImage();

};

/////////////////////////////////////

p = 0;

this.onEnterFrame = function() {

filesize = picture.getBytesTotal();

loaded = picture.getBytesLoaded();

preloader._visible = true;

if (loaded != filesize) {

preloader.preload_bar._xscale = 100*loaded/filesize;

} else {

preloader._visible = false;

if (picture._alpha<100) {

picture._alpha += 10;

}

}

};

function nextImage() {

if (p<(total-1)) {

p++;

if (loaded == filesize) {

picture._alpha = 0;

picture.loadMovie(image[p], 1);

desc_txt.text = description[p];

picture_num();

}

}

}

function prevImage() {

if (p>0) {

p--;

picture._alpha = 0;

picture.loadMovie(image[p], 1);

desc_txt.text = description[p];

picture_num();

}

}

function firstImage() {

if (loaded == filesize) {

picture._alpha = 0;

picture.loadMovie(image[0], 1);

desc_txt.text = description[0];

picture_num();

}

}

function picture_num() {

current_pos = p+1;

pos_txt.text = current_pos+" / "+total;

}

i hope someone can help :wacko:

Link to comment
Share on other sites


problem solved B)

really glad about that mate :D

been looking at this question all day

thought about an easy way to help you solve your problem

and was having problems on how to explain it to you

but a quick and easy explanation

would be,

"i havent got the foggiest idea what the blooming ell any of those things mean"

is it a foreign language ??

:lol:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



×
×
  • Create New...




Forums


News


Membership