| |||||||
Du magst keine Werbung? Wir auch nicht!
Einfach registrieren und die Werbung ist weg. Diese Nachricht sehen nur nicht registrierte Nutzer.
![]() |
| | LinkBack | Themen-Optionen | Ansicht |
| | #1 (permalink) |
| Neuer User Registriert seit: Jan 2004 Ort: bei Düsseldorf
Beiträge: 76
| onMouseDown löst Aktion im Hauptfilm aus,obwohl es in einem extra MC steht
Hallo zusammen, erstmal vorweg: Ich nutze MING um meine Swiffs zu erstellen. Ich hab folgenden PHP zum testen erstellt und per PHP in MING "compiliert". Soweit funktioniert das auch ganz gut. Mein Problem ist jetzt: Wenn ich irgendwo im Flash Film Clicke,dann wird die Datei Test.html geöffnet. Warum passiert das nicht nur,wenn ich im MC "btn" clicke? Gibt es eine bessere Möglichkeit in ActionScript Buttons zu erstellen? Danke schonmal, SIGINT Code: <?
ming_setScale(20.00000000);
ming_useswfversion(6);
$movie = new SWFMovie();
$movie->setDimension(550,400);
$movie->setBackground(0xcc, 0xcc, 0xcc );
$movie->setRate(31);// mx actionscript
$strAction ="
_root.createEmptyMovieClip('someshapes', 9);
_root.createEmptyMovieClip('mt', 2);
_root.createEmptyMovieClip('btn', 3);
_root.btn.setBackground(0xcc,0x00,0xcc);
with(_root.btn)
{
lineStyle(2, 0x00ee00, 100);
beginFill(0x00cc00, 50);
moveTo(0,0);
lineTo(100,0);
lineTo(100, 100);
lineTo(0,100);
endFill();
onMouseDown=function(){_root.getURL('test.html');};
_width=100;
_height=100;
}
with (_root.someshapes) {
lineStyle(2, 0x00ee00, 100);
beginFill(0x00cc00, 50);
moveTo(0,0);
lineTo(200, 150);
lineTo(80, 210);
endFill();
lineStyle(3, 0x00eeee, 30);
beginFill(0x0000cc, 60);
moveTo(180, 130);
curveTo(200, 80, 250, 70);
curveTo(200, 10, 40, 90);
endFill();
}
_root.onMouseOver=Mouse.hide();
_root.mt.startDrag(true);
_root.createTextField('textf',0,400,0,40,20);
_root.textf.maxChars=30;
_root.textf.type='static';
";
$movie->add(new SWFAction(str_replace("\r", "", $strAction)));
$movie->nextFrame();
$strAction2="
_root.textf.text=_root.mt._x;
_root.someshapes._x=this.mt._x;
_root.someshapes._y=this.mt._y;
";
$movie->add(new SWFAction(str_replace("\r", "", $strAction2)));
$movie->nextFrame();
$movie->add(new SWFAction("gotoAndPlay(2);"));
$movie->nextFrame();
header('Content-type: application/x-shockwave-flash');
$movie->output(4);
?> |
| | |
| | #2 (permalink) |
| brand new user Registriert seit: May 2002 Ort: Laimbach 6 1/2
Beiträge: 16.884
| PHP-Code:
__________________ Bitte keine Fragen, zu Flash per PM. Dazu ist das Forum da. Danke MFG_RustyCake! "Wer tanzen will, muß erst gehen lernen" |
| | |
| | #3 (permalink) |
| Neuer User Registriert seit: Jan 2004 Ort: bei Düsseldorf
Beiträge: 76
|
Ich kann dieses "with (irgendwas) {}" nicht leiden. Wenn ich dein Script in die "with - Umgebung" stelle,dann Funktioniert nichts, aber folgendes läuft perfekt: Code: _root.btn.onMouseDown = function() {
if (_root.btn.hitTest(_root._xmouse, _root._ymouse)) {_root.getURL('test.html');}
}; SIGINT |
| | |
![]() |
| Lesezeichen |
| Themen-Optionen | |
| Ansicht | |
| |