View Full Version : SWF inside another SWF, help please!
berkoWitZ
December 10th, 2003, 05:07 PM
ok, I want in the moment I pressed a button another SWF to come out in a corner with another options, I know I can do it with the LoadMovie command, but I donīt know exactly what to do?? help please!!
Inflicted
December 10th, 2003, 06:06 PM
You want another swf to load in a specific place?
berkoWitZ
December 10th, 2003, 06:08 PM
exactly but when I clic a button, I read something about movieclip target or something...
Inflicted
December 10th, 2003, 06:13 PM
What 's the code on your button?
berkoWitZ
December 10th, 2003, 06:16 PM
on(release) {
loadMovie("manda.swf",_root.container);
}
but when I export the movie it comes out an output screen ant it says: Symbol=send, Layer=Layer 1, Frame=1: Line 1: Mouse events are permitted only for button instances
on(release) {
Inflicted
December 10th, 2003, 06:25 PM
If you click your button, is the AS still to be seen in the actions window?
Can you post your fla?
lunatic
December 10th, 2003, 06:25 PM
Is your "send" symbol a movie clip instance or an actual button symbol?
berkoWitZ
December 10th, 2003, 06:26 PM
itīs a movie clip instance
berkoWitZ
December 10th, 2003, 06:31 PM
sorry I canīt post the FLA, I donīt have permission(itīs not mine)
lunatic
December 10th, 2003, 06:37 PM
lol!
on(release) is for actual "button" symbols. If yours is actually a movie clip then you want to use
send.onRelease = function() {
put actions here;
}
if your send button is not on the main timeline then you'll have to put the whole path before the "onRelease" part.
Hope that helps!
berkoWitZ
December 10th, 2003, 06:42 PM
ok I just made something, I used this AS
on (release) {
loadMovie("manda.swf", "container");
}
and it worked but after that my button disappear and the loaded swf appears in the center, and I want it in other place....?!?!?
lunatic
December 10th, 2003, 06:46 PM
So now your button is a button symbol? :h:
Leave the quotes off of container. You also might need to include the pathway to the container file, like:
on(release){
loadMovie("manda.swf", _root.container);
}
or wherever your container mc is.
berkoWitZ
December 10th, 2003, 06:51 PM
ok, Iīm almost done, but still my other SWF appears in other place and the only way I can change where it appers is by editing the manda.swf and changing the position there, and do you know why my button dissapears after I clic it?
lunatic
December 10th, 2003, 06:53 PM
:h: what do you mean by "appears in other places"?
Set your container clip where you want it on the stage. Take note of where the origin point is. Do same with external swf. It helps if they have an origin point in the same place, like upper left hand corner. Also helps if they are same size. If manda.swf is 500 x 600 say then having container be 500 x 600 will give you exactly the result you want.
Where is your button originally?
berkoWitZ
December 10th, 2003, 07:14 PM
ok, got it, I really aprecciate your help!! The only issue i have is when I clic the button, I clic it, ok the external SWF comes out but my button dissappears!! Do u know why? Thanks a lot!
Maizoon
December 10th, 2003, 08:01 PM
Probably because _root.container is on the same level as your button so its loading onto it. check this tutorial:
http://www.kirupa.com/developer/mx/loading.htm
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.