--Quick Navigation--
About Us
Asiagate Reports
Contact Us
Total Court Debt Search
Total Real Time Reports
Introduction to Asiagate
My Profile
Fresh Hong Kong Report
Fresh China Report
Fresh Macao Report
Fresh Taiwan Report
Fresh International Report
Our Services
Total Auto Alarm Member's Login
Member ID:
Login Pa word:
Save details?
Credit Card via Secure Online Ordering
Total Court Debt Search
Unlimited acce to our court database which i updated daily from Hong Kong Court and Tribunals.
Google Search
Total Credit |
Company List We provide real-time or database credit reports on the below listed Hong Kong companies with content of credit a raisals,
corporate structure, history summary, related news, management background, financial and banking, trade surveys, litigation &
debt record checks, operation & activities, property ownership and summary. Please click the report links below for purchase. | Alphabetic Alphanumeric Symbolic Others | |你喜欢夜的乐章吗?让我们一起沉醉在这夜的乐章中吧!嘘!别说话,你听... |
| 文章列表 您正在查看 "默认分类" 分类下的文章
2011年05月11日 星期三
下午 10:09
百姓:这鸡蛋真难吃。 五 毛:隔壁的鸡给了你多少钱? 百姓:这鸡蛋真难吃。 五 毛:有本事你下个好吃的蛋来。 百姓:这鸡蛋真难吃。 五 毛:下蛋的是一只勤劳勇敢善良正直的鸡。 百姓:这鸡蛋真难吃。 五 毛:再难吃也是自己家的鸡下的蛋,凭这个就不能说难吃。 百姓:这鸡蛋真难吃。 五 毛:比前年的蛋已经进步很多了。 百姓:这鸡蛋真难吃。 五 毛:你就是吃这鸡蛋长大的,你有什么权力说这蛋不好吃? 百姓:这鸡蛋真难吃。 五 毛:你这么说是什么居心什么目的? 百姓:这鸡蛋真难吃。 五 毛:自己家鸡下的蛋都说不好吃,你还是不是人! 百姓:这鸡蛋真难吃。 五 毛:隔壁家那鸭蛋更难吃,你咋不说呢? 百姓:这鸡蛋真难吃。 五 毛:嫌难吃就别吃,滚去吃隔壁的鸭蛋吧。 百姓:这鸡蛋真难吃。 五 毛:鸭蛋是好吃 ,可是不符合我们家的具体情况。 百姓:这鸡蛋真难吃。 五 毛:胡说!我们家的鸡蛋比邻居家的鸭蛋好吃五倍! 百姓:这鸡蛋真难吃。 五 毛:凡事都有个过程 现在还不是吃鸭蛋的时候。 百姓:这鸡蛋真难吃。 五 毛:光抱怨有什么用,有这个时间还不如努力去赚钱! 百姓:这鸡蛋真难吃。 五 毛:心理阴暗,连鸡蛋不好吃也要发牢骚。 百姓:这鸡蛋真难吃。 五 毛:世界上没有绝对的好蛋,美国鸡蛋好吃,你去吧! 百姓:这鸡蛋真难吃。 五毛:吃鸡蛋的也不是好鸟,吃了鸡蛋还留下证据说鸡蛋难吃,太有城府了
| 2009年12月14日 星期一
下午 09:04
唐福珍暴力抗法自焚而死,我想说几句有力道的话可是脑袋乱了。
一个小民可以对不合理的社会制度说什么呢?没有信仰的民族,没有做人的原则,谁站在权力的浪尖上可以出淤泥而不染呢。
每一个都需要被饶恕。珍惜自己身边的人。中国人呀你们每一个人都需要一个光明的信仰,一个爱的信仰,不要做党的奴隶,制度的走狗。时刻摸着自己的良心做人。
| 2009年09月02日 星期三
下午 07:11
................
| 2009年08月25日 星期二
下午 12:56
配置,编译,***,swftools工具!可以在linux开发flash动画!
***gimp扩展可以直接导出flas***件!
下午***gitosis,git服务器程序!
Update (08-10-2008): For topics not covered here, I encourage everyone to read the gitosis
, bundled with the distribution.
There is also an
configuration file that illustrates more features than I have covered here.
I have been asked more and more these days, How do I host a Git repository? Usually it is a umed that some acce control beyond simply read-only is involved (some users have commit rights). With acce control comes i ues of security, and that's a whole other bag of cats. This post is about presenting an a wer to this question, without the fu .
The rest of this article will be a tutorial showing you how to host and manage Git repositories with acce control, easily and safely. I use an up and coming tool called
that my friend
wrote to help make hosting git repos easier and safer. It manages multiple repositories under one user account, using SSH keys to identify users. However, users do *not* need shell accounts on the server, i tead they will talk to one shared account that does not allow arbitrary commands. Git itself is used to setup gitosis and manage the Git repos, which pleases the recursion-seeking orthogonal CS-side of my brain.
A umptio : I take my examples from a Ubuntu Linux server. While I haven't tested other systems, I imagine different Linux distributio , FreeBSD, OS X, etc... would be similar. Gitosis is written in Python, so you should have a copy of Python i talled as well.
Enough talk, let's get down and dirty.
I tall gitosis
gitosis
is a tool for hosting git repositories (I'm repeating myself for those who skim :)
The first thing to do is grab a copy of gitosis and i tall it on your server:
cd ~/src
git clone git://eagain.net/gitosis.git
Notice that gitosis is extremely light-weight.
The clone takes a mere couple seconds.
Le is more, and I like that a lot.
Next, i tall it like so:
cd gitosis
python setup.py i tall
Don't use --prefix unle you like self-inflicted pain. It is po ible to i tall gitosis in a non-standard location, but it's not nice. Read the Caveats section at the bottom and then come back here.
If you get this error:
-bash: python: command not found
Traceback (most recent call last):
File " etup.py, line 2, in ?
from setuptools import setup, find_packages
ImportError: No module named setuptools
You have to i tall Python setuptools.
On Debian/Ubuntu systems, it's just:
sudo apt-get i tall python-setuptools
For other systems, someone tell me or leave a comment, so I can update this section and improve this tutorial.
The next thing to do is to create a user that will own the repositories you want to manage.
This user is usually called
, but any name will work, and you can have more than one per system if you really want to. The user does not need a pa word, but does need a valid shell (otherwise, SSH will refuse to work).
sudo adduser \
--system \
--shell /bin/sh \
--gecos 'git version control' \
--group \
--disabled-pa word \
--home /home/git \
You may change the home path to suit your taste.
A succe ful user creation will look similar to:
Adding system user `git'...
Adding new group `git' (211).
Adding new user `git' (211) with group `git'.
Creating home directory `/home/git'.
You will need a public SSH key to continue.
If you don't have one, you may generate one on your local computer: h-keygen -t rsa
The public key will be in $HOME/. h/id_rsa.pub.
Copy this file to your server (the one ru ing gitosis).
Next we will run a command that will rinkle some magic into the home directory of the
user and put your public SSH key into the list of authorized keys.
sudo -H -u git gitosis-init /tmp/id_rsa.pub
id_rsa.pub above is your public SSH key that you copied to the server. I recommend you put it in /tmp so the git user won't have permi ion problems when trying to read it. Succe looks like:
Initialized empty Git repository in ./
Initialized empty Git repository in ./
(Yes, two times)
For good measure, let's make sure the post-update hook is set executable. I've seen it where sometimes it doe 't get set (problem with older setuptools):
sudo chmod 755 /home/git/repositories/gitosis-admin.git/hooks/post-update
Here some cool magic ha e .
Run this on your local machine:
git clone git@YOUR_SERVER_HOSTNAME:gitosis-admin.git
cd gitosis-admin
You will now have a gitosis.conf file and keydir/ directory:
~/dev/gitosis-admin (master) $ ls -l
total 8
-rw-r--r--
1 garry
104 Nov 13 05:43 gitosis.conf
drwxr-xr-x
3 garry
102 Nov 13 05:43 keydir/
This repository that you just cloned contai all the files (right now, only 2) needed to create repositories for your projects, add new users, and defined acce rights. Edit the settings as you wish, commit, and push. Once pushed, gitosis will immediately make your changes take effect on the server. So we're using Git to host the configuration file and keys that in turn define how our Git hosting behaves. That's just plain cool.
From this point on, you don't need to be on your server. All configuration takes place locally and you push the changes to your server when you're ready for them to take effect.
Creating new repositories
This is where the fun starts.
Let's create a new repository to hold our project codenamed FreeMonkey.
Open up gitosis.conf and notice the default configuration:
[gitosis]
[group gitosis-admin]
writable = gitosis-admin
members = jdoe
Your member quot; line will hold your key filename (without the .pub exte ion) that is in keydir/. In my example, it is jdoe, but for you it'll probably be a combination of your username and hostname.
To create a new repo, we just authorize writing to it and push.
To do so, add this to gitosis.conf:
[group myteam]
members = jdoe
writable = free_monkey
This defines a new group called myteam, which is an arbitrary string. jdoe is a member of myteam and will have write acce to the free_monkey repo.
Save this addition to gitosis.conf, commit and push it:
git commit -a -m Allow jdoe write acce to free_monkey
git push
Now the user jdoe has acce to write to the repo named free_monkey, but we still haven't created a repo yet. What we will do is create a new repo locally, and then push it:
mkdir free_monkey
cd free_monkey
git init
git remote add origin git@YOUR_SERVER_HOSTNAME:free_monkey.git
# do some work, git add and commit files
git push origin master:refs/heads/master
With the final push, you're off to the races. The repository free_monkey has been created on the server (in /home/git/repositories) and you're ready to start using it like any ol' git repo.
Adding users
The next natural thing to do is to grant some lucky few commit acce to the FreeMonkey project. This is a simple two step proce .
First, gather their public SSH keys, which I'll call alice.pu quot; and " ob.pu quot;, and drop them into keydir/ of your local gitosis-admin repository. Second, edit gitosis.conf and add them to the member quot; list.
cd gitosis-admin
cp ~/alice.pub keydir/
cp ~/bob.pub keydir/
git add keydir/alice.pub keydir/bob.pub
Note that the key filename must have a .pu quot; exte ion.
gitosis.conf changes:
[group myteam]
- members = jdoe
+ members = jdoe alice bob
writable = free_monkey
Commit and push:
git commit -a -m Granted Alice and Bob commit rights to FreeMonkey
git push
That's it.
Alice and Bob can now clone the free_monkey repository like so:
git clone git@YOUR_SERVER_HOSTNAME:free_monkey.git
Alice and Bob will also have commit rights.
Public acce If you are ru ing a public project, you will have your users with commit rights, and then you'll have everyone else. How do we give everyone else read-only acce without fiddling w/ SSH keys?
We just use git-daemon.
This is independent of gitosis and it comes with git itself.
sudo -u git git-daemon --base-path=/home/git/repositories/ --export-all
This will make all the repositories you manage with gitosis read-only for the public. Someone can then clone FreeMonkey like so:
git clone git://YOUR_SERVER_HOSTNAME/free_monkey.git
To export only some repositories and not others, you need to
touch git-daemon-export-ok
i ide the root directory (e.g. /home/git/repositories/free_monkey.git) of each repo that you want public. Then remove --export-all from the git-daemon command above.
More tricks
gitosis.conf can be set to do some other neat tricks. Open example.conf in the gitosis source directory (where you originally cloned gitosis way at the top) to see a summary of all optio . You can ecify some repos to be read-only (o osite of writable), but yet not public. A group members list can include another group. And a few other tricks that I'll leave it to the reader to discover.
Caveats
If /home/git/.gitosis.conf on your server never seems to get updated to match your local copy (they should match), even though you are making changes and pushing, it could be that your post-update hook i 't executable. Older versio of setuptools can cause this. Be sure to fix that:
sudo chmod 755 /home/git/repositories/gitosis-admin.git/hooks/post-update
If your Python goodies are in a non-standard location, you must additionally edit post-update and put an export PYTHONPATH=... line at the top. Failure to do so will give you a Python stack trace the first time you try to push changes within gitosis-admin.
If you want to i tall gitosis in a non-standard location, I don't recommend it. It's an edge case that the author ha 't run up agai t until I bugged him to help me get it working.
For the brave, you need to edit whatever file on your system controls the default PATH for a non-login, non-interactive shell. On Ubuntu this is /etc/environment. Add the path to gitosis-serve to the PATH line. Also i ert a line for PYTHONPATH and set it to your non-standard Python site-packages directory. As an example, this is my /etc/environment:
PATH=/home/garry/sys/bin:/usr/local/ in:/usr/local/bin:/usr/ in:/usr/bin:/ in:/bin:/usr/bin/X11:/usr/game quot;
PYTHONPATH=/home/garry/sys/lib/python2.4/site-packages
Be sure to logout and log back in after you make these changes.
Don't use the gitosis-init line I have above for the standard i tall, i tead use this slightly modified one:
sudo -H -u git env PATH=$PATH gitosis-init /tmp/id_rsa.pub
Be sure to also set PYTHONPATH in your post-update hook as described above.
The *should* do it. I am purposefully terse with this non-standard setup as I think not many people will use it. HIt me up in #git on FreeNode if you need more info (my nick is up_the_iro ).
Non-standard SSH port
If you run SSH on a non-standard port on your server, don't use the syntax git@myserver.com:1234:/foo/bar, it won't work. Putting the port in the URL doe 't seem to make gitosis, or git, (not sure which) ha y. I tead, put this in your ~/. h/config file:
Host myserver.com
Port 1234
Conclusion
Well, I hope you enjoyed this tutorial and that it makes your Git hosting life easier. This is public revision 10. Please let me know if you find mistakes, omi io , an easier way than what I described, etc...
Git it on...
(yeah, that was bad...)
| 2009年05月01日 星期五
上午 11:02
在本机播打如下号码
生效方法:*57*13515294514#
取消方法:#57#
| 2009年03月23日 星期一
下午 04:51
今天下午试用了git这个用来开发linux内核的版本管理系统,相比之前学的svn功能上要高一个档次!
我第一次试用。可以拷贝版本库中建立多少分支!不过中文的学习资料太少了,想深入学习的,只能硬着头皮看英文的了!
| 2009年01月03日 星期六
下午 11:41
好晚了!你睡觉吧!这个世界就是这样!你不要对不起你自己呀!
| 2008年11月18日 星期二
上午 10:13
央视网消息(新闻30分):
昨天我们报道了消费者因为百度搜索引擎竞价排名提供的虚假网站或信息而上当受骗的新闻。那么,竞价排名究竟是什么?那些虚假药品、医院网站的信息是如何通过它出现在搜索引擎的搜索结果当中的?竞价排名能否让人公平获取信息?记者对此进行了调查。
百度自称是目前全球最大的中文搜索引擎,每天的搜索人次超过1亿。在其官方网站,竞价排名被 称为一种按效果付费的网络推广方式,用少量的钱就可以提升企业的销售额和品牌知名度。记者进入百度的查询竞价网页,在查询竞价栏里输入治疗性病,便出 现了对治疗性病这个关键词进行竞价的100多家企业,排名第5的正是这家冒牌部队医院总参管理保障部医院的网站,其竞价为每点击一次支付 16.56元。
百度在线网络技术北京有限公司客户发展C5部销售代表韩亮:花的钱越多效果肯定越明显。
记者:就花的钱越多,排名越在前头?
百度在线网络技术北京有限公司客户发展C5部销售代表韩亮:对,肯定往前排了,你的词被关注的多,就一下有人关注这东西很快就会看到你的这个情况。
百度在线网络技术北京有限公司客户发展C5部销售代表郑中田:性病和癌症治愈率百分之百,这两词是暂时没有人来购买。
记者:我们可以购买?
百度在线网络技术北京有限公司客户发展C5部销售代表郑中田:性病和癌症治愈率百分之百,这两词是暂时没有人来购买。对,您可以来购买,癌症这个词在全国这块来说吉林省中医院它是排在第一位11块05分钱。
记者:就是点1次11块05?
百度在线网络技术北京有限公司客户发展C5部销售代表郑中田:性病和癌症治愈率百分之百,这两词是暂时没有人来购买。对。
记者发现,只要在百度上搜索癌症这个关键词,搜索结果首页排名第一的正是打着冒牌抗癌专家白希和旗号的中国抗癌网。百度工作人员介绍说,如果客户对进行搜索的网民有地域上的要求,收费还会不同。
百度在线网络技术北京有限公司客户发展C5部销售代表郑中田:白希和他是在咱们北京做的,他可能是说,因为他们都是限制在某些地域来做,所以北京他只需花3.18块就可以做第一位了。
据百度工作人员介绍,网民每通过百度搜索点击一次中国抗癌网,该网站就要向百度支付3.18元,点击的越多,收取的费用也就越多。一些点击率较高的网站每月因此要向百度支付数万元不等的竞价排名费用。
而对于一些发布医药信息的网站,百度个别工作人员不仅没有进行严格的审查,甚至帮助他们蒙混过关。
百度在线网络技术北京有限公司客户发展C5部销售代表郑中田:前两天我做了一个医药的也是,做一种胶囊,胶囊的话,这肯定是没有医药许可证,但是他有以前的一个,另外一个品种的一个药,把名字一改的话,这就可以了。
记者:怎么改?
男:就是用电脑用photoshop嘛,抹去了,然后重新换一下,打印出来就行了。
记者:就是走个形式。
男:对,对,对。因为审核都是百度内部来审核。
由于竞价排名让花钱的企业出现在被搜索结果的前列,因此,一些不愿为此花钱的企业只能出现在 搜索结果的末尾,一些企业向记者反映,他们遭到百度的恶意屏蔽,从搜索结果中消失。据童年网负责人介绍,网站创办之初被百度收录的网页多达11万多个,用 户可以轻易搜索到童年网,然而在拒绝参与竞价排名后,目前被收录的网页仅为两个。
童年网总经理金华:因为我们是个公益性的网站,第一没钱做(竞价排名)这些东西,第二我们是 公益性的,我们也没必要进行商业化的一些宣传活动,我说我们绝对不会做,你不给钱的话,惩罚你网站,这就造成了用户,有的孩子们根本没法通过百度查到童年 网里很多一些有益的信息,(我认为)这就是勒索营销。
同样的遭遇还发生在这家名为中国城市地图网的网站上,这家网站的负责人告诉记者,在拒绝接受竞价排名服务后,网民已无法从百度搜索到他们的网站。
中国城市地图网负责人陈懋:从9月份之后,收到百度所谓的代理的***之后,我们拒绝了(参与 竞价排名)之后,9月份开始,就一个IP都没有从百度来了,也就是说它把我们直接给屏蔽了,这是一种就是说极其不道德的商业行为,我认为这不仅仅是影响搜 索引擎的公正性,甚至影响了整个中国互联网到底应该怎么走。
百度负责人自称,百度已经覆盖95%的中国网民,竟价排名收入占百度总收入的80%以上。
中国互联网协会副理事长高卢麟:我们互联网协会提倡各个企业要自律,就是你要自己约束自己。
| 2008年03月05日 星期三
下午 01:32
(现场照片)94岁老太太街上卖自制鞋垫谋生 在厦门旧市区中心、思明东路,思明电影院旁边街上(原建设银行思东点或市房管局公房中心店面街上),有一位已94岁高龄的老太太,常年在此摆地摊卖自己亲手缝制的棉布鞋垫。
鞋垫用七层棉布缝制,开价一付仅2元。我去年底买她一付鞋垫,给她2元,她还要再送我一付。
我了解到她已94岁高龄(1914年出生),就坚持不要她买一送一,只要她一付。她连声说谢谢!
今天(2008年2月28日中午)我刚好带相机上街,问她能否给她照相?她很乐意答应了,还特意站起来照了一张。
从去年底知道有一位已94岁高龄的老太太仍在做小生意一事后,心里一直很感叹:比起马路边那些在下跪求助乞讨的年轻人,这位94岁的老太太真是够伟大的!
原来我看她衣装尚算整洁,以为她是人老闲着无事、做点小生意玩玩而已?
今天给她照相,顺便问了一下,才知道她是为谋生糊口!这下子使我震惊不已!
一位94岁高龄的老太太还要在路边卖自制鞋垫谋生?!这真是我心里很沉重,我不知该怎样表达我此时的心情?
我到旁边的市场上给她买了挂香蕉,又问她吃午饭吗?她竟说不想吃!她说她一个月只有居委会给的2百元救济款,而子孙们因谋生困难,还把这2百元拿去交房租(公房),她只好靠卖鞋垫一天赚个3、5元小钱糊口,常年是伙食很差!
位94岁高龄的老人常年伙食很差!
我忍住眼泪,给她买了一碗加料的面线糊,她连声感谢,还一再要再送我鞋垫,说这棉布做的鞋垫再也买不到了!因为她已太老了,无力再亲自继续缝制鞋垫,只剩下这一些鞋垫卖完了就没了!
我问她,以后不卖鞋垫怎么办?她摇头叹息说不知道怎么办?
据老太太自称:姓黄,住厦门市古城路墙仔顶(闽南话读音)
我想,全市90岁以上的老人,人数极少,厦门市民政部门要给予资助应是做得到的!厦门市思明区民政局能否多给她一些救助款?起码能让她吃饱饭,行吗?
拜托了!
(此帖见之厦门网上,我估计94岁高龄老人还在街上摆摊自食其力,恐怕是世上罕见?故荐给网友。)
| 2007年11月29日 星期四
下午 03:04
EMBEDDING FLASH
article | 17.06.2006 | print
There seems to be a lot of confusion about the code needed to properly embed Flash objects within a we ite: it's the most frequently asked question at this site's forum. The rise of profiling sites like My ace (who filter lots of codes) and the recent Eolas patent enforcement have thrown even more confusion into the mix. In this article, I'll try to clearly align the best optio for Flash embedment. I'll also mention the most common pitfalls, and their workarounds.
Let's start with the most common way to embed Flash in a we ite, with the code that is exported from the Flash authoring tool when one chooses to publish a file. In this example, we choose to embed mp3player.swf, which resides in the same directory as the HTML file in which the code is put. The code will co ist of two parts, object and embed. The object part is used by Microsoft's Internet Explorer and the embed part is used by, well, all other browsers. Because of this twofold, all parameters are also listed twice.
object width=250 height=400
cla id=clsid:d27cdb6e-ae6d-11cf-96b8-444553540000
codebase=
shockwave/ca /flash/swflash.cab#version=8,0,0,0
< aram name=movie value=mp3player.swf /
embed src=mp3player.swf width=250 height=400
type=a lication/x-shockwave-flash plugi age=
/object
Of these parameters, the most important one is the movie (or src in the embed part). This contai the location of the SWF file to include, here mp3player.swf. If the SWF file resides in another directory, we can point to it with a relative path (eg. ../flash/mp3player.swf or an a olute path (eg.
The width and height parameters comply with the width and height of the SWF in pixels, but they can also be entered as a percentage of the document's size (eg: width=100%).
Last, the cla id and codebase parameters (type and plugi age for embed) tell the browsers what type of plugin is needed and where it can be downloaded.
Extra Parameters
The code listed above uses the minimum amount of parameters needed to properly embed the SWF file. There are a lot of other parameters available though. Each of these parameters is added to the code in the same way the SWF URL is listed; with an extra < aram name=" aramName value=" aramValue / line for the object part and with a single paramName=" aramValue for the embed part. The entire list of parameters can be found at Adobe's we ite, but let's show the most interesting ones here:
bgcolor (#rrgg ): set the SWF's background color using a hexadecimal value.
menu (true, false): show or hide the rightclick menu.
quality (low,medium,high): the rendering quality of the SWF.
scale (showall, noborder, exactfit): how the SWF should scale in the HTML block.
wmode (tra arent, opaque): set the background of the SWF tra arent or not.
Let's say we want to show our SWF movie with a red background, without rightclick menu and at low quality. The embed code will then end up like this:
object width=250 height=400
cla id=clsid:d27cdb6e-ae6d-11cf-96b8-444553540000
codebase=
shockwave/ca /flash/swflash.cab#version=8,0,0,0
< aram name=movie value=mp3player.swf /
< aram name=" gcolor value=#ff0000 /
< aram name=menu value=false /
< aram name=quality value=low /
embed src=mp3player.swf width=250 height=400
bgcolor=#ff0000 menu=false quality=low
type=a lication/x-shockwave-flash plugi age=
/object
Flashvars
By now, one more extremely handy parameter remai to be discu ed. It's the parameter flashvars, which allows you to send variables to the SWF file on startup. All of my Flash scripts offer the po ibility of receiving flashvars, making them easy to customize and reuse (a list of all su orted flashvars can be found in the readme.html files of my script's downloads). Our example's mp3player.swf accepts three flashvars:
file (url): the location of an mp3 file or xml playlist file.
config (url): the location of an xml configuration file.
autostart (true, false): set the mp3player to automatically start or not.
Flashvars have to be entered in HTML as a single string, with an = symbol separating the flashvar's name and value and with an symbol separating su equent flashvars. So when we want to use our mp3player.swf to automatically play the file my_cool_song.mp3, we need to enter the following embed code:
object width=250 height=400
cla id=clsid:d27cdb6e-ae6d-11cf-96b8-444553540000
codebase=
shockwave/ca /flash/swflash.cab#version=8,0,0,0
< aram name=movie value=mp3player.swf /
< aram name=menu value=false /
< aram name=quality value=low /
< aram name=" gcolor value=#ff0000 /
< aram name=flashvar quot;
value=file=my_cool_song.mp3&am autostart=true /
embed src=mp3player.swf width=250 height=400
menu=false quality=low bgcolor=#ff0000
flashvars=file=my_cool_song.mp3&am autostart=true
type=a lication/x-shockwave-flash plugi age=
/object
Flashvars Pitfalls
Two major pitfalls populate the road to flashvars succe . The first is relative linking of imported files. When relatively linking to imported files (as we did in the previous block of code with the mp3 file), you should always start from the location of the HTML file in which the SWF is embedded. So, in the previous example, if the SWF was to be put in a subdirectory, the flashvar pointing to the MP3 file would remain to be file=my_cool_song.mp3 and not file=../my_cool_song.mp3! Again, there's an exception: the path of FLV files should be given relatively from the SWF file. In order to prevent confusion, you can always point to files with the a olute URL (including the
The second pitfall concer the importing of XML files. Due to security restrictio , Flash can only import XML files if they reside on the same domain as the SWF file. So, in our mp3player example, if the mp3player.swf is located in the domain
, then the imported playlist.xml or config.xml should also reside on
. This restriction only a lies to XML files, you can ha ily import MP3 or FLV files from different domai than your own.
There are two workaround around this feature (it's not a problem). The first one can be used if you're the owner of the domain on which the XML file resides. You can put a small file, called cro domain.xml, in the root of your we ite. The file contai a list of domai that are granted acce to the XML files from that domain. This technote contai more information about the use and structure of cro domain.xml files. In the most extreme case, you can grant SWF's from all domai acce to your we ite's XML files, in which the cro domain.xml file will look like this:
?xml version=1.0?
!DOCTYPE cro -domain-policy SYSTEM
cro -domain-policy.dtd
cro -domain-policy allow-acce -from domain=* /
/cro -domain-policy
The second workaround for this security restriction is to tu el the XML file through a small serverside script that resides on your own server. An example of such a script in PHP can be found in the extras index page.
MySpace (and other profile sites)
For embedding Flash files on a regular we ite, the previous examples should be all you need. For embedding on profile sites (like MySpace), an extra problem arises since these sites filter the object tag. An embed-only a roach will do the job.
Also, these profile sites don't allow you to upload files on their own server, so you'll have to look out for an external server to store your files on. Just remember to put at least the SWF and XML files at the same server, and refer to all files (SWF, XML and MP3/FLV/JPG) with a full pathname.
embed src=
width=300 height=300 bgcolor=#FFFFFF
type=a lication/x-shockwave-flash
plugi age=
flashvars=file=http://www.myserver.com/playlist.xml&am autostart=true&am lightcolor=0xffcc00
scale=" howall name=index /
(Remember that there´ a lot of other flashvars you can set on my players. They are all described in the readme document and you can easily set them through the online wizard.)
Eolas &am SWFObject
An extra embedment problem arised a couple of months ago, after a small company named Eolas filed (and won) a lawsuit agai t Microsoft. Eolas enforced a patent on automatically embedding and interacting with external a licatio (like Flash) in we ages. As a result, Microsoft updated Internet Explorer: you'll see a grey border a earing around a Flash object when you move your mouse over it. Before interacting with it, you first have to click once to activate it.
No doubt this patent is an example of one that should never have been a roved. But it has, and you'll have to find a way to get around it (if you don't want to confuse your visitors with grey borders and extra clicks). Luckily, there is a way. It involves a bit of javascripting, and the SWFObject script (by Geoff Stear ). Here's how it works.
First upload swfobject.js to your server and include it in the head section of your we ite:
< cript type=text/javascript src=" wfobject.j quot gt lt;/script
Second, give the HTML element in which the SWF should di lay a unique id:
div id=flashba erthis will be replaced by the SWF./div
Third, i tantiate an SWFObject below the named HTML element, and put all parameters in there (for a full list of parameters, read the SWFObject We ite):
< cript type=text/javascript
var so = new SWFObject('mp3player.swf','mpl','300','250','7');
so.addParam('allowfullscreen','true');
so.addVariable('file','song.mp3');
so.addVariable('autostart','true');
so.write('flashba er');
/script
The SWFObject i tance will create the code needed to embed the mp3player.swf. It sets it's dime io to 300 by 250 pixels and also sends it Flashvars for the file and autostart variables. Last, the i tance replaces the text by the SWF, so we can see a Flash movie directly embedded in our page, without borders and confusing clicks!
Wra ing Up
The implementation of SWFObject wra up this general overview of the embedding of Flash in we ites. For questio or hints, or in case I've forgotten anything, please join this site's forum and let us know!
| 2007年11月26日 星期一
上午 11:33
| 2007年09月12日 星期三
上午 01:54
| 2007年02月09日 星期五
上午 00:34
又一次病了,
她感觉不到痛,
没有病的人承受着由这病而带来的伤痛。
希望她快点好,
真的她不知道去了哪?
| 2007年02月09日 星期五
上午 00:09
在地球上千千万万种生物当中,人类是最脆弱、最需要安慰的,因为他们是动物,却被赋予了思想。我们水精灵即是为安慰地球上的人类而生
在朋友的空间里看见了这句话!然后就反复的在脑海里盘旋!
这是水精灵对于人的叹息!
我现在突然想起,蛇引诱亚当夏娃吃善恶树上果子的事
以前总是觉得,蛇并不坏。
蛇对女人说:你们不一定死,因为神知道你们吃的日子眼睛就明亮了,你们便如神能知道善恶。
我们客观的讲,蛇的话大部分算是实事求是。
人的眼睛明亮了,看见了自己的赤身祼体,人们会思考了。人第一次穿上了衣服无花果的树叶
从此爱神的思想与那从肉体而来的欲望就同时住在我们身上。那肉体的欲望让我***神的思想所厌恶的事。
我所愿意的,我并不作,我所恨恶的,我倒去作
因为他们是动物,却被赋予了思想
| 2007年01月25日 星期四
下午 12:42
我找了好多,加了两个为好友,百度空间中国的my ace支持百度,网页版qq,比qq好用。
我不是为百度做广告呀,
以前在新浪注册个blog时间长了,忘了账号就不知道怎么找回了,还有新浪那个域名,明显歧视,他们的管理思想太落后了,太差劲,看吧,百度空间一定后来居上,
| 1 文章分类 (16) (20) (6) (2) (5) (7) (9) (1) (3) (11) (10) (2) (5) 文章存档 最新文章评论 2011 Baidu