# Swf crashes when clicked at a certain time

**URL:** <https://forum.kirupa.com/t/swf-crashes-when-clicked-at-a-certain-time/24716>\
**Category:** flash\
**Created:** [July 3, 2003, 8:58pm UTC](https://forum.kirupa.com/t/swf-crashes-when-clicked-at-a-certain-time/24716 "2003-07-03T20:58:19Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Baggio](https://avatars.discourse-cdn.com/v4/letter/b/dbc845/32.png) [@Baggio](https://forum.kirupa.com/u/Baggio)\
**Post date:** [July 3, 2003, 8:58pm UTC](https://forum.kirupa.com/t/swf-crashes-when-clicked-at-a-certain-time/24716/1 "2003-07-03T20:58:19Z")

</div>

hi if you goto [www.dream-odyssey.com](http://www.dream-odyssey.com)

you’ll notice two “eyes”. Once the page has loaded if you click the left eye they lid will close and take you to the home page. Now if you click the eye THEN click again just as the lid is fully closed (may take a few attempts to execute this) Iexplore should crash… (or actually flash.ocx)

the source is too big to attache but cxan be downloaded from [www.dream-odyssey.com/Leye.fla](http://www.dream-odyssey.com/Leye.fla)

I have no idea why it crashes… I have tried to displace the button far to the left so that when it is clicked the user can’t click it again…

I think it is probably Iexplore trying to fetch 2 url’s at the same…

Any ideas?? This doesn’t happen at all in the Flash MX program :-/

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 3, 2003, 9:02pm UTC](https://forum.kirupa.com/t/swf-crashes-when-clicked-at-a-certain-time/24716/2 "2003-07-03T21:02:53Z")

</div>

Yup, it made my IE crash too. I don’t know exactly what’s the cause, but maybe you should disable the eye after it’s being clicked to prevent viewers from clickin git multiple times.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 3, 2003, 9:07pm UTC](https://forum.kirupa.com/t/swf-crashes-when-clicked-at-a-certain-time/24716/3 "2003-07-03T21:07:17Z")

</div>

yeah. that’s what i tried to do by shifting the actual button area so that once it was clicked the user can’t fetch the url again but i think when the home page loads after being clicked the first time…it loads too quickly so that the user can click it again…

Hmm i dunno! ☹

How do i go about completely disabling a MC? is the a standard method for it?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 3, 2003, 9:07pm UTC](https://forum.kirupa.com/t/swf-crashes-when-clicked-at-a-certain-time/24716/4 "2003-07-03T21:07:27Z")

</div>

I couldn’t _make_ it crash ☹ … 😉

(MAC OSX, DSL, IE 5.2.3)

I don’t get it though - can’t figure out what is _supposed_ to happen, it just seems to reload the same page (?) and the eyes are black rectangles with an eye within them (not eyelids by themselves, but have a background)

😕

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 3, 2003, 9:08pm UTC](https://forum.kirupa.com/t/swf-crashes-when-clicked-at-a-certain-time/24716/5 "2003-07-03T21:08:25Z")

</div>

Mine didn’t crash either… Win XP, IE 6 SP1

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 3, 2003, 9:10pm UTC](https://forum.kirupa.com/t/swf-crashes-when-clicked-at-a-certain-time/24716/6 "2003-07-03T21:10:22Z")

</div>

> \*Originally posted by Baggio \*  
> \*\*How do i go about completely disabling a MC? is the a standard method for it? \*\*

You can use something like this:

```auto
on (release){
this.enabled = false;
}

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 3, 2003, 9:18pm UTC](https://forum.kirupa.com/t/swf-crashes-when-clicked-at-a-certain-time/24716/7 "2003-07-03T21:18:19Z")

</div>

hmm that is strange… RelandR i set wmode = transparent so there should be no black background ☹

Thanks thanks electrongeek i thought it would be somethign simple like that i’ll give it a try 😉

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 3, 2003, 9:24pm UTC](https://forum.kirupa.com/t/swf-crashes-when-clicked-at-a-certain-time/24716/8 "2003-07-03T21:24:37Z")

</div>

hmm Don’t know why but when i add this.enabled = false the button is still clickable :-/

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 3, 2003, 9:25pm UTC](https://forum.kirupa.com/t/swf-crashes-when-clicked-at-a-certain-time/24716/9 "2003-07-03T21:25:56Z")

</div>

Try this then, give your button an instance name of something like “blah” and use this:

```auto
on (release){
_root.blah.enabled = false;
}

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 3, 2003, 9:29pm UTC](https://forum.kirupa.com/t/swf-crashes-when-clicked-at-a-certain-time/24716/10 "2003-07-03T21:29:47Z")

</div>

I’ll post a screenshot a lil later on…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 3, 2003, 9:30pm UTC](https://forum.kirupa.com/t/swf-crashes-when-clicked-at-a-certain-time/24716/11 "2003-07-03T21:30:01Z")

</div>

nope still does the same… actually it is only dosabled a few milliseconds after the lid is closed, because if i run it in flash and wait for the lid to close only after a few milliseconds can i NOT click it ☹

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 3, 2003, 9:32pm UTC](https://forum.kirupa.com/t/swf-crashes-when-clicked-at-a-certain-time/24716/12 "2003-07-03T21:32:45Z")

</div>

Make sure you apply the instance name and the action to all the instances of that button on your timeline. It’s doing that because you have more than one instance of it on different keyframes.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 3, 2003, 9:35pm UTC](https://forum.kirupa.com/t/swf-crashes-when-clicked-at-a-certain-time/24716/13 "2003-07-03T21:35:38Z")

</div>

hmm but the button is just a MC on the main time line occupying only a single frame…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 3, 2003, 9:37pm UTC](https://forum.kirupa.com/t/swf-crashes-when-clicked-at-a-certain-time/24716/14 "2003-07-03T21:37:52Z")

</div>

Could you post your FLA so I can see what’s going on?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 3, 2003, 9:44pm UTC](https://forum.kirupa.com/t/swf-crashes-when-clicked-at-a-certain-time/24716/15 "2003-07-03T21:44:09Z")

</div>

sure thing just check the link in the first post

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 3, 2003, 9:47pm UTC](https://forum.kirupa.com/t/swf-crashes-when-clicked-at-a-certain-time/24716/16 "2003-07-03T21:47:20Z")

</div>

the script works, it disabled the button, but then the page reloads the button again so it is enabled again.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 3, 2003, 9:52pm UTC](https://forum.kirupa.com/t/swf-crashes-when-clicked-at-a-certain-time/24716/17 "2003-07-03T21:52:13Z")

</div>

yeah… exactly which is how it SHOULD work… but if the user starts clicking it like mad chances are it will crash :-/ and i have no idea why…i think it’s probably IE trying to fetch a URL too quickly but that doesn’t seem likely…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 3, 2003, 9:54pm UTC](https://forum.kirupa.com/t/swf-crashes-when-clicked-at-a-certain-time/24716/18 "2003-07-03T21:54:51Z")

</div>

Baggio: You might want to check out this thread for your forward/backward script, it is more efficient than your current method…

[http://www.kirupaforum.com/forums/showthread.php?s=&threadid=11427](http://www.kirupaforum.com/forums/showthread.php?s=&threadid=11427)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 3, 2003, 9:57pm UTC](https://forum.kirupa.com/t/swf-crashes-when-clicked-at-a-certain-time/24716/19 "2003-07-03T21:57:22Z")

</div>

Yeah thanks…I actually saw that thread before… but my actionscript was a little rusty so i tried the simple approach 😉

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 3, 2003, 9:57pm UTC](https://forum.kirupa.com/t/swf-crashes-when-clicked-at-a-certain-time/24716/20 "2003-07-03T21:57:53Z")

</div>

Just offering up alternatives 🙂

[Next page](https://forum.kirupa.com/t/swf-crashes-when-clicked-at-a-certain-time/24716.md?page=2)
