Flash Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignFlash Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 19th, 2004, 03:11 PM
bryanpickering bryanpickering is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 3 bryanpickering User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Hit Areas

Hi im new to flash so naturally im having a few proplems that hopefully someone can help me with.
I have two movie clips that i want to associate with the same hitarea so when i roll over the hitarea it plays one and when i click it i want it to play the other but when i put in two variable's to associate the two clips with the hitarea they seem to cancell each other out, plus if i use two hitarea's instead and put them on top of each other they also cancell each other out.
I hope this all make's sense to someone.

Tks for any help Bryan.

Reply With Quote
  #2  
Old January 19th, 2004, 05:17 PM
Fish_12345 Fish_12345 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: Here
Posts: 22 Fish_12345 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Im pretty stupid, so im probably going to give you the wrong answer and make a fool of myself, but ill try and help anyway.

This is what i thought you could try (i just tried it there and it worked for me)::

1. Create your two movie clips as movie clip symbols in the library
2. Create a button, having your on area and hit areas what you want it to look like before, and the area to be.
3. Insert your movies into the "on" frame, and the, "down" frame.
4. Put the button in the main window place.
5. Export and watch.

That worked for me, though i may have not explained it brilliantly, i hope it helps!



Fish

Reply With Quote
  #3  
Old January 19th, 2004, 08:06 PM
bryanpickering bryanpickering is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 3 bryanpickering User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question

No sorry thats not really what i was talking about by doing that it just changes the state of the button. What i want is to have two movie clips use the same hitarea, but invoke two differant actions depending on what you do. ie roll over or click.
If you look at the attachment i put up you will see what i mean.
Behind the dot is an invisible hitarea and when you roll over it it plays the movie that expands the button.Now if you click on the blue screen it plays that movie.But what i want is to be able to roll over the dot to expand it and click the dot to play the other movieclip (ie. the blue screen) but you dont seem to be able to have two variables pointing to the same hitarea or have two hitareas sitting on top of each other.
Sorry this is so long winded but hopefully it will give a better idea of what i mean.

Tks again Bryan.
Attached Files
File Type: zip evenred6.zip (2.1 KB, 112 views)

Reply With Quote
  #4  
Old January 20th, 2004, 12:01 PM
Fish_12345 Fish_12345 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: Here
Posts: 22 Fish_12345 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Could you try having two hit areas.. both in the same place?

Then it would trigger both and it would be like having one?

Fish

ps: like the two things, the look good when there not working together

Reply With Quote
  #5  
Old January 20th, 2004, 12:52 PM
bryanpickering bryanpickering is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 3 bryanpickering User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
no it doesnt work

Reply With Quote
  #6  
Old January 20th, 2004, 08:29 PM
Tann San Tann San is offline
Gotta get to the next screen..
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2003
Location: Legion of Dynamic Discord
Posts: 4,716 Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)  Folding Points: 11326 Folding Title: Novice Folder
Time spent in forums: 3 Weeks 1 Day 12 h 25 m 15 sec
Reputation Power: 580
Facebook MySpace
Hi, I'm just signing off so I havent checked your attachment.

Let's say everything is in the top layer of your movie (_root). You drag and drop your two movies from the library. We'll call them one and two, the instance names will be the same.
Code:
hitter = _root.createEmptyMovieClip("hitArea", 1);

hitter.beginFill(0x00FF00, 100);
hitter.moveTo(0,0);
hitter.lineTo(100, 0);
hitter.lineTo(100, 100);
hitter.lineTo(0, 100);
hitter.lineTo(0, 0);

hitter.onRollOver = function ()
   {
      _root.one.gotoAndPlay(1);
   };
hitter.onRelease = function ()
   {
      _root.two.gotoAndPlay("aNamedFrame");
   };

The above is pretty straight forward but just in case...it creates a blank movie in _root. For this example I drew a box to give the new movie some dimensions. Then a couple of events are linked to it. One is for when the mouse rolls over it and the second is for when the mouse is clicked on it.

As a sidenote putting two movies with events like above on top of each other will work like this...if the bottem movie is showing at all then only the part that shows will react to mouse events. If this is the case then all of the top movie will react to mouse events.
__________________
-Tann

-Vote for your favorite ActionScript editor here.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > Hit Areas


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT