Solved

simple buttons

Posted on 2003-11-12
8
213 Views
Last Modified: 2010-04-03
hi
i have a simple movie and have few trucks come across the screen and all of that is a movie
the trucks are graphics and have a recktengular drown  on it and on top of that they have text written onit
i want them as they come in across to stop and act as buttons so when you press on them it takes you to a new scene
can anybody please help me
i tried everything i could
i converted the whole thing on the main movie scene to buttons
i added actions
i even click on the truck twice and grouped it and converted to button and then added action i have no idea what the hell is going on
can anybody help
i am using flash mx not mx 2004
thanks
0
Comment
Question by:macipod
8 Comments
 
LVL 39

Expert Comment

by:blue-genie
ID: 9738000
why don't you just add invisible buttons (ie. with only a hit stage) in the frame where the truck stops, convert the rectangle you have ontop of the trucks to buttons.
0
 
LVL 9

Expert Comment

by:OBCT
ID: 9738374
I think I have a solution to your problem but first I would like to know what actions you used, just so I know I'm not going to give you something to try when you've already done it.

Cheers

-OBCT
0
 
LVL 4

Expert Comment

by:r2far
ID: 9739622
Well, if you don't want them to be clickable until they stop, Perform your animation then after the animation in the timeline add keyframing.  In those keyframes convert those graphical trucks into buttons and add the goto's and whatever else you need.

If you want the trucks to be clickable as they move. (not sure if you tried this or not but...), convert the trucks into buttons right off the bat and motion tween the buttons movement around the screen.

Let me know if you already tried these methods :-)
0
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 

Author Comment

by:macipod
ID: 9740760
yes i tried some of the methods
i basically ran the truck on the motion twin once they come in across i converted them before i added motion twin and then i tried to go to actions and addthe on relase goto scene 2 but it doesn't seem to be working
i don't knwo why
i tried to add the invisibe button over it it works but maybe i get thetrucks to be buttons insted of the invisible button
thnaks
0
 
LVL 4

Accepted Solution

by:
r2far earned 33 total points
ID: 9743383
I am guessing you want truck shaped buttons that move once, right?

try this:
1) make the truck buttons first, add the action script to them before you do anything else.
2) then motion tween the truck buttons in the timeline.

One possible cause for your problems is that the actionscript isn't ending up where it is supposed to.  It is possible that the actionscript for the button appears at the start of your motion tween but not wear it is needed.
- after making the buttons and motion tweening them, try clicking on the frame where the buttons will usually get clicked and then selecting ONLY one of the buttons and see if the proper actionscript is in place.

Just to make sure, ActionScript used would be:

on (release){
    gotoAndPlay(n);
}

or gotoAndStop... or whatever the button is supposed to do.
0
 
LVL 9

Assisted Solution

by:OBCT
OBCT earned 32 total points
ID: 9744373
To make the buttons unclickable, you will have to add the following actionscript to the button on the first frame of the motion tween.

_root.button.enabled = false

You will have to give the button an instance name. I used button just as an example but you can use any word you like.
The other way to do this and probably the better way would be add a keyframe in a new layer and add the _root.button.enabled = false
Then add another keyframe at the end of the motion tween where you want the buttons to become enabled again and add this;

_root.button.enabled = true

I hope this helps :)

Cheers

-OBCT
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question