Moving a Flash object with JQuery?
I know how to move a regular .jpg, png, etc. image using the jquery animate() function, but is there a way to move a flash object? I have an animated flash background object that I would like to move around using animate() but I'm not sure how.
Here is what my code looks like thus far:
- <style>
.block {
position:absolute;
background-image: url("images/bullet.gif");
left:-25px;
width:90px;
height:90px;
margin:5px;
}
</style>
- <div id="block" class="block"></div>
- <a style="opacity: 0.4;" href="#section_web"
id="content_web" title="Web Portfolio">Web</a>
- <script>
$("#web").click(function(){
$(".block").animate({
marginTop: '-56px', /* The next 4 lines will vertically align this image */
marginLeft: '-490px',
top: '100%',
left: '100%',
}, 1000); /* this value of "200" is the speed of how fast/slow this hover animates */
});
- </script>
So, right now, when I click the link, it moves the .gif file to a specified location. However, I really want to use my animated flash image and move it around based on where they click.
And i'm not sure how to declare the flash image either in jquery or in combination with css.
Thanks, in advance, for any help.