the enterframe event is repeatedly dispatched multiple times per second (equal to your frame rate) and that's not what you want.
replace all your posted code with:
navigateToURL(new URLRequest("http://www.student.nvcc.edu/home/amlayne/ite170/dreamweaver/graded_*** ignments/index.html"), "_self");
I deleted everything including the frames.
This worked!! You saved the day!
Thank you so much!
Any thoughts on why my button now won't open in the same window? I'm getting a sense the built in code snippets don't work as they should, or I'm just making silly mistakes. Here's the code:
// Start your custom code
// This example code displays the words "Mouse clicked" in the Output panel.
navigateToURL(new URLRequest("http://www.student.nvcc.edu/home/amlayne/ite170/dreamweaver/graded_assignments/index.html"), "_self")
// End your custom code
there's no problem with that code.
you just need an object with reference btnSkip1 to exist at the time that code executes AND the same object needs to exist when you click it.
there are a few ways that can be screwed-up and only two to ensure it's done correctly:
1. create that object with actionscript and never null it.
2. create it in the ide when some frame plays, execute that code in the same frame and do not remove btnSkip1 thereafter.
Thank you. The button works the entire time. It just always opens a new window even though the target is self. I even added the stop() at the end of the function hoping it would work.
1 person found this helpful
create a new fla that contains btnSkip1 and that code. publish a swf and html. test.
Hmm. Worked perfectly. I deleted the action and pasted it back in and it worked. Makes no sense but I'll take it.
Thanks for your help!