Welcome, Guest
Sign in
Create account
Home
Home Page
Components
Buy & Sell
Freelance
Marketplace
Tutorials
Flash Tutorials
Games
Free Online Games
Community
Message Board
Home
Help
Search
Login
Register
Subscribe to
Our Feed
Follow Us
On Google +
Follow Us
On Twitter
Become a fan
On Facebook
Flash-DB
»
General
»
Flash 8
(Moderators:
Jorge Solis
,
..:: Mazhar Hasan ::..
,
Andresss
) »
Load movie in empty mc
« previous
next »
Print
Pages: [
1
]
Author
Topic: Load movie in empty mc (Read 2437 times)
koko2
Server what's that
Posts: 21
Load movie in empty mc
«
on:
05/22/06, 12:27 »
hi, I don't know if there's a topic on this one but here's my question anyway.
I would like to load an extern movieclip into a empty movieclip in my 'main movie"
For example....
I have a main.swf and a load.swf
main.swf: width = 800 height = 450
load.swf: width = 250 height = 150
In the main.swf movie I created a empty movieclip and I want to load the load.swf exactly in the place where the empty movieclip is.
Could someone write me the actionscript, and tell me where do I have to place it.
Thanks
Logged
Jorge Solis
Global Moderator
Systems Administrator
Posts: 14616
Re: Load movie in empty mc
«
Reply #1 on:
05/22/06, 13:37 »
Put your empty MovieClip (it appears as a blank point) in the place where you want to load the external movie, the blank circle represents the left upper corner. Give your empty MovieClip an instance name of holder and in the same frame use:
holder.loadMovie("load.swf")
Jorge
Logged
Twitter
http://twitter.com/solisarg
koko2
Server what's that
Posts: 21
Re: Load movie in empty mc
«
Reply #2 on:
05/22/06, 14:45 »
thanks for the help
But... it I can't get it running
So I have to place the empty movieclip somewhere on the stage and name it: 'holder'
then on the same frame put this as an action: holder.loadMovie("load.swf")
and ofcourse put the load.swf in the same directory as the main.swf
Logged
Jorge Solis
Global Moderator
Systems Administrator
Posts: 14616
Re: Load movie in empty mc
«
Reply #3 on:
05/22/06, 15:03 »
Rigth. When I say name, should say: instance name (in the property inspector) Try harder, isn't too difficult
Jorge
Logged
Twitter
http://twitter.com/solisarg
koko2
Server what's that
Posts: 21
Re: Load movie in empty mc
«
Reply #4 on:
05/22/06, 15:17 »
Thanks
Logged
koko2
Server what's that
Posts: 21
Re: Load movie in empty mc
«
Reply #5 on:
05/23/06, 03:38 »
Is it possible to change the size of the movie that is loaded?
For example the has a width of 300 and a height of 200
Then if I decide that I want to have the movie smaller after loaded in.....
Is it possible to set the movie size of the movie that I loaded without changing the original file?
And the loaded movie doesn't also play in it's original frame rate.... Is there a way to let the loaded movie play at a different framerate then the "target movie" ?
Logged
Jorge Solis
Global Moderator
Systems Administrator
Posts: 14616
Re: Load movie in empty mc
«
Reply #6 on:
05/23/06, 03:47 »
Main movie FPS is mandatory, no way of changing it. About size, try:
holder._xscale = 50
holder._yscale = 50
But you need a preloader, because if you runs before it finish loading, takes not effect. Check the tons of post about preloading
Jorge
Logged
Twitter
http://twitter.com/solisarg
koko2
Server what's that
Posts: 21
Re: Load movie in empty mc
«
Reply #7 on:
05/23/06, 15:04 »
One more question....
I created a square(strokes only) inside my "empty" movieclip with the same width and height as the load.swf. I did this so that I could see where exactly the load.swf will appear.
But the load.swf doesn't realy appear in that place..... it also looks a bit bigger.
Is there a way that I can load the load.swf exactly in the movieclip or some other way that I can see where exactly the load.swf will appear ?
I know that, if the movieclip is totaly empty, the blank circle represents the left upper corner, but I can't see where the whole load.swf will appear.
Logged
Jorge Solis
Global Moderator
Systems Administrator
Posts: 14616
Re: Load movie in empty mc
«
Reply #8 on:
05/23/06, 15:42 »
You can use:
holder._width = 50
holder._height = 50
To constraint the size of the loaded swf. Again, if you don't wait until totally loded (that means add a preloader) the resize will not have effect.
Jorge
Logged
Twitter
http://twitter.com/solisarg
Print
Pages: [
1
]
« previous
next »
Flash-DB
»
General
»
Flash 8
(Moderators:
Jorge Solis
,
..:: Mazhar Hasan ::..
,
Andresss
) »
Load movie in empty mc