$movie->nextFrame() and AS in ming-dev?
"Laurent Cocea" <[email protected]> Sun, 30 Nov 2003 09:32:51 -0800 (PST)
| Newsgroups | gmane.comp.web.ming.general |
|---|---|
| Message-ID | <20031130093252.13949.h004.c009.wm@mail.canada.com.criticalpath.net> |
Hello,
Does anyone know/can explain why, if I split the actionscript code in
gazb's attachmovie online example at
http://www16.brinkster.com/gazb/ming/defaultframeset.asp?id=attachmovie,
over more than one frame as shown below in Sample A, the movieclip is no
longer draggable? On the other hand, if I merge AS in frames #3 and #4
as shown in Sample B, the movieclip _is_ draggable. Any helpful
sugegstions will be greatly appreciated.
Thanks.
-Laurent
------------------------------------
Sample A: movieclip is not draggable
------------------------------------
(...)
$movie->writeExports();
//$movie->nextFrame();
// frame 2
$strAction = "
_root.attachMovie('bev','bev1',11);
bev1.useHandCursor=0;bev1._x=100;bev1._y=100;
";
$movie->add(new SWFAction($strAction));
$movie->nextFrame();
// frame 3
$strAction = "
bev1.onPress=function(){ this.startDrag('');};
";
$movie->add(new SWFAction($strAction));
$movie->nextFrame();
// frame 4
$strAction = "
bev1.onRelease= bev1.onReleaseOutside=function(){ stopDrag();};
";
$movie->add(new SWFAction($strAction));
//$movie->nextFrame();
// save movie
$movie->save("/tmp/attachmovieA.swf");
--------------------------------
Sample B: movieclip is draggable
--------------------------------
(...)
$movie->writeExports();
//$movie->nextFrame();
// frame 2
$strAction = "
_root.attachMovie('bev','bev1',11);
bev1.useHandCursor=0;bev1._x=100;bev1._y=100;
";
$movie->add(new SWFAction($strAction));
$movie->nextFrame();
// frames 3 + 4 in Sample A, merged
$strAction = "
bev1.onPress=function(){ this.startDrag('');};
bev1.onRelease= bev1.onReleaseOutside=function(){ stopDrag();};
";
$movie->add(new SWFAction($strAction));
//$movie->nextFrame();
// save movie
$movie->save("/tmp/attachmovieB.swf");