It does sound like the flash hasn't loaded yet. Maybe trying moving
the function call to a $(window).load() callback, or maybe try just a
good old fashioned delay. Something like:

setTimeout(function() { venueSwap(randomVenue);}, 750);

Maybe tweak the time and see if it helps. Also, bear in mind that
differences in bandwidth might affect the time it takes to load the
flash.

I'm sort of thinking out loud here, but maybe javascript is the wrong
solution. Maybe you should set a random venue from within the flash
once it loads. If that's not possible, maybe have your flash call a
JavaScript function to notify that it is ready. Then that function
could call back to the flash. Or maybe the flash could call a
getRandomVenue() javascript function that would just return said
random venue.

--Erik


On 8/16/07, AJ <[EMAIL PROTECTED]> wrote:
>
>
>
> On Aug 16, 9:51 am, "Erik Beeson" <[EMAIL PROTECTED]> wrote:
> > What doesn't work about it? Is the venueSwap function getting called? Is the
> > showMe function getting called? Are there any JavaScript errors in firebug?
> > Are you calling venueSwap(randomVenue) from within a $(document).ready()
> > callback?
>
> Firebug says:
> myFlashMovie.showMe is not a function
>
> ....which I suppose indicates that Flash has not completely loaded.
> But that makes no sense, as I can refresh and IMMEDIATELY click the
> image and it still works.
>
> All the script is surrounded by a $(document).ready().
>
> I also tried extracting the trigger to the bottom of the html page,
> but no luck.
>
>

Reply via email to