SWF Scout |
How to dynamically load movieclip and manipulate it using actionscript
source code compiler in the SWF Scout library
Generated Flash movie (move mouse over move to see moving object): The main idea is: 1) add external movie as sprite (movieclip) using .AddExternalSWF In this sample we set mcl_shapes for new movieclip and then we move mcl_shapes up to mouse:
VB source code: ' ExternalSWF_AccessExternalMovieClipFromASCode.vbs W = 640
H = 480 Set Movie = CreateObject("SWFScout.FlashMovie") Movie.InitLibrary "demo", "demo" ' Movie creating and setting parameters Movie.BeginMovie 0,0,W,H,1,12,6 '////////////////////////// ExtSWF= Movie.AddExternalSWF ("Shapes.swf", 3, true) ' 3 is a Sprite mode so external movie is added as sprite and returned value is a sprite index in sprite collection Movie.PlaceSprite ExtSWF, Movie.CurrentMaxDepth Movie.PLACE_SetTranslate 0, 0 ' set new position ' now set name for added movieclip (sprite) so can manipulate with
it with actionscript ' compiling code for enterFrame event of mcl_shapes to move and
rotate movie clip to mouse Movie.ShowFrame 1 Movie.EndMovie Movie.SaveToFile "ExternalSWF_AccessExternalMovieClipFromASCode.swf" |
|
|
||