Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > Adobe Web Programming > Flash (all versions)
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old July 30th, 2004, 11:05 AM
Friend of Wrox
 
Join Date: Jun 2004
Location: Montreal, Quebec, Canada.
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
Reply With Quote
  #2 (permalink)  
Old September 17th, 2004, 12:23 PM
Friend of Wrox
 
Join Date: Sep 2003
Location: Madison, Wisconsin, USA.
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"
Reply With Quote
  #3 (permalink)  
Old September 20th, 2004, 03:36 AM
Registered User
 
Join Date: Sep 2004
Location: islamabad, , Pakistan.
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 :)

Reply With Quote
  #4 (permalink)  
Old September 20th, 2004, 03:39 AM
Registered User
 
Join Date: Sep 2004
Location: islamabad, , Pakistan.
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 :)

Reply With Quote
  #5 (permalink)  
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
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with loadMovie ocabrera70 Flash (all versions) 1 September 30th, 2007 12:43 AM
how to convert SWF to fla Shweta Flash (all versions) 26 May 19th, 2005 06: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 07:32 PM



All times are GMT -4. The time now is 10:04 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.