dsrbb20862 2009-12-19 22:47
浏览 36

Firefox 3中的php,jquery,flash和.click函数 - stumper

I have a page that is using PHP to build itself and then uses Jquery to embed some SWF's into the page with different Flashvars based off the DB connection in the PHP section of code. I then have a jQuery .click(function(){ that fires a simple alert at the moment to test for functionality - this works as expected in Safari, but for some strange reason the .click will not fire under Firefox ? Code is below, can someone shed some light on the Firefox issue:

$(document).ready(function() {
$('#gallery<? echo $count; ?>').flash({
    // test_flashvars.swf is the flash document
    swf: 'button.swf',
    width: 570,
    height: 80,
    // these arguments will be passed into the flash document
    params: {
        wmode: 'transparent',

        },

        flashvars: {
        myText: "<?php echo urlencode($row['gal_Title']); ?>"       
    }
});
$('#gallery<? echo $count; ?>').click(function(){
alert('Alert <?php echo $count; ?>');
});


<? 
    $count = $count+1;
} else {
}
}
mysql_free_result($GalleryItems);
?>

The page ostensibly works and I suppose I could move the .click function through to the swf as a clickVar but I wanted the click to initiate an AJAX call to update a section of the page which would then cause me issues with grabbing the call from flash back into the jQuery elements - no ?

Many thanks for any help,

MM

  • 写回答

1条回答 默认 最新

  • dongyan6235 2009-12-19 23:01
    关注

    I believe Flash eats the onclick in some browsers - having never had to do this myself, I'm not certain. Is it possible for you to capture the click within Flash and make a call with ExternalInterface back out to JavaScript?

    评论

报告相同问题?

悬赏问题

  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥16 mybatis的代理对象无法通过@Autowired装填
  • ¥15 可见光定位matlab仿真
  • ¥15 arduino 四自由度机械臂
  • ¥15 wordpress 产品图片 GIF 没法显示
  • ¥15 求三国群英传pl国战时间的修改方法
  • ¥15 matlab代码代写,需写出详细代码,代价私
  • ¥15 ROS系统搭建请教(跨境电商用途)