mediengestalter.info
FAQ :: Mitgliederliste :: MGi Team

Willkommen auf dem Portal für Mediengestalter

Aktuelles Datum und Uhrzeit: Fr 19.04.2024 11:31 Benutzername: Passwort: Auto-Login

Thema: neue swf-datei in sprite laden vom 25.01.2006


Neues Thema eröffnen   Neue Antwort erstellen MGi Foren-Übersicht -> Multimedia -> neue swf-datei in sprite laden
Autor Nachricht
Blink
Threadersteller

Dabei seit: 05.12.2005
Ort: Frankfurt
Alter: 43
Geschlecht: Weiblich
Verfasst Mi 25.01.2006 14:57
Titel

neue swf-datei in sprite laden

Antworten mit Zitat Zum Seitenanfang

Hallo alle miteinander,

ich möchte in meine index.swf -datei zwei weitere swf-files laden (movie1swf und movie2.swf), wenn die entsprechenden buttons geklickt wurden. hierzu gibt es auch ne menge postings in verschiedenen foren. ich bin dabei auch auf den begriff "sprite" gestoßen. dazu gibt mir die hilfe von flash mx nicht mal einen eintrag.
wie kann ich das denn am besten umsetzen?
die movie.swf-files sind ein stück kleiner als die index.swf.
ich wollte, dass die entsprechenden importierten moviefiles in so einem sprite unter meinen buttons ablaufen...
außerdem funzt das mit loadmovie nicht...kann mir da jemand helfen?

danke!
  View user's profile Private Nachricht senden
copic

Dabei seit: 09.07.2004
Ort: Stuttgart
Alter: 42
Geschlecht: Männlich
Verfasst Mi 25.01.2006 15:34
Titel

Antworten mit Zitat Zum Seitenanfang

Code:
loadMovie()
Availability
Flash Player 3.

Usage
loadMovie(url:String,target:Object [, method:String]) : Void
loadMovie(url:String,target:String [, method:String]) : Void

Parameters
url The absolute or relative URL of the SWF or JPEG file to be loaded. A relative path must be relative to the SWF file at level 0. Absolute URLs must include the protocol reference, such as http:// or file:///.

target A reference to a movie clip object or a string representing the path to a target movie clip. The target movie clip is replaced by the loaded SWF file or image.

method An optional parameter specifying an HTTP method for sending variables. The parameter must be the string GET or POST. If there are no variables to be sent, omit this parameter. The GET method appends the variables to the end of the URL and is used for small numbers of variables. The POST method sends the variables in a separate HTTP header and is used for long strings of variables.

Returns
Nothing.

Description
Function; loads a SWF or JPEG file into Flash Player while the original SWF file plays.

Tip: If you want to monitor the progress of the download, use MovieClipLoader.loadClip() instead of this function.

The loadMovie() function lets you display several SWF files at once and switch among SWF files without loading another HTML document. Without the loadMovie() function, Flash Player displays a single SWF file.

If you want to load a SWF or JPEG file into a specific level, use loadMovieNum() instead of loadMovie().

When a SWF file is loaded into a target movie clip, you can use the target path of that movie clip to target the loaded SWF file. A SWF file or image loaded into a target inherits the position, rotation, and scale properties of the targeted movie clip. The upper left corner of the loaded image or SWF file aligns with the registration point of the targeted movie clip. Alternatively, if the target is the root Timeline, the upper left corner of the image or SWF file aligns with the upper left corner of the Stage.

Use unloadMovie() to remove SWF files that were loaded with loadMovie().

Example
Usage 1: The following example loads the SWF file circle.swf from the same directory and replaces a movie clip called mySquare that already exists on the Stage:

loadMovie("circle.swf", mySquare);
// equivalent statement (Usage 1): loadMovie("circle.swf", _level0.mySquare);
// equivalent statement (Usage 2): loadMovie("circle.swf", “mySquare”);

The following example loads the SWF file circle.swf from the same directory, but replaces the main movie clip instead of the mySquare movie clip:

loadMovie("circle.swf", this);
// Note that using "this" as a string for the target parameter will not work
// equivalent statement (Usage 2): loadMovie("circle.swf", “_level0”);

The following loadMovie() statement loads the SWF file sub.swf from the same directory into a new movie clip called logo_mc that’s created using createEmptyMovieClip():

this.createEmptyMovieClip("logo_mc", 999);
loadMovie("sub.swf", logo_mc);

You could add the following code to load a JPEG image called image1.jpg from the same directory as the SWF file loading sub.swf. The JPEG is loaded when you click a button called myBtn_btn. This code loads the JPEG into logo_mc. Therefore, it will replace sub.swf with the JPEG image.

myBtn_btn.onRelease = function(){
  loadMovie("image1.jpg", logo_mc);
};

Usage 2: The following example loads the SWF file circle.swf from the same directory and replaces a movie clip called mySquare that already exists on the Stage:

loadMovie("circle.swf", “mySquare”);

See also
_level, loadMovieNum(), MovieClip.loadMovie(), MovieClipLoader.loadClip(), unloadMovie()

  View user's profile Private Nachricht senden
Anzeige
Anzeige
 
Ähnliche Themen Funktion (neueTXT-Datei laden) aus TXT-Datei aufrufen...
Flash: aus 2ter Ebene neue .html als _self laden
Zufällige CSS-Datei laden
In DIV Inhalte aus HTML-Datei laden
[Frage] txt-Datei in CSS-Rahmen laden
swf Datei mit dynamischen Text in Movieclip laden
Neues Thema eröffnen   Neue Antwort erstellen
MGi Foren-Übersicht -> Multimedia


Du kannst keine Beiträge in dieses Forum schreiben.
Du kannst auf Beiträge in diesem Forum nicht antworten.
Du kannst an Umfragen in diesem Forum nicht mitmachen.