Adobe Dreamweaver Forums



Last 10 THreads :         FLASH DATA in SCORM (Last Post : v_ell - Replies : 0 - Views : 1 )           »          titleWindow nightmare (Last Post : Mitek17 - Replies : 3 - Views : 4 )           »          How to communicate between clients? (Last Post : Amy Blankenship - Replies : 11 - Views : 12 )           »          CS4: CSS export not working for text with image (Last Post : Jim Babbage .:CMX:. & .:Adobe Community Expert:. - Replies : 9 - Views : 12 )           »          why doesn't my form work? (Last Post : CreepyCove - Replies : 0 - Views : 1 )           »          can you make a LineChart cumulative? (Last Post : Amy Blankenship - Replies : 1 - Views : 2 )           »          Really Awful Bug (Last Post : Walter Elias - Replies : 5 - Views : 6 )           »          need help with flash movie for the website (Last Post : romalsz - Replies : 0 - Views : 1 )           »          Drop-Down Boxes showing blank (Last Post : karimc - Replies : 2 - Views : 3 )           »          Color query, at specific point on screen (Last Post : atta707 - Replies : 4 - Views : 5 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Other Macromedia/Adobe Products > Flash > Actionscript
 
Tags:



Reply
  #1 (permalink)  
Old 10-16-2008, 01:00 AM
Koolaz Games
 
Posts: n/a
Diggs:
Default On hitTest go to next frame? Why doesn't this work?

Ok so I put this little hittest box at that takes u off the path and makes u go
to the other screen, I put these actions on it:
onClipEvent(enterFrame) {
if (this.hitTest(_root.Hero)) {
gotoAndStop("Woodhaven1");
}
}

But when ever the "Hero" walks on it it doesn't teleprt u to the other frame
("woodhaven1")... Can someone plz tell me what I'm doing wrong.

Thanks!
Koolaz Games



Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 10-16-2008, 01:15 AM
kglad
 
Posts: n/a
Diggs:
Default Re: On hitTest go to next frame? Why doesn't this work?

Woodhaven1 is not the same as woodhaven1.

and you probably should stop the enterFrame loop if you do have a positive hittest.
Reply With Quote
  #3 (permalink)  
Old 10-16-2008, 04:12 AM
Koolaz Games
 
Posts: n/a
Diggs:
Default Re: On hitTest go to next frame? Why doesn't this work?

hmm well the name is right. What do u mean about the positive hittest...
Thanks for replying!
Koolaz Games
Reply With Quote


  #4 (permalink)  
Old 10-16-2008, 05:43 PM
kglad
 
Posts: n/a
Diggs:
Default Re: On hitTest go to next frame? Why doesn't this work?

you don't want to repeatedly execute gotoAndStop("Woodhaven1");
Reply With Quote
  #5 (permalink)  
Old 10-16-2008, 08:03 PM
Koolaz Games
 
Posts: n/a
Diggs:
Default Re: On hitTest go to next frame? Why doesn't this work?

but for some reason it says that the hittest can only be with an onClipEvent function ting....
Reply With Quote
  #6 (permalink)  
Old 10-16-2008, 08:51 PM
kglad
 
Posts: n/a
Diggs:
Default Re: On hitTest go to next frame? Why doesn't this work?

that only is true if you're trying to attach code to a movieclip. attach code to a frame and it doesn't (and shouldn't) use an onClipEvent().
Reply With Quote


  #7 (permalink)  
Old 10-17-2008, 05:30 AM
Koolaz Games
 
Posts: n/a
Diggs:
Default Re: On hitTest go to next frame? Why doesn't this work?

Hmm... I attached it to the frames code but it still doesn't work... Do u have any idea why it isnt working?
Reply With Quote
  #8 (permalink)  
Old 10-17-2008, 03:15 PM
kglad
 
Posts: n/a
Diggs:
Default Re: On hitTest go to next frame? Why doesn't this work?

you almost certainly need to change "this" to a movieclip instance name and have the hittest code repeatedly execute.
Reply With Quote
  #9 (permalink)  
Old 10-17-2008, 08:17 PM
Koolaz Games
 
Posts: n/a
Diggs:
Default Re: On hitTest go to next frame? Why doesn't this work?

[q]Originally posted by: kglad
and have the hittest code repeatedly execute.[/q]

Wait... Wouldn't that be an enterFrame function? Or do u just do something
like have a stop command on the frame. Oh yea and do you add the code to the
scene's frame or the mc's frame?

Thanks for taking your time to help me out!
Koolax games



Reply With Quote


  #10 (permalink)  
Old 10-17-2008, 08:25 PM
kglad
 
Posts: n/a
Diggs:
Default Re: On hitTest go to next frame? Why doesn't this work?

you can add it to any timeline frame that the playhead enters. you just need
to use the correct path/name to your movieclips from that timeline.

and yes, one of the ways to create a loop and repeatedly execute code is to
use an onEnterFrame function.

Reply With Quote
Reply


Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 04:08 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Inactive Reminders By Mished.co.uk