PDA

View Full Version : Photo Gallery Action Script Errors-Help?



kRaZie_C
October 16th, 2003, 04:00 PM
Can someone please help me? I finally got sbeener's gallery working on my site but ran into a problem after I tried to test my scene.

Action Script Output Errors:
Scene=FriendsGallery, Layer=Gallery, Frame=1: Line 10: Statement must appear within on/onClipEvent handler
this.pathToPics = "thumbnails/";

Scene=FriendsGallery, Layer=Gallery, Frame=1: Line 12: Statement must appear within on/onClipEvent handler
this.pArray = ["Brad_01.jpg", "Tim_01.jpg", "kristianne & donald_01.jpg", "sandra_01.jpg", "selena_01.jpg"];

Scene=FriendsGallery, Layer=Gallery, Frame=1: Line 13: Statement must appear within on/onClipEvent handler
this.fadeSpeed = 20;

Scene=FriendsGallery, Layer=Gallery, Frame=1: Line 14: Statement must appear within on/onClipEvent handler
this.pIndex = 0;

Scene=FriendsGallery, Layer=Gallery, Frame=1: Line 18: Statement must appear within on/onClipEvent handler
loadMovie(this.pathToPics+this.pArray[0], _root.photo);

Scene=FriendsGallery, Layer=Gallery, Frame=1: Line 19: Statement must appear within on/onClipEvent handler
MovieClip.prototype.changePhoto = function(d) {

Scene=FriendsGallery, Layer=Gallery, Frame=1: Line 27: Statement must appear within on/onClipEvent handler
MovieClip.prototype.fadeOut = function() {

Scene=FriendsGallery, Layer=Gallery, Frame=1: Line 34: Statement must appear within on/onClipEvent handler
MovieClip.prototype.loadPhoto = function() {

Scene=FriendsGallery, Layer=Gallery, Frame=1: Line 42: Statement must appear within on/onClipEvent handler
MovieClip.prototype.loadMeter = function() {

Scene=FriendsGallery, Layer=Gallery, Frame=1: Line 52: Statement must appear within on/onClipEvent handler
MovieClip.prototype.fadeIn = function() {

Scene=FriendsGallery, Layer=Gallery, Frame=1: Line 62: Statement must appear within on/onClipEvent handler
this.onKeyDown = function() {

Scene=FriendsGallery, Layer=Gallery, Frame=1: Line 69: Statement must appear within on/onClipEvent handler
Key.addListener(this);


Any suggestions? Thx in advance!

Voetsjoeba
October 16th, 2003, 04:14 PM
You're not supposed to place that code on a movieclip, you have to place it on the timeline :)

kRaZie_C
October 16th, 2003, 04:36 PM
Thanks! That helped, but now I am having a new road block. I can't get my two flash pages (one main, then another) to link from the button that is placed in a movie clip on the main page.

Voetsjoeba
October 16th, 2003, 04:47 PM
What do you mean by flash pages ? Flash doesn't really have pages ...

kRaZie_C
October 16th, 2003, 05:04 PM
Sorry I'm used to referring to HTML, I meant that I have two different flash movies. One is set as the main movie, then the second is the one I want to link on the main page to it's appropriate button. Sorry I'm new to this, so I'm not sure if I'm explaining myself correctly in terms of flash.

Voetsjoeba
October 17th, 2003, 02:18 PM
You should have a look at the "Creating a Full Flash Site" on kirupa.com :)