Reputation: 4337
im trying to make it so that when i click on an image, it clicks on a specific coordinate within a flash movie.
im trying to do this with jquery and have no clue where to continue.
heres my code so far:
$('.embed img').click(function(e){
$(this).css('display', 'none');
$('.embed object').click('231, 323');
});
now i need this to click on a specific coordinate (231, 313) inside the flash video but i have no clue where to go from here. the example obviously does not work but its to give you an idea what i am trying to do.
Upvotes: 3
Views: 1316
Reputation: 869
I think you can't simulate a click with javascript and almost sure you can't simulate click on an embeded flash with javascript. You can call an element click function if is set or you can attach a function for click event and run it, but you can't simulate the mouse left button click :)
You can try to make some tweaks to calculate the mouse cordinates on click event on the page and somehow detect which element is in that position and call that element's click event, but I think this not enough for you :)
A solution can be if you can edit the embed flash source code to implement a function what you can call from javascript and transmit the click cordinates (you find some good tutorial there), and somehow process this click with action script. I don't know if that is possible because I'm not an action script master :)
I hope I'm wrong and exist some good solutions for this, but if exist than I'm curious too :)
Upvotes: 2