自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

Flash實(shí)現(xiàn)超炫照片顯示

移動(dòng)開發(fā)
在Flash中,相信大家都希望實(shí)現(xiàn)很炫的效果,那么而偶們?cè)诰幊痰倪^程中葉可以實(shí)現(xiàn),那么就看本文的實(shí)現(xiàn)過程吧。

Flash實(shí)現(xiàn)超炫照片顯示,沒有內(nèi)容加以說明,只有兩段代碼。不過這不是重點(diǎn),重點(diǎn)是只要能實(shí)現(xiàn)效果就好。

HTML代碼

  1. <link rel="stylesheet" href="css/main.css" type="text/css" />       
  2.  <div class="example">    
  3.     <h3><a href="#">Flash gallery viewer sample</a></h3>    
  4.      <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" 
  5. codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" 
  6. width="100%" height="100%" align="middle" quality="high" scale="noscale">    
  7.         <param name="MENU" value="FALSE" />    
  8.          <param name="wmode" value="transparent" />    
  9.          <param name="SRC" value="app/gallery.swf" />    
  10.          <param name="flashvars" value="xmlDataPath=feed.php" />    
  11. <embed src="app/gallery.swf" flashvars="xmlDataPath=feed.php" wmode="transparent" menu="false" 
  12. pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" 
  13. width="100%" height="100%" align="middle" quality="high" scale="noscale"></embed>    
  14.      </object>    
  15. </div>  

PHP服務(wù)端代碼

  1. view sourceprint?01 <?    
  2.  $sCode = '';    
  3.  $sTemplate = <<<XML    
  4.  <img src="{fileurl}" width="{width}" height="{height}" />    
  5.  XML;    
  6.  $aUnits = array('pic1.jpg', 'pic2.jpg', 'pic3.jpg', 'pic4.jpg', 'pic5.jpg', 'pic6.jpg', 'pic7.jpg', 'pic8.jpg');    
  7.  foreach ($aUnits as $sFilename) {    
  8.      list($width, $height, $type, $attr) = getimagesize('data_images/'.$sFilename);    
  9.      $sCode .strtr($sTemplate, array('{fileurl}' => 'data_images/'.$sFilename, '{width}' => $width, '{height}' => $height));    
  10.  }    
  11.  header ('Content-Type: application/xml; charset=UTF-8');    
  12.  echo <<<EOF    
  13.  <?xml version="1.0" ?>    
  14.  {$sCode}    
  15.  EOF;    
  16. ?>  

效果圖:

 

小結(jié):Flash實(shí)現(xiàn)超炫照片,內(nèi)容介紹到這里。顯示效果還好吧?希望你能做出剛好的效果!

【編輯推薦】

Qt實(shí)現(xiàn)播放Flash

實(shí)現(xiàn)QT與Flash交互操作

深入剖析Flex Flash之間的關(guān)系

Flash圖表解決方案 Finger Chart

Symbian^3 PR2.0固件3月底發(fā)布 將支持HTML5、Flash

責(zé)任編輯:zhaolei 來源: 互聯(lián)網(wǎng)
相關(guān)推薦

2010-08-04 10:03:57

jQuery

2011-07-05 08:56:43

JavaScript

2013-04-17 10:16:25

語言

2011-04-18 17:17:45

CSSweb開發(fā)

2010-09-13 13:35:39

CSS屬性

2010-08-13 13:46:04

Flex效果組件

2011-08-02 14:45:11

HTML 5

2011-03-03 10:16:46

jQueryJavaScript

2010-06-11 16:33:21

openSUSE fl

2011-06-13 10:44:44

Qt Flash

2013-08-07 10:47:58

Android特效ListView

2013-08-07 10:35:02

AndroidListView拖拽

2012-02-24 09:11:45

jQuery

2011-05-04 09:05:39

Flash

2012-11-21 09:53:19

jQueryWeb

2010-08-13 13:39:51

Flex效果組件

2017-03-13 15:00:15

AndroidTransition 動(dòng)畫框架

2011-06-21 13:31:13

JavaScript

2009-05-11 09:15:53

微軟SilverlightFlash
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)