This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Flash Site Design > August 2005 > centering images in an empty movie clip
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
centering images in an empty movie clip
|
|
| macron 2005-08-25, 11:25 pm |
| i have a holder mc that is going to be used for centering images, but i don't
want it to appear on the screen until the user clicks on a thumbnail. my
question is, assuming you have the holder mc in your library, how do you
instruct flash to put that that movie clip on the stage at specified X and Y
coordinates?
cheers,
macron.
| |
| Hudey 2005-08-25, 11:25 pm |
| From the Flash MX 2004 Help files:
loadMovie()
Availability
Flash Player 3.
Usage
loadMovie("url",target [, method])
Parameters
url The absolute or relative URL of the SWF file 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 path to a target movie clip. The target movie clip will be 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 is playing.
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
between SWF files without loading another HTML document. Without the
loadMovie() function, Flash Player displays a single SWF file and then closes.
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
The following loadMovie() statement is attached to a navigation button labeled
Products. There is an invisible movie clip on the Stage with the instance name
dropZone. The loadMovie() function uses this movie clip as the target parameter
to load the products in the SWF file into the correct position on the Stage.
on(release) {
loadMovie("products.swf",_root.dropZone);
}
The following example loads a JPEG image from the same directory as the SWF
file that calls the loadMovie() function:
loadMovie("image45.jpeg", "ourMovieClip");
See also
_level, loadMovieNum(), MovieClipLoader.loadClip(), unloadMovie()
| |
| Jeckyl 2005-08-25, 11:25 pm |
| Sorry .. lovely copy and paste job, but not the appropriate bit of the help.
It won't solve the posters problem.
Look at MovieClip.attachMovie() instead
I won't do the cut and paste .. just look it up in the AS dictionary in the
help for yourself.
--
Jeckyl
| |
| macron 2005-08-25, 11:25 pm |
| cheers, thanks jeckyl.
i've gotten lazy - i always tend to go to the forum first.
m.
| |
| Jeckyl 2005-08-25, 11:25 pm |
| I prefer referring people to the help for themselves . .because once you get
there, there are links to other related topics etc and you'll end up
probably learning more that just what you went looking for.
Note only that, I'm too lazy as well to be bothered copying and pasting :):)
--
Jeckyl
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|