Network Header တြင္ Flash ထည္႕သြင္းအသံုးျပဳျခင္း

Network Header တြင္ Flash ထည္႕သြင္းအသံုးျပဳျခင္း

ပုံမွန္အားျဖင္႕ Network Header ( Banner ) ေတြမွာ Flash ေတြထည္႕သံုးလို႕မရပါဘူး။ အဲဒါကို က်ေနာ္တို႕ရေအာင္လုပ္ၾကည္႕ရေအာင္။

၁) ပထမဆံုး Flash Movie တစ္ခု Create လုပ္ပါ။ .swf file နဲ႕ျဖစ္ရပါမယ္။
၂) Network မွာ Blog တစ္ခု တင္ပါ။ Upload Files ကိုႏွိပ္ၿပီး Flash File ကို Upload တင္လိုက္ပါ။
၃) တင္ၿပီးတဲ႕အခါ https://api.ning.com/files/... ဆိုတဲ႕ URL ေလးေတြ႕ပါလိမ္႕မယ္။ အဲဒါကို ကူးယူထားပါ။
၄) ေအာက္မွာေပးထားတဲ႕ကုတ္ဒ္ရဲ႕ http://API_URL ဆိုတဲ႕ေနရာေတြအားလံုးမွာ ေစာေစာက ကူးထားတဲ႕ URL ကိုထည္႕ပါ။ ၿပီးရင္ ကုတ္ဒ္ကို Manage > Analytics ထဲမွာထည္႕လိုက္ပါ။ ဒါဆိုရပါၿပီ။

Code: [Select]
<script type="text/javascript">
/**
* Tracking Code Hack: Replace the Header of the network with a swf
**/

var headerSwfUrl = "http://API_LINK";
var headerSwfWidth = 959;
var headerSwfHeight = 179;
var newHeaderHtml = '<embed src="'+headerSwfUrl+'" width="'+headerSwfWidth+'" height="'+headerSwfHeight+'"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer
a href="http://www.macromedia.com/go/getflashplayer%3E">http://www.macromedia.com/go/getflashplayer>; ">
</embed>';
var headerElement = document.getElementById('xg_masthead');

//replace the old header with the new one
headerElement.innerHTML = newHeaderHtml;

//change the id as a simple way to remove all css attached to it

Views: 44

Comment

You need to be a member of Zomi Community Network - Your Network to add comments!

Join Zomi Community Network - Your Network

© 2024   Created by Zomi Community Network.   Powered by

Badges  |  Report an Issue  |  Terms of Service