Skip to main content
CBecker
Inspiring
June 9, 2006
Question

External Images not loading in Flash 7 player

  • June 9, 2006
  • 1 reply
  • 276 views
I'm have a site that has a Flash intro that loads random images from a directory. I published the movie for Flash 7 player in MX 2004.

http://www.portcityarch.com

If you view this on a PC in IE6 (or on a Mac with any browser) with Flash Player 8 - it works as expected - the images appear in the boxes that decend from the Port City Architecture title bar.
If you try the same site on computers with the Flash Player 7, the images don't load.

There's a sub-directory called: "portimages" - that contains several images for each category. The movie starts out by selecting a random number which shows that particular set for each category. I don't believe I'm using any crazy code.

Randomizer code:
this._lockroot = true;
_root.randomNum = 4;
_root.myClipNum = (Math.floor(random(_root.randomNum)+1));

Code to load external image - this code is in each movie clip for each category - there's a movie clip called myPic_mc which is meant to be the container of the image:
loadMovie("portimages/pic01_" + _root.myClipNum + ".jpg", this.myPic_mc);

Can someone help out?

Thanks! Chris
This topic has been closed for replies.

1 reply

June 9, 2006
Strange. Problem confirmed.
random() is deprecated. See whether you have the same problem using Math.random()
_root.myClipNum = Math.floor(Math.random()*_root.randomNum)+1;
Other than that, why do you use _lockroot. And what's all the _root stuff for, for simple temporary variables? If you need them in different movieClips, they should be defined as global.

Good luck
Wolf
CBecker
CBeckerAuthor
Inspiring
June 9, 2006
Thanks Wolf.

I'm now using _global instead of _root (I used root because I was passing variable to several MC's).
Lockroot was to keep all references of root to this movie.

I've put in the Math.floor(Math.random() and I'll see if that does anything.

Thanks, Chris