loadMovie bug

davbeer

Grünschnabel
Hi an alle!

Ich scripte gerade an meiner Flash HP und hab gerade ein großes Problem mit loadMovie..

Bei meiner Projektvorschau werden 5 Mcs nebeneinander erstellt, in die werden die ersten 5 Pics hineingeladen. Mit der Maus kann man die Mcs per klick nehmen und "weiterschupfen" (so ungefär wie beim iPhone die Listen). Funktioniert schon ganz gut, aber er soll, wenn ein mc auf der linken seite hinausfliegt, diesen auf der rechten seite wieder erscheinen lassen+ das nächste pic hineingeladen haben. Hierbei habe ich ein Problem!
Er will mir das nächste Bild einfach nicht anzeigen... und einen fehler, er könnte das bild nicht finden traced er auch nicht. :confused:

Hier das script:
Code:
onClipEvent (enterFrame) {
	
	boxx = 0;
	//create boxes
	if (_root.create) {
		for (i=1; i<=5; i++) {
			_root.shows.foto.duplicateMovieClip("pic"+i,i);
			if (i>1) {
				j = i-1;
				boxx = _root.shows["pic"+j]._x+(_root.shows["pic"+j]._width)+10;
			}
			_root.shows["pic"+i]._x = boxx;
			_root.shows["pic"+i]._y = 0;
			_root.shows["pic"+i].pic.loadMovie("Projects/pic"+i+".jpg");
		}
		_root.create = 0;
	}
	for (i=1; i<=5; i++) {
		//set the right scale for the pics
		if(((_root.shows["pic"+i].pic._width>80) &&(_root.shows["pic"+i].pic._width>_root.shows["pic"+i].pic._height)) ||(_root.shows["pic"+i].pic._width>88) &&(_root.shows["pic"+i].pic._width==_root.shows["pic"+i].pic._height)) {
			_root.div = (_root.shows["pic"+i].pic._height*80)/ _root.shows["pic"+i].pic._width;
			_root.shows["pic"+i].pic._width=80;
			_root.shows["pic"+i].pic._height=_root.div;
		
		}
		if((_root.shows["pic"+i].pic._height>80) &&(_root.shows["pic"+i].pic._width<_root.shows["pic"+i].pic._height)) {
			_root.div = (_root.shows["pic"+i].pic._width*80)/ _root.shows["pic"+i].pic._height;
			_root.shows["pic"+i].pic._height=80;
			_root.shows["pic"+i].pic._width=_root.div;
		}
		//set the right position for the pics
		_root.shows["pic"+i].pic._x = -(_root.shows["pic"+i].pic._width/2);
		//scale for mc = distance from middle
		if(_root.shows["pic"+i]._x<278.75) {
			_root.shows["pic"+i]._yscale =100-(278.75-_root.shows["pic"+i]._x)/5;
			_root.shows["pic"+i]._alpha =100-(278.75-_root.shows["pic"+i]._x)/2.7875; 
			_root.shows["pic"+i]._xscale =100-(278.75-_root.shows["pic"+i]._x)/5;
		}
		if(_root.shows["pic"+i]._x>278.75) {
			_root.shows["pic"+i]._yscale =100-(-(278.75-_root.shows["pic"+i]._x)/5);
			_root.shows["pic"+i]._alpha =100-(-(278.75-_root.shows["pic"+i]._x)/2.7875); 
			_root.shows["pic"+i]._xscale =100-(-(278.75-_root.shows["pic"+i]._x)/5);
		}
	}
	//count the speed to mc
			for (i=1; i<=5; i++) {
			_root.shows["pic"+i]._x += -_root.speed;
			
			if(_root.shows["pic"+1]._x==0) {
			boxx = _root.shows["pic"+1]._x;
			if (i>1) {
				j = i-1;
				boxx = _root.shows["pic"+j]._x+(foto._width)+10;
			}
			_root.shows["pic"+i]._x = boxx;
			}
			if (_root.shows["pic"+i]._x<-10) {
				boxx = _root.shows["pic"+i]._x+10;
				
				if (i<5) {
					k = i+1;
				}
				_root.shows["pic"+i]._x = 540+boxx;
				_root.shows["pic"+i].pic._x=0;
				_root.shows["pic"+i].pic._width=88;
				_root.shows["pic"+i].pic._height=80;
				/////////////////////////////////HIER//////////////////////////////////
				_root.shows["pic"+i].pic.loadMovie("Projects/pic"+_root.picpointer+".jpg");
				_root.picpointer +=1;
			}
			if (_root.shows["pic"+i]._x>550) {
				boxx = _root.shows["pic"+i]._x-550;
				if (i>1) {
					k = i-1;
				}
				_root.shows["pic"+i]._x = 0+boxx;
				_root.shows["pic"+i].pic._x=0;
				_root.shows["pic"+i].pic._width=88;
				_root.shows["pic"+i].pic._height=80;
				_root.shows["pic"+i].pic.loadMovie("Projects/pic"+_root.picpointer+".jpg");
				_root.picpointer -=1;
			}
			_root.shows["pic"+i]._y = 0;
		}
}
onClipEvent(mouseDown) {
	if((_root._xmouse>_root.shows._x) &&(_root._xmouse<_root.shows._x+_root.shows._width)&&(_root._ymouse>_root.shows._y-_root.shows._height+70)&&(_root._ymouse<_root.shows._y))
	_root.drag= true;
}
onClipEvent(mouseUp) {
	_root.drag= false;
}

vielleicht findet ja jemand den fehler.. danke im voraus:)
 
Hallo

evnetuell wird das Bild nicht schnell genug geladen. Ansonsten gib dir mal an genau der Stelle wo jetzt dein //////////HIER///////// ist per trace _root.picpointer aus. Was kommt da raus?

Gruß
 
Zurück