Mijn website www.floren.nl geeft een beetje problemen. Het gebeurt soms dat de foto's geladen in mijn slideshow ((portfolio) --> dan een willekeurige serie (boeren leven is nog niet af)) na een tijdje verdwijnen.
Het achterliggende actionscript:
Het achterliggende actionscript:
code:
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
| targetClip._visible = false;
//button used on implentation
backtomenu_btn.onRelease = function() {
gotoAndStop("portfolioframe")
}; // end of function
//
var x:XML = new XML();
x.load(xmlfile);
x.ignoreWhite = true;
var urls:Array = new Array();
var captions:Array = new Array();
var whoIsOn:Number;
x.onLoad = function() {
var photos:Array = this.firstChild.childNodes;
for(i=0;i<photos.length;i++){
urls.push(photos[i].attributes.url);
captions.push(photos[i].attributes.caption);
}
caption.text = captions[0];
totalSlides = urls.length;
whoIsOn = 0;
updateSlide();
}; // end of function
// Updates the current slide with new image and text
function updateSlide() {
slideText = captions[whoIsOn] ;
mcl.loadClip(urls[whoIsOn],targetClip);
loading._visible = true;
currentIndex = whoIsOn +1;
}; // end of function
// Event handler for 'Next slide' button
next_btn.onRelease = function() {
if(whoIsOn < urls.length -1){
whoIsOn++;
updateSlide();
}
}; // end of function
// Event handler for 'Previous slide' button
back_btn.onRelease = function() {
if(whoIsOn > 0){
whoIsOn--;
updateSlide();
}
}; // end of function
// movieclip loader for loading and positioning of image in middle
var mcl:MovieClipLoader = new MovieClipLoader();
var mclL:Object = new Object();
mcl.addListener(mclL);
mclL.onLoadProgress = function(target,loaded,total)
{
loading._visible = true;
targetClip._alpha = 0;
}; // end of function
mclL.onLoadInit = function()
{
if (targetClip._width > 0){
mcWidth = targetClip._width;
mcHeight = targetClip._height;
targetClip._x = ((600 - mcWidth) / 2) + 95;
targetClip._y = ((400 - mcHeight) / 2) + 109 ;}
loading._visible = false;
targetClip._visible = true;
targetClip._alpha = 0;
fadeImage();
}; // end of function
function fadeImage():Void
{
function startfade():Void{
targetClip._alpha +=1;
updateAfterEvent;
}
var myInterval:Number = setInterval(startfade, 20)//higher is slower
if(targetClip._alpha == 100)
{
targetClip._alpha = 100;
clearInterval(myInterval);
targetClip.cacheAsBitmap=true; //Turn Bitmap Caching ON
}
}; // end of function |
Ik kwam, Ik ben, En ik zal er altijd zijn