Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Flash 5 Image Gallery Problem, from Kirupa Tutorial

Posted on 2004-10-16
11
Medium Priority
?
422 Views
Last Modified: 2006-11-17
Hi,

I've asked this question before -- and seen it addressed before -- but no clear answer has come around:
http://www.experts-exchange.com/Web/WebDevSoftware/Flash/Q_21170974.html#12328976

Here's the deal.  The Flash 5 movie at:

http://www.kirupa.com/developer/mx/photogallery.htm

Will not load the images, when downloaded, no matter what directory structure is available.  There has been a hint that the problem is the presence of some MX code, but what code?  Muso's answer, for the record, is completely unrelated to the files in question.  This is for a rather urgent project and I would seriously appreciate some help!
0
Comment
Question by:geod100
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
  • +3
11 Comments
 
LVL 10

Accepted Solution

by:
muso120999 earned 2000 total points
ID: 12330324
Sorry  geod100!

The only sensible offering I have here is:
http://www.kirupaforum.com/forums/archive/index.php/t-44279.html

Maybe someone else can provide a Flash 5 tutorial/example gallery that does work :-)

muso
0
 
LVL 13

Expert Comment

by:FLAASHER
ID: 12331450
its work
0
 
LVL 23

Expert Comment

by:Zeffer
ID: 12331887
I seem to recall flash 5 having a photo gallery in templates

file>new from template>photogallery

as I also recall..it was easy to configure.. and..it actually worked :)

Z
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 8

Expert Comment

by:Cerf
ID: 12332530
Hello there geod100,

I have been watching the code and the only thing that belongs to MX is Key.addListener Key.getCode at the very end. But it should not matter since it is a demo implementation.
You should still be able to use
on (release) {
      _root.changePhoto(1);      
}
and
on (release) {
      _root.changePhoto(-1);      
}
on buttons
-----------------------------------------------------------------
:Here's the part that won't work in Flash5 (Original Comments left):
// Actions
// these aren't necessary, just an example implementation
this.onKeyDown = function() {
      if (Key.getCode() == Key.LEFT) {
            this.changePhoto(-1);
      } else if (Key.getCode() == Key.RIGHT) {
            this.changePhoto(1);
      }
};
Key.addListener(this);

Let me know if this helps

Cërf.
0
 
LVL 8

Expert Comment

by:Cerf
ID: 12332554
Sorry, I too messed up with other questions...

Please post your code, so we can take a look at it
specially the part of:

this.pathToPics = "animation/";
// fill this array with your pics
this.pArray = ["image0.jpg", "image1.jpg", "image2.jpg", "image3.jpg", "image4.jpg", "image5.jpg", "image6.jpg", "image7.jpg", "image8.jpg", "image9.jpg"];
this.fadeSpeed = 20;
this.pIndex = 0;

...
0
 
LVL 8

Expert Comment

by:Cerf
ID: 12332578
So I did not messed up :-)
>There has been a hint that the problem is the presence of some MX code, but what code?
0
 

Author Comment

by:geod100
ID: 12334548
My code is exactly as above -- I didn't change it at all.
0
 
LVL 5

Expert Comment

by:badrulnm
ID: 12336229
Here's a quick fix you can do to make it works with Flash5:

// this.pArray = ["image0.jpg", "image1.jpg", "image2.jpg", "image3.jpg", "image4.jpg", "image5.jpg", "image6.jpg", "image7.jpg", "image8.jpg", "image9.jpg"];
this.pArray = ["image0.swf", "image1.swf", "image2.swf", "image3.swf", "image4.swf", "image5.swf", "image6.swf", "image7.swf", "image8.swf", "image9.swf"];
// Note: Flash5 cannot load jpeg, so you need to create your external image in swf format.

...

MovieClip.prototype.changePhoto = function(d) {
      // make sure pIndex falls within pArray.length
      this.pIndex = (this.pIndex+d)%this.pArray.length;
      if (this.pIndex<0) {
            this.pIndex += this.pArray.length;
      }
      // this.onEnterFrame = fadeOut();
      loadPhoto();
// Note: .onEnterFrame event handler is not available prior Flash6.
// We'll go straight to loadPhoto function because I think there's no way to just AS it in Flash5
// -- setInterval() is also post-Flash5.
};

...

MovieClip.prototype.loadPhoto = function() {
      // specify the movieclip to load images into
      var p = _root.photo;
      //------------------------------------------
      // p._alpha = 0;
      p.loadMovie(this.pathToPics+this.pArray[this.pIndex]);
      // this.onEnterFrame = loadMeter;
// Note: Disable set _alpa to 0 and .onEnterFrame event handler.
};

Again, this is a quick fix. Of course it would be nice to have fadeOut, fadeIn and loadMeter methods.
0
 
LVL 10

Expert Comment

by:muso120999
ID: 12442034
Thanks for credit for answering your question geod100, but has no-one else here helped you too?
0
 

Author Comment

by:geod100
ID: 12446242
I wasn't quite sure how this worked....
0
 
LVL 8

Expert Comment

by:Cerf
ID: 12446291
That's ok with me,
thanks for caring muso!
you rock

Cërf.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
The goal of the tutorial is to teach the user how to how to record live broadcast.
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question