Home >Backend Development >PHP Tutorial >Writing Silverlight applications in PHP

Writing Silverlight applications in PHP

WBOY
WBOYOriginal
2016-06-23 14:34:46798browse

用PHP写Silverlight,用开源的解决方案来搞定Silverlight还是挺新鲜的。看着还是挺简单的。

1            2            3            4            5            6            7            8            9            10            11            12            13            14            15            16            
// 增加一个CANVAS tag             global $CANVAS;            global $cv;            $cv = new CanvasWrapper($CANVAS);            // 新建一个call back函数             function OnClick() {            global $cv;            //就是让一个小动画开始播放             $cv->moveCar->Begin();            }            // 当Silverlight初始化以后开始执行下面的东西,就是一个初始化用处的函数             function OnLoad() {            global $cv;            // 给carCanvas加一个鼠标事件             $cv->carCanvas->MouseLeftButtonDown->Add  (new MouseEventHandler("OnClick"));            }

作者最后给了一个Demo的源文件,没仔细看,貌似是个小游戏的样子。

详细的介绍大家看原文吧(学习简单英文很必要,不是说崇洋媚外,而是知己知彼),作者也是一个MVP,C#也很牛的说,呵呵,大家有兴趣可以多关注它的文章。
http://tomasp.net/blog/php-in-silverlight.aspx

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:PHP从checkbox取值Next article:php error_reporting 详解