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

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:

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

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

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

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

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 :wink:

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

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