PDA

View Full Version : HAve a look at my site and tell me how to correct something



Monsterkepating
August 22nd, 2001, 01:44 PM
www.btinternet.com/~hull.family

When you move over the squares how do I make it smooth so that when mouse over they grow, mouse roll out they shrink smoothly from whatever stage of growth they are either way?

Monsterkepating
August 22nd, 2001, 01:48 PM
It's my very first attempt so go easy, don't take the piss too badly. And explain in simple terms or show me an example.fla I can download. That's the easiest way I find to understand things.

eyezberg
August 22nd, 2001, 02:27 PM
Hi Michel,
nice intro/ 1st page...
What is the code used on your squares? Maybe it's just s'thing simple you need to change...
Or send the fla to joekiehl@hotmail.com (or even parts of it..)

joe (The Eyezberg)

kirupa
August 22nd, 2001, 06:11 PM
Hey Monsterkepating,
The intro page looks really nice. The buttons all transition in and out smoothly. I'm not seeing any jaggedness or loss in frame rates.

upuaut8
August 23rd, 2001, 02:17 AM
I think I see what you mean.. you've got it set to goto and play frame 1 when you roll over them, which means that no matter where you are in growing it resets to the first size before growing again.
I'd say don't worry about it, but that's probebly not what you want to hear. You're animations on those rollovers are really smooth.. better than I see on most sites.

If you really want to fix it, I can probebly come up with a solution.. it involves having buttons only located on particular frames so that the animation cannot do a rollover until it completes it's timeline.

Monsterkepating
August 23rd, 2001, 04:39 AM
Yeah I'm withthat buttons on certain frames, that would work okay. But let me ctry and get you to understand...

Right, the animation for each square is simple. First it's a grow with a stop action at the beginning and end. Then there's a shrink animation with stop actions at the begining and end. SO basically when it's mouse roll off then it jumps to the BEGINNING of the shrink animation.

To demonstrate this move over a square and then almost immediatley move off it. Notice how the square jumps to it's maximum size before it shrinks. This happens because that's what the animation is.

What I want to know is, is there away not to do this so that if you just move over it and then off quickly it will shrink from that size down to it's minimum.

Mikeylkzt
August 23rd, 2001, 08:27 AM
Wow, that sounds like a tough one to do just with frame animations. I suggest using some sort of actionScript that tells the property of the button or CLIP to increase its size a certain pixel and when rolled out decrease back to the original size. Im sure Thoripes will be able to figure it out.

Or maybe you can even make your tween into keyframes and on rollout back one frame at a time until it reaches the minimum point.

Mike

upuaut8
August 24th, 2001, 02:52 AM
There are a couple of different ways of accomplishing this. I'm working now on the a/s suggestion above. I believe it is the best (and smallest file size) way of accomplishing this.. we'll see.

eyezberg
August 24th, 2001, 03:52 AM
Yes, ActionScript it!
Make a controler clip (just script in it), 2 keyframes, 1st one with the script, 2nd one with gotoAndPlay 1st one (for the update). Script would be s'thing like onMouseOver -parent.clip._xscale +=2 and same for _yscale (that's in %).
This is NOT actionscript, just an explanation of what I mean..:-) Then you do the opposite onMouseOut, and put this little controller into your square-clip.
Get the point?

joe

Monsterkepating
August 24th, 2001, 04:47 AM
Yeah I understand, all my mates don't see it as a problem, (I'm a perfectionist you see), and would rather I finished the site and put in all the content. SO I think I'll do that. Also everyone finds the music really irritating so that'll have to change. he he he
Thanks though anyway guys!

Mikeylkzt
August 24th, 2001, 11:09 AM
here is a script i found on one of them tutorials in FlashKit.
First you make a button (just the hitState) and place it in a MC. Give the button the script
onMouseOver,DragOver
i=1
OnMouseOut,DragOut
i=0

then go to the main stage and place the MC.
Now all you have to do is use the script below on the MC and your good to go.

