PDA

View Full Version : Loading dynamics text and pictures into a Movie Clip


Angelozzu
11-23-2004, 03:54 PM
I have a project which incorporates several buttons, when clicked will load a movie clip with dynamic text that will explain different things depending on which button you click. However, while getting the text to work. I am having problems loading the picture.

The button you innitially click reads-

on (press) {
_root.BioMC.gotoAndPlay(2);
myVars = new LoadVars();
//when data is totally loaded from text file:
myVars.onLoad = function(success) {
//copy the variables to the root level
// so they can be read by the display frame...
_root.BioMC.bioData = this.bioData;
_root.BioMC.imageData = this.imageData;
//then display the graphic...
};
//load the data... this line must remain below the onload function
myVars.load("bonanno.txt");
}

--
That is telling the button to load the movie clip and it loads ok and the text loads perfect due to the actionscript-

loadMovie(_parent.bioMC.mine.imageData,"imageTarget");
bioTarget.text = _parent.bioData;
_root.bioMC.imageData = "";
_root.bioMC.statsData = "";
_root.bioMC.bioData = "";

---

The dynamic image window is called ImageTarget and the text window is
called bioTarget but the image will not load.

I hit Control-Test Movie and I get a message

Error opening URL "file:///C|/Documents%20and%20Settings/1/Desktop/NYMH/bonanno1963/undefined"

I then change
loadMovie(_parent.bioMC.mine.imageData,"imageTarget");

to

loadMovie(_parent.imageData,"imageTarget");

and I get a new message:

Error opening URL "file:///C|/Documents%20and%20Settings/1/Desktop/NYMH/bonanno1963/bonanno.jpg

"

---

I'm exhausted and out of ideas. Can someone assist me with some imput as to what may be the problem?

Gibberish
11-23-2004, 04:21 PM
have you tried: imageTarget.loadMovie(_parent.imageData);

Angelozzu
11-23-2004, 04:53 PM
Thank you for replying so quickly.

I tried that and unfortunately I got the same message-

Error opening URL "file:///C|/Documents%20and%20Settings/1/Desktop/NYMH/bonanno1963/undefined"

I also tried

imageTarget.loadMovie(_root.BioMC.imageData);

which brought-

Error opening URL "file:///C|/Documents%20and%20Settings/1/Desktop/NYMH/bonanno1963/bonanno.jpg

"

Could it be anything else?

Gibberish
11-23-2004, 06:09 PM
that last script you posted is looking for the the iamge but it seem it is pointing to the wrong folder?

Is the image in folder "Desktop/NYMH/bonanno1963/bonanno.jpg"?

Where is the image relative to your swf?

try trace(_root.BioMC.imageData); and post your results. They should be file:///C|/Documents%20and%20Settings/1/Desktop/NYMH/bonanno1963/bonanno.jpg

Angelozzu
11-24-2004, 03:56 AM
Is it what you said it should be and to answer the other question, both the swf file and the image I'm trying to load are in the same folder. So I'm out of ideas.

Would you care to see my file for yourself and look it over and then tell me on the board what I need to do to correct it?

If so I need an email address because for some reason I cant post zip files. Is this ok?