flash problem (movie clip)
- Started
- Last post
- 13 Responses
- factoryxii
was wondering how do i put my MC in the center or any corner no matter ppl viewing in different reslotions still at same position? set 100%? or? plz help?any tutorial?
- dress-up0
search:
full-screen centered
- ********0
use a listener attached to the stage...you can try a google search for Flash liquid layout...if you want to center your MC in a Fullscreen Flash window, then put the code "clip_mc._x = Stage.width / 2"
hope that helps
- factoryxii0
couldn't find it in Ultrashock..@@
- wwfc0
...good starting point here:
http://www.tutorio.com/media/fla…or you could be lazy and cut, paste and tweak...
http://www.tutorio.com/media/fla…hope that helps
- PonyBoy0
exactly what wendog said...
... here's how you set up your stage listener:
http://www.adobe.com/support/fla…
Then - set up the function w/a statement like wendog gave you:
clip_mc._x = Stage.width/2;
clip_mc._y = Stage.height/2;note: make sure you center the contents of the movieclip... (so the lil 'x' is right in the middle)
... or if you leave your mc's justified to the the top-left... you'll need to subtract your mc divided in half also:
clip_mc._x = (Stage.width/2)-(clip_mc/2);
- factoryxii0
i download the file..but..not really works!!
can anyone fix it?
http://www.felel.com/member/test…
thank you:)
- PonyBoy0
that works fine, duder...
... are you not able to get it going online?...
... your zip file didn't include your auto-install javascript... perhaps you failed to upload that to your server when testing?...
... cuz it works just like it should when run inside the flash player (testing via flash < ctrl >< enter >)...
... but when I ran the html locally... it was asking for flashes auto install script.
- factoryxii0
works fine when i test movie in flash.but,when i view it in flash ,it shows scroll bar?
didnt i have a script call no scale ?
sorry im a newbie @_@
i just upload it again
- PonyBoy0
ohhhh...
... you want 'full browser flash' too...
... okay okay...
... first off... there's no need to make your stage 1700 x 1024...
... you can make it 500 x 500 for all I care...
...but if you're not setting up your html appropriately... you won't get a delightfully full browser flash piece... with NO html scrollbars...
... for that... I advise using Geoff Stern's 'swfObject'... it's very simple to implement - it degrades gracefully (the js)... and you don't need to bother w/Flash outputting your html and .js...
... just output the swf - and follow the rules over here:
http://blog.deconcept.com/swfobj…
He even gives you a full browser example here: http://blog.deconcept.com/swfobj…
Just grab that html page and replace the necessary data w/your own, then apply the #include info in flash, upload the swfObject.js file.... done!
- factoryxii0
thank you guys!!!!
Ponyboy thx!! this is awsome!!
its working!! there is only one problem! my preloader,do i have to set in the same frame of that actionscript to make it center? or type the as in another frame?
- PonyBoy0
glad it's working!
keep the preloader in that frame... give it some initial settings for it's _x and _y axis... put your stage listener on that frame too...
... that'll guarantee even if the user screws w/the window that the preloader will still center. :)
- factoryxii0
thnak you so much!!!!! PONYBOY ROCKS!!! :)
- fitsum0
if you're trying to place your movieclip in the center of the Stage:
clip_mc._x=(Stage.width/2)-(clip...
clip_mc._y=(Stage.wheight/2)-(cl...the prior examples will place the top left corner ofthe movieclip - and not the center of your clip like you want - in the Stage's center.