Gallery AS code issues

This is a discussion on "Gallery AS code issues" within the Flash & Multimedia Forum section. This forum, and the thread "Gallery AS code issues are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Flash & Multimedia Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Aug 5th, 2007, 14:17
acrikey's Avatar
SuperMember

SuperMember
Join Date: Mar 2007
Location: UK
Posts: 305
Thanks: 0
Thanked 0 Times in 0 Posts
Gallery AS code issues

I am getting error messages when I run this, have I done something wrong?

Code: Select all
this.pathToPics = "photo/";

this.pArray = ["piper.jpg", "Laser.jpg", "hall.jpg", "dj2.jpg", "dj.jpg", "chair.jpg"];
this.fadeSpeed = 20;
this.pIndex = 0;

loadMovie(this.pathToPics+this.pArray[0], _root.photo);
MovieClip.prototype.changePhoto = function(d) {

    this.pIndex = (this.pIndex+d)%this.pArray.length;
    if (this.pIndex<0) {
        this.pIndex += this.pArray.length;
    }
    this.onEnterFrame = fadeOut;
};
MovieClip.prototype.fadeOut = function() {
    if (this.photo._alpha>this.fadeSpeed) {
        this.photo._alpha -= this.fadeSpeed;
    } else {
        this.loadPhoto();
    }
};
MovieClip.prototype.loadPhoto = function() {
    var p = _root.photo;
    p._alpha = 0;
    p.loadMovie(this.pathToPics+this.pArray[this.pIndex]);
    this.onEnterFrame = loadMeter;
};
MovieClip.prototype.loadMeter = function() {
    var i, l, t;
    l = this.photo.getBytesLoaded();
    t = this.photo.getBytesTotal();
    if (t>0 && t == l) {
        this.onEnterFrame = fadeIn;
    } else {
        trace(l/t);
    }
};
MovieClip.prototype.fadeIn = function() {
    if (this.photo._alpha<100-this.fadeSpeed) {
        this.photo._alpha += this.fadeSpeed;
    } else {
        this.photo._alpha = 100;
        this.onEnterFrame = null;
    }
};
this.onKeyDown = function() {
    if (Key.getCode() == Key.LEFT) {
        this.changePhoto(-1);
    } else if (Key.getCode() == Key.RIGHT) {
        this.changePhoto(1);
    }
};
Key.addListener(this);
Reply With Quote

  #2 (permalink)  
Old Aug 5th, 2007, 21:24
Multimedia Specialist
Join Date: Apr 2007
Location: Arizona
Age: 25
Posts: 666
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Sgaspar11
Re: Gallery AS code issues

Can we see your error messages? Usually helps. :-)
Last Blog Entry: Yay!? (Oct 8th, 2007)
Reply With Quote
  #3 (permalink)  
Old Aug 5th, 2007, 22:49
acrikey's Avatar
SuperMember

SuperMember
Join Date: Mar 2007
Location: UK
Posts: 305
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Gallery AS code issues

Reply With Quote
  #4 (permalink)  
Old Aug 8th, 2007, 15:32
Multimedia Specialist
Join Date: Apr 2007
Location: Arizona
Age: 25
Posts: 666
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Sgaspar11
Re: Gallery AS code issues

I really need to learn CS3/AS3 - not sure I can help much with this one. Looking at someone elses programmign code is NOT my strongsuit.

Maybe Jacob has an answer.
Last Blog Entry: Yay!? (Oct 8th, 2007)
Reply With Quote
Reply

Tags
as code

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
code behind code doesnt work skat ASP.NET Forum 4 Feb 18th, 2008 10:05
Created Flash Photo Gallery in PhotoShop. How can I put this Gallery INSIDE a page?? BlackReef Flash & Multimedia Forum 3 Dec 13th, 2007 18:30
CMS Gallery Tino Flash & Multimedia Forum 6 Sep 28th, 2007 16:03
live search code and styleswitcher code hebel JavaScript Forum 0 May 12th, 2007 06:16
Can somebody give me the code to hide the source code? renren JavaScript Forum 7 Mar 7th, 2006 12:27


All times are GMT. The time now is 22:36.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43