# A 'with' action failed because the specified object did not exist

**URL:** https://forum.kirupa.com/t/a-with-action-failed-because-the-specified-object-did-not-exist/51231
**Category:** Uncategorized
**Created:** [May 11, 2004, 4:48am UTC](https://forum.kirupa.com/t/a-with-action-failed-because-the-specified-object-did-not-exist/51231 "2004-05-11T04:48:56Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![jain](https://avatars.discourse-cdn.com/v4/letter/j/f19dbf/32.png) [@jain](https://forum.kirupa.com/u/jain)
#### Post date: [May 11, 2004, 4:48am UTC](https://forum.kirupa.com/t/a-with-action-failed-because-the-specified-object-did-not-exist/51231/1 "2004-05-11T04:48:56Z")

</div>

hello all,  
I was wondering if anyone could possibly tell me what this means?

**A ‘with’ action failed because the specified object did not exist.**

The weird thing is that I know something must be wrong in part of my actionscript for a dynamic menu, BUT the weird thing is that it only causes problems SOME of the time, not all of the time. When a user clicks on one menu item in particular it can AT TIMES make the whole site go absolutely crazy, like returning to the first frame on the main stage and playing the flash site the whole way through without stopping??

The only message I get is this, A ‘with’ action failed because the specified object did not exist, but its using the same code as the other menu items and the other menu items are not causing me any problems??

any help appreciated  
cheers  
Jain :q:

---

<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 4, 2004, 5:40pm UTC](https://forum.kirupa.com/t/a-with-action-failed-because-the-specified-object-did-not-exist/51231/2 "2004-07-04T17:40:15Z")

</div>

Hello,

I’m getting this same error when using an attachMovie call. I’ve already checked out the linkage, HOWEVER, I’m not sure about the significance of the “AS2.0 Class” identifier. When I don’t enter anything into that field, it’s still not working BUT I don’t get the error message. When I do enter the class name that’s using the attachMovie call, I get the error message AND it doesn’t work.

So, I guess my questions are these:

1. When should I use the AS2.0 Class identifier?
2. When using attachMovie(), are there any really important though easy-to-overlook requirements?

Cheers,

Mike

---

<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 4, 2004, 5:59pm UTC](https://forum.kirupa.com/t/a-with-action-failed-because-the-specified-object-did-not-exist/51231/3 "2004-07-04T17:59:32Z")

</div>

When using attachMovie, or duplicateMovie for that matter, you have to make sure the target has a second to load otherwise when you try to target it with “with” it hasn’t been created yet according to flash. This happens especially when the with command is the line immediatly following the attachMovie command. You can try a retarded math problem to give flash the millisecond to create the clip ie  
dummyvar = 2+2;  
or you could use a full path to the clip for the first thing you want to do to it then use with ie  
attachMovie(…);  
path.to.attachedMovie.\_visible = false;  
with(path.to.attachedMovie){  
//do stuff  
}

Anyway Good Luck

---

<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 4, 2004, 6:04pm UTC](https://forum.kirupa.com/t/a-with-action-failed-because-the-specified-object-did-not-exist/51231/4 "2004-07-04T18:04:29Z")

</div>

So, it’s a bloody timing thing, eh?

Cheers for the head’s up… hopefully I won’t have to come back 😉

---

<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 5, 2004, 8:02am UTC](https://forum.kirupa.com/t/a-with-action-failed-because-the-specified-object-did-not-exist/51231/5 "2004-07-05T08:02:02Z")

</div>

Well, I got it to attach the clip from the library. What was the problem? Well,…

I was attaching the clip to an empty movie clip. My mistake was after creating the empty movie clip, I set it’s height and width – apparently, you can’t do that 😉

Thanks for your help Paradox. However, there wasn’t a timing problem.

---

<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 5, 2004, 11:39am UTC](https://forum.kirupa.com/t/a-with-action-failed-because-the-specified-object-did-not-exist/51231/6 "2004-07-05T11:39:41Z")

</div>

Yea, i’ve never faced or heard about any issues regarding with actions on an attached object.
