|
|
 |
RE: FN-FORUM loading an SWF into a movieclip Flash MX
date posted 7th February 2003 13:16
Hi Marco,
You're failing to grasp some basics of 'onload' and the controlling of
animation using variables. Forget about levels - when using .onload an
independent .swf becomes 'part' of your main movie, therefore everything
is 'on' level0 and the imported movie can use and access existing
variables within 'both'.
The variables... you have put the variables 'on' button event. This is
wrong. 'titlebar = "Products";' should read '_root.titlebar ="Products"'
centralising the variable so it is easily accessible to any MC within
the movie; the same with the variable 'title'. Furthermore, for the
animation then to take place you have to tell Flash to initiate the
routines. You do not use 'Play()' as Flash won't know what you want to
play! To do this use 'tellTarget':
tellTarget (_root.whereverAniMCis) {
gotoAndPlay (1);
}
Within the example MC (whereverAniMCis) put some actionscript to check
the variables, eg. If (_root.titlebar == "Products")
{gotoAndPlay("titlebarP");}
I'm thinking off the top of my head so good luck!
Kai
monoliff
internet design and production
www.monoliff.com
-----Original Message-----
From: [EMAIL REMOVED]
[EMAIL REMOVED] On Behalf Of Marco Paparozzi
Sent: 07 February 2003 11:42
To: [EMAIL REMOVED]
Subject: RE: FN-FORUM loading an SWF into a movieclip Flash MX
Hi Mark
No, the play is for the website level 0....it sets variables then
animates the page out reads the variables and sends them to the right
page...animating in. Basically i have a section which is about 100kbs so
i want to load it on separately but it has to be on the same
level...i've tried everything
The external swf is also saved as a movie within the swf and also has
it's own preloader....if i could get it to load on the same level as the
website, in layer order then the jobs a good'n!!
thanks for all your help
Marco
-----Original Message-----
From: [EMAIL REMOVED]
[EMAIL REMOVED] Behalf Of DeVilliers , Mark
Sent: Friday, February 07, 2003 10:40 AM
To: [EMAIL REMOVED]
Subject: RE: FN-FORUM loading an SWF into a movieclip Flash MX
Marco
Is the play() to play the movie that has been loaded in ?
If so that movie is probably not available to be played - you need to
wait for it to be loaded before doing anything with it.
You might want to look into using an onLoad event e.g
myMovieClip.onLoad = function () {
trace ("hey.....I've loaded!!");
this.play();
};
Hope that helps
Mark
-----Original Message-----
From: Marco Paparozzi [EMAIL REMOVED]
Sent: 07 February 2003 09:07
To: [EMAIL REMOVED]
Subject: FN-FORUM loading an SWF into a movieclip Flash MX
Hi Everyone,
I've already asked this question, i got a couple of good responses but a
big thanks to Kai for helping me!!........for some reason it still won't
work....i'm banging my head on a brick wall as i type this!
on (rollOver) {
titlebar = "Products";
}
on (press) {
productspace.unloadMovie();
productspace.loadMovie("products.swf");
title = "Products";
play();
}
on (release, rollOut) {
titlebar = "";
}
where am I going wrong?!?!?!
thanks
Marco
|
 |
|