PDA

View Full Version : loading movie at correct size and altering the postion


hansolo
12-12-2010, 11:19 PM
how can i get the file to load at the correct size by using the onloadInit ..
at the moment the file is loading but its loading in the centre.




var loader = new MovieClipLoader();
loader.onLoadInit = function (mc1)
{
// target movieclips size
mc1._width = 800;
mc1._height = 800;
}


var loader:MovieClipLoader = new MovieClipLoader();

loader.loadClip(names2,mc1);

tacos
12-13-2010, 01:43 AM
I'll be shorter than asf8, you can't! ;)

As you're now trying to do it...

hansolo
12-13-2010, 10:43 PM
tacos you can by loading the movieclip and altering the postion from the centre. also by loading into moviclip which you are able o move on stage. as loads in the centre then alter the position by half y axis and then the x axis.
which positions the movieclip in the centre..

neilmmm
12-13-2010, 11:27 PM
does this function work

loader.onLoadInit = function (mc1)
{
// target movieclips size
mc1._width = 800;
mc1._height = 800;
}

put a trace in it

loader.onLoadInit = function (mc1)
{
// target movieclips size
trace("called")
mc1._width = 800;
mc1._height = 800;
}

hansolo
12-22-2010, 10:11 PM
ive got something similar to that code. which some one wrot at work. It does work the code they have wrote that how i new it was possible.
However when i tried to copy what they have wrote. it didnt work...

so this why i posted


so i will try what you have wrote . see if make more sense and take my time.

the init stands for intialisation ?

asf8
12-23-2010, 02:48 AM
the init stands for intialisation ?

Again, reviewing the docs would be a big help to you.

onLoadInit
http://help.adobe.com/en_US/AS2LCR/Flash_10.0/help.html?content=00001385.html
MovieClipLoader
http://help.adobe.com/en_US/AS2LCR/Flash_10.0/help.html?content=00001377.html
MovieClipLoader.addListener
http://help.adobe.com/en_US/AS2LCR/Flash_10.0/help.html?content=00001378.html

hansolo
01-02-2011, 06:22 PM
asf8 i can load the movieclip nd ive used the loader. not sure what qeustion you are reffering to.

Just might help if you are more specific on what you are refferring to ok

asf8
01-02-2011, 07:44 PM
not sure what qeustion you are reffering to.Just might help if you are more specific on what you are refferring to ok

Likewise, I have no idea what your talking about with your last post hansolo?

However if you can't comprehend how the Flash Help Docs would help you with your porblems as I mentioned above, then I guess I cant help you anyway. I assume you got it working and are just here to discount using any type of learning resource, similar to your comments about the help docs, tutorials, etc.. in your past posts.

:p Giddy Up.