...

View Full Version : pic_arr =???



chuckt
03-09-2005, 10:53 AM
The following is the slideshow im trying to get to work from a tutorial.
I want to place it on a site im working on but when I do it don't work. I imagine its the // specify pic locations. I guess Im to new to figure this out my self I've used every combination. My slideshow and pics are in a folder on my serverside ftp called fmx_slideshow. How would I specify this in line 1.
It works fine on my computer using FMX04'.
Thanks Chuck :)

pic_arr = ["01.jpg", "02.jpg", "03.jpg", "04.jpg", "05.jpg", "06.jpg", "07.jpg", "08.jpg", "09.jpg", "010.jpg", "011.jpg"];
var color_arr = [0xf75eb0, 0xf6f818, 0xbb57c8, 0xdf1734, 0xfe9809];
var currentSlide = 0;

// specify pic locations, alpha increment each frame, and
// number of frames to keep current picture displayed before
// transitioning to the next one

this.attachMovie("slideshow", "show", 1, {
_x:0, _y:0, _visible:false, fps:12, nFrames:24, alphaIncr:10,
slides_arr:pic_arr, slideDepth:1, repeat:true,
slideTracker:"currentSlide"});

// tell _root (this) to listen for events broadcast by show
show.addListener(this);

this.onSlideLoaded = function(i) {
(new Color(this["dot"+i+"_mc"])).setRGB(color_arr[i]);
// trace('slide '+ i + ' loaded');
};

this.onAllSlidesLoaded = function() {
show._visible = true;
show.beginTransitions();
};

this.onShowOver = function() {
//set repeat:false in show for this to be called
//trace('slideshow is over');
};

toggle_mc.onRelease = function() {
// if playing
if (this._currentframe == 1) {
this.gotoAndStop("stopped");
// stop the show on the current slide
show.stopTransitions();
// make sure current picture is displayed at 100 alpha
for (var t=0; t<pic_arr.length; t++) {
if (t==currentSlide) {
show["slide"+t]._alpha = 99;
} else {
show["slide"+t]._alpha = 0;
}
}
// if stopped
} else {
// start up transitions from current slide
this.gotoAndStop("playing");
show.activateInSeq(currentSlide);
}
};

vwphillips
03-09-2005, 02:03 PM
I have not looked at the slide show but to attach a common directory path to the image



MyPath="fmx_slideshow/";
pic_arr = ["01.jpg", "02.jpg", "03.jpg", "04.jpg", "05.jpg", "06.jpg", "07.jpg", "08.jpg", "09.jpg", "010.jpg", "011.jpg"];
for (i=0;i<pic_arr.length;i++){
pic_arr[i]=MyPath+pic_arr[i];
}

chuckt
03-10-2005, 12:28 AM
the slideshow tutorial with files zip.(last page of tut) is here http://www.wildform.com/tutorials/slideshowcomponent/
they have great scripts and all, but no help offered.

I tried your suggestion and it still did nothing.

Would someone mind taking a lil' time to check this out. This would be an awesome slideshow for the site Im building. I'm just not up to date with javascript "yet".
TYIA

Chuckt :)

_Aerospace_Eng_
03-10-2005, 12:34 AM
okay so i looked at the .fla file, this is in the wrong forum since flash is not javascript, the stuff you see in the .fla file is actionscript, why can't you link to the images, i did it and it worked fine, if you look in the first frame, under the action panel this is where u define the images, this should work

pic_arr = ["fmx_slideshow/01.jpg", "fmx_slideshow/02.jpg", "fmx_slideshow/03.jpg", "fmx_slideshow/04.jpg", "fmx_slideshow/05.jpg", "fmx_slideshow/06.jpg", "fmx_slideshow/07.jpg", "fmx_slideshow/08.jpg", "fmx_slideshow/09.jpg", "fmx_slideshow/010.jpg", "fmx_slideshow/011.jpg"];

chuckt
03-10-2005, 01:17 AM
thanks for tryin. sorry wasnt paying attention to what type of script it was lol.

I didnt see an actionscript forum available here. so thanks again. and thanks for your help! :thumbsup:

it still didn't work though. once i put it on a page and uploaded it i got the flash but pictures wouldn't var Hmmm im stumped. :)

_Aerospace_Eng_
03-10-2005, 01:39 AM
in the zip file that you download from the site the images are in the same folder as the flash file perhaps put them in the save folder just for this flash file? can you post a link to your page with the flash on there

chuckt
03-10-2005, 01:33 PM
http://texashotboats.com/index2.php

I got it to play in dreamweaver and in flash but not from my browser :)

_Aerospace_Eng_
03-10-2005, 02:00 PM
so you are just trying to recreate this swf by making your own layers and such? even when its already premade in the .fla files and works? hmm i think this could be a server issue, you have hotlinking disabled on your server, i think its created a problem for the flash file when its trying to access the images

chuckt
03-10-2005, 02:04 PM
yes but even when I try it with all the original files it is still not showing up on site.
Do you have a pay pal account? I will pay you to help me get this going!

chuckt
03-10-2005, 02:11 PM
I hot link from our thb forums it seems to work fine.

_Aerospace_Eng_
03-10-2005, 02:12 PM
as said in my post just before urs, i think its due to the fact that you have hotlinking disabled on your server, which is creating the problem, because it worked on your system where there were no restrictions, look at this site(CLICK ME) (http://home.austin.rr.com/fairpoolerz/slideshow/), its your same flash file working on my server

chuckt
03-10-2005, 02:23 PM
I disabled hot linking protection from cpanel
and I'm not seeing it on your site either. hmm maybe I have something not setup right in my browser any suggestions? I checked to see if active x is enabled and it is I also updated it. and still nothing.

_Aerospace_Eng_
03-10-2005, 02:36 PM
you have a firewall of some sort?

chuckt
03-10-2005, 02:37 PM
Do you think it has something to do with the component in the action script inside the fla. Do I need to embed some plug-in or something else in the page.

chuckt
03-10-2005, 02:40 PM
yes I tried that too.
but that would mean ev1 with a firewall setup wouldnt see movie as well.

_Aerospace_Eng_
03-10-2005, 02:47 PM
no it wouldn't what firewall do u have, not everyone has the same firewall, i have one and see the flash fine? zonealarm is known for not allowing active x controls, could also be spybot, yes i know y spybot well it tries to "block" the bad activex controls

chuckt
03-10-2005, 02:52 PM
McAFee

_Aerospace_Eng_
03-10-2005, 02:53 PM
have u tried disabling it temporarily just to see if the flash (http://home.austin.rr.com/fairpoolerz/slideshow/) works?

chuckt
03-10-2005, 03:08 PM
yes and also i disabled windows firewall.

chuckt
03-10-2005, 03:24 PM
I figured it out!
While saving ffrom .fla to .swf it was compressing the movie therefor it was uploading it as compressed. I simply disabled compression nad saved it and it works.
Thank You for your help.
I posted for help in actionscript.org and a couple of others as well and not one person was willing to help. and this forum don't even pertain to my work.
If I can pay you something just let me nknow where. :thumbsup: :) :thumbsup:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum