View Full Version : question!!??!!
Is it posible to say to a button, on push put that grafick,mc or button in the middle of the screen?here (http://www.tutchfor.nl/wgf/images/testt.swf) is a test swf from me. The goal is to make buttons that put the greanpeaple in the middle, you can see everey thing is growing slowly so i can't yuse cordinates.
abacsalmasi
01-21-2003, 03:11 AM
I'm kinda working on the same thing. I have a file from Flash Kit that has a lot to look at. I've almost figured it out. It's all about changing the locaton. Watch out for the "Actions" layer because the :actions" movie clip is in it, you just can't see it.
farafiro
01-21-2003, 08:20 AM
I think I didn't get u well, but u can use the new MX stage properties
_x = Stage.width/2
_y = Stage.height/2
farafiro
01-21-2003, 12:19 PM
make it manual then
dr.swank
01-22-2003, 12:21 PM
i think farafiro means this:
assuming your film is 500 x 800 pixels
_x=400// ie 1/2 of total width
_y=250//ie 1/2 of total height
there are a host of othewr options to do this, but this is the most rudementary.
cheers dr.s
thnx but i don't think this option will work with a growing movie see here (http://www.tutchfor.nl/wgf/images/testb1.swf)
dr.swank
01-22-2003, 12:34 PM
if your movie changes size then you can make a "backdrop" which is alway centered and the reference that.
what I mean is for example put an empty mc in the middle of the stage named:
centerPoint_mc
then add your placement code:
_x=_root.centerPoint_mc._x
_y=_root.centerPoint_mc._y
understand??
dr.s
farafiro
01-22-2003, 12:39 PM
swank's way around is cool, but if u r gonna increase it's _xscale and _yscale together, the _x and _y won't change
farafiro
01-22-2003, 12:44 PM
may I ask you a question:
do u try the code b4 posting or not??
farafiro
01-22-2003, 12:53 PM
so, sorry why saying it won't work, it will work like a charm, just put it in an enterFrame statment
well it works its quick but when the movie grows then the buttons gow to the rong place because of the fact that the place where i want him to go is' grown away with the mc
hey, cant i put a centerPoint_mc on evvery place in the movie that i want the buttons to gow geve them names and then say to the buttons: on (release) {
tellTarget ("_root.bg.centerpoint2") {
}
_x = 0;
// ie 1/2 of total width
_y = 0;
// ie 1/2 of total height
}
and tell the centerpoint2: onClipEvent (enterFrame) {
_x = _root.centerPoint_mc._x;
_y = _root.centerPoint_mc._y;
}
i tryed it butt it did'nt work?
Is flash Mx better than flash 5?
dr.swank
01-22-2003, 02:36 PM
is pizza better than crackers? is a cold beer better than a warm one?? is sitting in the sun at 30 degrees celcius while watching a sunset over a cuban beach better than taking the bus to work in Stockholm? is Lyle Lovett the ultimate asker of the infamous if question? in a word
yes.
:D
lol, but my ather questions bifore?
dr.swank
01-22-2003, 02:42 PM
one quick techie thing,
you could put all of you growing things in a single mc, grow that and reference the center anchor on _root. I should warn you though that you are going to have to spend some time getting your anchor points in you mc's right. I am refering to the location of the grafix in their own symbol instances. you should do this now as it will get even worse if you wait. I know, I made the same mistake once. Got a twitch in my left pinky toe from it, chronic condition
<twitches toe and slams shin into table leg; screams; mumbles something about the lousy insurance company!!...>
see what I mean.
dr.swank
01-22-2003, 02:45 PM
post your fla and i will have a gander.. :)
i'm making a fake movie first sow thats now problem
sorry but i don't understand the anser :s
dr.swank
01-22-2003, 02:50 PM
its called nesting. Make all of your faces and tvs and all... select them all and make a symbol out of it. name that allStuff_mc and then scale that. You can still reference everything inside it via it "adress":
allStuff_mc.smily1_mc.onRollover=function(){
play()}
etc.. and so on
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.