Groups | Blog | Home
all groups > flash (macromedia) > may 2004 >

flash (macromedia) : I need some help with the Flash MX "Using Flash"


JBiggles
5/30/2004 11:38:20 PM
Hi,

In the "Using Flash" help files on "Detecting collisions" article it has
text on detecting collisions and then it says ...(see shape_flag.fla):
and there is no "shape_flag.fla" in the folder Flash
MX/Help/Flash/html/movies (which is were the file shape_flag.swf is
located). Can anyone help me? Am I looking in the wrong place?

Thank You,

Habitmaster
5/31/2004 9:50:16 AM
I found a swf file at thise folder address: C:\Program Files\Macromedia\Flash
MX 2004\en\First Run\HelpPanel\Help\ActionScriptReference\movies
But there is no fla. Maybe there is upgraded help content available for
download.

Will
gahbhungga!;pa
5/31/2004 3:52:57 PM
gahbhungga!;pa
5/31/2004 3:52:59 PM
JBiggles
6/1/2004 10:34:00 AM
Hi,

I don't necessarily need an fla, I could do without except that the tutorial
seems to be cut off or something, it just suddenly ends and never explains
what it's supposed to be doing.

Here is the tutorial, if anyone can understand this pleas tell me.


To perform collision detection on two movie clips (see hit_test.fla):

1 Drag two movie clips to the Stage and give them the instance names car and
area.
2 Create a dynamic text box on the Stage and enter status as the instance
name in the Property inspector.
3 Select area and choose Window > Actions if the Actions panel is not
already visible.
4 To apply the hitTest test, in the Actions toolbox, click the Actions
category, click Miscellaneous Actions, and double-click evaluate. Enter the
following code in the Expression text box:
_root.status=this.hitTest(_root.car);

Flash automatically adds the onClipEvent handler.
5 Highlight the onClipEvent action and select enterFrame as the event.
6 Select car from the jump menu at the top of the Actions panel.
7 To apply movement to the car, in the Actions toolbox, click the Actions
category, click Movie Clip Control, and double-click startDrag.
8 To limit the car's movement, select the Lock Mouse to Center and Constrain
to Rectangle options, and enter 4 for Left, 70 for Top, 396 for Right, and
273 for Bottom.
Flash automatically adds the onClipEvent handler.
9 Highlight the onClipEvent action in the Script pane and choose the Mouse
down event.
Your code should look like this:
onClipEvent (mouseDown) {
startDrag("", true, 4, 70, 396, 273);
}

10 To stop the car, in the Actions toolbox, click the Actions category,
click Movie Clip Control, and double-click stopDrag.
Flash automatically adds the onClipEvent handler.
11 Highlight the onClipEvent action in the Script pane and choose the Mouse
up event.
Your code should look like the following code:
onClipEvent (mouseDown) {
startDrag("", true, 4, 70, 396, 273);
}
onClipEvent (mouseUp) {
stopDrag();
}

12 Choose Control > Test Movie and drag the movie clip to test the collision
detection.
Whenever the bounding box of the car intersects the bounding box of the
area, the status is true.



I tried it over and over and it doesn't work. Maybe it's that I don't know
how to use dynamic text boxes. Do you have to write true/false in the
dynamic text box?

If anyone knows what I did wrong pleas tell me (I'm using MX not MX2004).

Thank You

IwannaFlashU
6/3/2004 1:19:57 PM
Like the very first poster to this thread, I too cannot find the hit test fla
file and I came here, looking for it.

Concerning the help file example, JBiggles, you did nothing wrong. The problem
is in the directions and anyone who follows them precisely, as you did, will
not get it to work either.

The directions say to give the dynamic text box an INSTANCE name of "status".
What it SHOULD say is, enter "status" in the VARIABLE name box. You can leave
the instance name blank or name it whatever you want, to include "status".

But if you do not enter "status" in the variable name property box, for the
dynamic text box, it will NOT work.

Hope this helps.

phatkow
6/3/2004 2:28:07 PM
Originally posted by: gahbhungga!;pa
how do you keep people from cheating in flash games by rigth clicking and pressing forward?

JBiggles
6/7/2004 11:33:49 PM
Thank You!

It worked!


AddThis Social Bookmark Button