Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > Adobe Web Programming > Flash (all versions)
|
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Flash (all versions) section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 30th, 2004, 10:05 AM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Default Loading a SWF into existing FLA using LoadMovie

I'm trying to load a SWF into another FLA within set dimensions:
Here's the code:

_root.createEmptyMovieClip("MyMovie", "1");
_root.MyMovie.loadMovie("src/QL_intro.swf");
_root.onEnterFrame = function()
   {
      if(_root.MyMovie._width > 10)
         {
            _root.MyMovie._width = 240;
            _root.MyMovie._height = 180;
            delete _root.onEnterFrame;
         }
   }

HOWEVER, the movie loads but not into the MC instance MyMovie, I know because it is not scaled down to those dimensions but rather positioned/clipped at the bottom of the stage???

I've tried another way also:
By first creating the Movie Clip instance in the library setting it on stage at the right location with the right dimensions, but this does load it at all???
Here's that code:

loadMovie("src/QL_intro.swf", "MyMovie1");

Both of these code sets are triggered in the scene not the symbol.

Any help would greatly be appreciated!
Thanks All
 
Old September 17th, 2004, 11:23 AM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 451
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Ben Horne
Default

I would try applying that code inside the movie clip and see if that helps out any.

Hope this helps,



Ben Horne
LDS Test And Measurement, Inc



-------------------------
http://www.geocities.com/valerian5200/index.html

"There are two kinds of people in the world: Those who claim to be Flash junkies and those who actually are Flash junkies"
 
Old September 20th, 2004, 02:36 AM
Registered User
 
Join Date: Sep 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Devil
Default

nancy
Make a movie clip then name it in its properties then add follow code on your movie clip
onClipEvent (load) {
    _x = 10;
    // this 10 is your x position
    _y = 10;
    // this 10 is your y position
}
then add follow action on main frame
loadMovie("src/QL_intro.swf", "MyMovie1");
now you can load your swf and change its x or y position in script.
Have a fun :)

 
Old September 20th, 2004, 02:39 AM
Registered User
 
Join Date: Sep 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Devil
Default

Little Correction
nancy
Make a movie clip then name it in its properties "MyMovie1" then add follow code on your movie clip(MyMovie1)
onClipEvent (load) {
_x = 10;
// this 10 is your x position on stage
_y = 10;
// this 10 is your y position on stage
}
then add follow action on main frame
loadMovie("src/QL_intro.swf", "MyMovie1");
now you can load your swf and change its x or y position by changing its x or y value in script.
Have a fun :)

 
Old January 5th, 2011, 11:24 AM
Registered User
 
Join Date: Jan 2011
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

just create a new empty movieclip, and give it the instance name MyMovie, delete the first line of code that says create movie, then select the empty movie clip and place it in the top left corner of the stage





Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with loadMovie ocabrera70 Flash (all versions) 1 September 29th, 2007 11:43 PM
how to convert SWF to fla Shweta Flash (all versions) 26 May 19th, 2005 05:49 AM
loadMovie Problems Ben Horne Flash (all versions) 1 February 11th, 2005 07:17 PM
loadMovie causing window status problems Snib Flash (all versions) 0 July 21st, 2004 06:32 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.