Funktionsparameter Übergabe Problem... [Flash 10]
| Beiträge: 9 Registriert: Jan 2012
| 04.02.2012, 11:17
Hallo Flashhilfeforum,
bin hier neu und blutiger Flashanfänger, deshalb dachte ich mal, meine Frage hier zu stellen.
Habe auch schon im Netz rumgesucht, aber leider keine richtige Lösung für mein Problem gefunden.
Ich habe eine Funktion in der Haupzeitleiste, die einen MC attachet und einen MC erstellt:
PHP:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
function thumb(){
//trace("Akko");
//container1.akkoThumb._visible = false;
attachMovie('btnFull','container1',2);
createEmptyMovieClip("container2",3);
var mcListener:Object = new Object();
var mcLoader:MovieClipLoader = new MovieClipLoader();
mcLoader.addListener(mcListener);
mcLoader.loadClip("img/01aBild.jpg");
mcListener.onLoadInit = function(mc:MovieClip)
{
mc._x = Stage.width/2-mc._width/2;
mc._y = Stage.height/2-mc._height/2;
container1.onRelease = function ()
{
container1.removeMovieClip("container1");
container2.removeMovieClip("container2");
}
}
}
|
Diese Funktion rufe ich aus einem anderen MC auf und möchte der Funktion mitteilen, wie der Pfad
zum dem passenden Bild lautet (also bei mcLoader.loadClip("img/01aBild.jpg"); ).
Ich dachte es würde ungefähr so gehen:
PHP:1 2 3 4
|
btnThumb.onRelease = function(){
_root.thumb(container2, "img/01aBild.jpg");
}
|
Das haut aber nicht hin...?
Habt Ihr einen Tipp für mich?
Gruß
Fossy | Geändert von Fossy am 04.02.12 um 11:28 Uhr | |
| | Beiträge: 3000 Wohnort: Köln Registriert: Oct 2007
| 04.02.2012, 11:22
|
|