Skip to main content
Participant
January 9, 2007
Question

search box help

  • January 9, 2007
  • 1 reply
  • 139 views
I want to create a simple search box to find stores by the zip code, I´ve created a text field var zip, and a button with the following code:
on (release) {
if (zip == undefined) {
loadMovieNum("error.swf", 7);
} else {
loadMovieNum(zip+".swf", 7);
}
}

Its working fine when you type a zip that exists (loading the zip number + swf ) or leave the box empty (displying the error swf )now I need to display another swf when the zip code you type doesnt exist . Thanks
This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
January 9, 2007
use the moviecliploader class because it has an onError method that will reliably detect a load failure. in that method you can trigger the loading of your error.swf.