onClipEvent (load) {
i = 0;
}
onClipEvent (enterFrame) {
if (i == 1) {
_xscale = _xscale + (200 - _xscale)/6;
_yscale = _yscale + (200- _yscale)/6;
}
if (i == 0) {
_xscale = _xscale + (100 - _xscale)/10;
_yscale = _yscale + (100 - _yscale)/10;
}
}

Mikeylkzt
August 24th, 2001, 12:50 PM
Sample

upuaut8
August 24th, 2001, 07:54 PM
SWEET!!! thanks for stealing my wind and posting first.. you **** quick thinkers. :) (seems like a lot of you have more time than me.:( )

Monsterkepating
August 25th, 2001, 11:24 AM
The sxample is exactly what I was talking about!
But..
I'm a complete beginner, what is a MC?onMouseOver,DragOver
i=1
OnMouseOut,DragOut
i=0
What is the i thing all about?

Forgive my dumb assness.
MIKE

upuaut8
August 26th, 2001, 01:35 AM
MC's are movie clips.. one of three basic object types that flash uses.

i=1, is an action script (hence forth to be known as a/s) set variable command. In which the variable of "i" is set to a value of 1

onMouseEvent, is a command which you can give to either buttons or movie clips. It is always followed by another command, which is exicuted when the desired mouse state is achieved. In this case it is seting the variable above.

upuaut8
August 26th, 2001, 01:50 AM
Could you fill us in on how much you do know?

Do you know what the action script panel is?

eyezberg
August 26th, 2001, 06:33 AM
LOL!
...no comment, I'm still grinning :-)

upuaut8
August 26th, 2001, 07:38 AM
:) , now now Eyez.. we were all there once.

Pay no attentiion to the peanut gallery... we will help you as best we can.

Monsterkepating
August 26th, 2001, 10:28 AM
No, I'm not completely thick, I know what a Movie Clip is give me some credit and I know how to do the mouse over crap and all that stuff. How else do you think I'd done that much of a site?
You just made things sound all techie using TOT (the old tricks) of abreviating things in an annoying fashion.

As far as variables go I have never used them. Do you have to tell Flash to set a variable to a value at the start of the site? How do you tell it what i is?

eyezberg
August 26th, 2001, 12:43 PM
Hey, upu, I was not grinning 'bout the guys supposed Flash ignorance, but about the way yopu asked if he knew where the a/s panel is, still makes me lol...sorry, no harm meant!
As for variables in Flash, it is BETTER to declare them somewhere near the start, but you do not have to, as soon as you use the var's name for the 1st time, it will be declared. BUT at sometime you will have to set it, either when you introduce it (like var = 5), or when you wanna use it with a value...no tutorials on that on kirupa.com?
A variable can contain text as well as numbers, can be global to the movie or local in a clip or function, and so on..what do you wanna know? (don't remember what the post was about, alcohol kills braincells quite fast :-)..jokin'
Man, don't get offended, we all mean to help here I think..

upuaut8
August 27th, 2001, 07:08 AM
eyez - Just making sure... I was starting from ground zero.. just in case I was misinterpretting his experience.. I guess it was kind of funny thoughh :)

Sorry about that man.. I was not trying to insult your intelligence.. just get a feel for how complex we really should be getting.

Monsterkepating
August 29th, 2001, 01:54 PM
Okay it's been a while. I did exactly what you said, first trying it on just one box and it didn't work??

Okay, I've got the box, it's a movie clip and has just one frame, what it is in it's smallest state.

I also create a button with just the hitstate, so it's invisible, and place this on the main stage over this box I created.
I right clicked on this button on the main stage and got the action script box and put in what you said:

onMouseOver,DragOver
i=1
OnMouseOut,DragOut
i=0

Problem is I only have on Mouse Roll Over, not Mouse over but I guess this is the same.
So I do on mouse event and then check Roll Over and Drag Over and then put i as the variable and the thing as 1. Do I put 1 or "1" ???


