View Full Version : Drag loaded SWF file
SuperNewby
12-07-2002, 11:11 PM
As my name suggests, I am a super Newby.
I am experimenting with a dragable MC that loaded an external swf-file. The dragfunction of the MC works allright, but as soon as I load the SWF-file (or jpg) with loadmovie the dragfunction does not work anymore. Is the MC replaced? How can I drag the loaded swf-movie?
Please advice.
Cees
snapple
12-08-2002, 01:41 AM
SuperNewby,
The attached is just a few buttons (that load the swf's) into a container MC and on the MC lies the drag actions.
Hope this is what you were after
snapple
SuperNewby
12-08-2002, 02:23 AM
Thanks Snapple,
I added: container.startdrag(true); in the first frame of
the container layer. I added a background to the container movie to make it visible. The container was dragged allright but as soon as I load a swf through one of the buttons the loaded swf is not dragable. And that is my basic problem.
Kind regards
Cees
snapple
12-08-2002, 06:07 PM
SuperNewby,
All you have to do is put this action on your MC inside your loaded swf :
on (press) {
_root.container.orange.startDrag(this);
}
on (release) {
_root.container.orange.stopDrag ();
}
Orange is the instance name of the MC inside your swf, i made my MC the whole background, that way, it menas you can drag the whole loaded movie. Container is the mc that holds the loaded swf.
Worked for me
Regards, snapple :)
SuperNewby
12-08-2002, 08:02 PM
That is getting me closer to my ultimate goal but in a way is a disappointment because the solution is in the loaded swf.
This because my conclusion is that I cannot use nonsource MC's from third parties for dragpurposes and that I have to pack every external picture in a swf in order to get it dragable. My ultimate goal however is to make a fading pictureslide including controlbuttons draggable over the screen. Now I load the slidemodule via XML file and in the slide swf every individual picture is loaded controlled by an XML file. By packing the pictures as swf files they will however supersedes the slide swf with controls in the dragfunction. The XML solution is chosen because in my application the slides and pictures have to be updated quite regularly and I thougt this methos would be the one to follow.
But your advice solved my basic problem anyway because I was searching for a solution in thge root level and that was wasted time.
Kind regards
Cees
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.