| View previous topic :: View next topic |
| Author |
Message |
NINTENDO Grandmaster Cheater Supreme
Reputation: 0
Joined: 02 Nov 2007 Posts: 1371
|
Posted: Thu Apr 23, 2009 5:26 am Post subject: {Flash} ClickEvent in movieclip. |
|
|
Ok So I have this button in this movieclip but when I press it ofc the code applies to the movieclip. I want it to apply on the scen which it is placed in.
_________________
Intel over amd yes. |
|
| Back to top |
|
 |
Geek4Ever Master Cheater
Reputation: 1
Joined: 31 Oct 2008 Posts: 353 Location: Milano,Texas
|
Posted: Thu Apr 23, 2009 6:57 am Post subject: |
|
|
like add the code in the frame its like
| Code: | Name.onRelease = function() {
} |
|
|
| Back to top |
|
 |
LolSalad Grandmaster Cheater
Reputation: 1
Joined: 26 Aug 2007 Posts: 988 Location: Australia
|
Posted: Thu Apr 23, 2009 7:25 am Post subject: |
|
|
ActionScript 2 or 3?
_________________
|
|
| Back to top |
|
 |
NINTENDO Grandmaster Cheater Supreme
Reputation: 0
Joined: 02 Nov 2007 Posts: 1371
|
Posted: Thu Apr 23, 2009 1:04 pm Post subject: |
|
|
| Wahoa wrote: | | ActionScript 2 or 3? |
flash 8 pro so as2.
| Geek4Ever wrote: | like add the code in the frame its like
| Code: | Name.onRelease = function() {
} |
|
That wouldn't change anything.
_________________
Intel over amd yes. |
|
| Back to top |
|
 |
LolSalad Grandmaster Cheater
Reputation: 1
Joined: 26 Aug 2007 Posts: 988 Location: Australia
|
Posted: Thu Apr 23, 2009 6:23 pm Post subject: |
|
|
In the MovieClip that contains the button: | Code: | buttonInstanceName.onRelease = function() {
with (_parent) {
// do whatever
}
} |
Long time since I've done AS2, but this should work.
_________________
|
|
| Back to top |
|
 |
NINTENDO Grandmaster Cheater Supreme
Reputation: 0
Joined: 02 Nov 2007 Posts: 1371
|
Posted: Fri Apr 24, 2009 2:51 am Post subject: |
|
|
| Wahoa wrote: | In the MovieClip that contains the button: | Code: | buttonInstanceName.onRelease = function() {
with (_parent) {
// do whatever
}
} |
Long time since I've done AS2, but this should work. |
If I just copy paste your code :
| Code: | Statement must appear within on/onClipEvent handler
btn1.onRelease = function() { |
If I add a on/onClipEvent nothing happens.
_________________
Intel over amd yes. |
|
| Back to top |
|
 |
LolSalad Grandmaster Cheater
Reputation: 1
Joined: 26 Aug 2007 Posts: 988 Location: Australia
|
Posted: Fri Apr 24, 2009 3:56 am Post subject: |
|
|
| Code: | onClipEvent(load) {
btn1.onRelease = function() {
with (_parent) {
// do whatever
}
}
} |
Try copy pasting that instead.
_________________
|
|
| Back to top |
|
 |
NINTENDO Grandmaster Cheater Supreme
Reputation: 0
Joined: 02 Nov 2007 Posts: 1371
|
|
| Back to top |
|
 |
|