Then on the box on the main stage also right clicking to put in the script I put in.

onClipEvent (load) {
i = 0;
}
onClipEvent (enterFrame) {
if (i == 1) {
_xscale = _xscale + (200 - _xscale)/6;
_yscale = _yscale + (200- _yscale)/6;
}
if (i == 0) {
_xscale = _xscale + (100 - _xscale)/10;
_yscale = _yscale + (100 - _yscale)/10;
}
}


Then I test the movie, and the bow just stays at it's first size.

I tired to do a test to make sure the variable was changing from 1 to 0 by having a simple movie to the side that would just show a big 1 or a big 0 respectively but this doesn't seem to be working. I think I need a tutorial on this as I'm cocking up somewhere but @#%$ knows where.

Monsterkepating
August 29th, 2001, 01:59 PM
Okay it's been a while. I did exactly what you said, first trying it on just one box and it didn't work??

Okay, I've got the box, it's a movie clip and has just one frame, what it is in it's smallest state.

I also create a button with just the hitstate, so it's invisible, and place this on the main stage over this box I created.
I right clicked on this button on the main stage and got the action script box and put in what you said:

onMouseOver,DragOver
i=1
OnMouseOut,DragOut
i=0

Problem is I only have on Mouse Roll Over, not Mouse over but I guess this is the same.
So I do on mouse event and then check Roll Over and Drag Over and then put i as the variable and the thing as 1. Do I put 1 or "1" ???


Then on the box on the main stage also right clicking to put in the script I put in.

onClipEvent (load) {
i = 0;
}
onClipEvent (enterFrame) {
if (i == 1) {
_xscale = _xscale + (200 - _xscale)/6;
_yscale = _yscale + (200- _yscale)/6;
}
if (i == 0) {
_xscale = _xscale + (100 - _xscale)/10;
_yscale = _yscale + (100 - _yscale)/10;
}
}


Then I test the movie, and the box just stays at it's first size.

I tired to do a test to make sure the variable was changing from 1 to 0 by having a simple movie to the side that would just show a big 1 or a big 0 respectively but this doesn't seem to be working. I think I need a tutorial on this as I'm cocking up somewhere but @#%$ knows where.

Mikeylkzt
August 29th, 2001, 03:45 PM
i see what you are doing wrong.

the first set of action script

on (rollOver, dragOver) {
i = 1;
}
on (rollOut, dragOut) {
i = 0;
}


This needs to be placed on the invisible button while it is still in the MOVIE CLIP (MC) before you place it on the main stage.

Once this is done,
take your MC and drag it on to your MAIN STAGE (main movie) then apply the second set of action script on the MC on the MAIN STAGE.

I hope this helps.

GDFoundation
August 29th, 2001, 03:47 PM
I believe Mano1 was the first to accomplish this using Tell Targets in Flash 3. At the time everyone was amazed, especially since the buttons he used were in 3D and I'm sure there's a ton of tutorials out there on how to do this in Tell Target. Just a little Flash history for you.

The actionscript way probably works too. I never took the time to learn it.

GD
www.gdfoundation.com (http://www.gdfoundation.com)

Monsterkepating
August 31st, 2001, 03:23 AM
Thanks I'll try that out and get back to you!

upuaut8
August 31st, 2001, 05:10 AM
just for the record: it's 1, not "1" (Good question!! 60% of your errors will turn out to be that simple little check box. :) )

I'm not sure about this talk of the button being in the movie clip before it goes onto the main stage. Can the person who stated this explain why it would work differently in each case?

Mikeylkzt
August 31st, 2001, 10:16 AM
Its actually a matter of preferrence. If the button is placed on the stage first and then the MC is placed on top of it, It's a lot harder to position the button and the MC together and grouping them specially in this case because the actionScript on the button drives the mouseOver scale (for the animation).

If they are already gouped while in the MC then all you have to do is add the actionScript to the MC and not bother with the button script.

I hope this isn't too confusing.