MCML Examples

sample MCML code used by ParaWorld

Title sample MCML code used by ParaWorld
Author(s) LiXizhi
Date 2008/3/18
File script/kids/3DMapSystemApp/mcml/mcml_samples.lua

Description

MCML is used in various places in ParaWorld's social user interface. Here we present a few MCML code samples.

TIP Sample Code

NPL.load("(gl)script/kids/3DMapSystemApp/mcml/mcml_samples.lua");
-- this file is for documentation purposes only. 
%TESTCASE{"MCMLExamples", func="commonlib.NPLDocGen.GenerateTWikiTopic", input={WikiWord = "MCMLExamples", ClassName = "MCML Examples", input = {"script/kids/3DMapSystemApp/mcml/mcml_samples.lua"},}}%

Member Functions

Login

MCML for front page login

  • code __ : script/kids/3DMapSystemUI/Desktop/LoginPage.html
  • code __ : script/kids/3DMapSystemApp/Login/StartPage.html

syntax

function Login()

source code samples

source path script/kids/3DMapSystemUI/Desktop/LoginPage.html
%CODE{"html"}% Login Page

用户名:
密码:
域名:
记住密码
<pe:if-not condition='<%=ReleaseBuild%>'> </pe:if-not>
DefaultButton="true" style="margin-right:10px;width:110px;height:32px;font-weight:bold;color:#043759;background:url(Texture/3DMapSystem/Desktop/LoginPageButton_HL3.png:15 15 15 16)" type="submit" name="login" value="登录" onclick="Map3DSystem.UI.Desktop.OnClickConnect"/>
http://pedn.paraengine.com" class="a_inverse" href="%WIKI%/Main/WebHome">
帕拉巫开发网

Release v1.0.0(c) 2008 ParaEngine

%ENDCODE%

UserRegistration

MCML for user registration

  • code __ : script/kids/3DMapSystemApp/Login/NewUserRegPage.html
  • code __ : script/kids/3DMapSystemApp/profiles/AvatarRegPage.html
  • code __ : script/kids/3DMapSystemApp/profiles/ProfileRegPage.html
  • code __ : script/kids/3DMapSystemApp/profiles/MapRegPage.html

syntax

function UserRegistration()

source code samples

source path script/kids/3DMapSystemApp/Login/NewUserRegPage.html
%CODE{"html"}% New User Registration Page by LiXizhi 2008.2 <pe:tab-item text="注册" selected="true">

帕拉巫 (ParaWorld) 是一个3D 社交与创作平台 把你的创造展现给你和你周围的人

Now in 3D! 加入它你可以…
  • 联络朋友,了解他们的最新动态
  • 创造3D世界、游戏、电影,展示自我
  • 找到老同学结识新朋友
  • 和朋友分享你的创作、相片和电影
  • 交流爱好和想法
  • 组织3D派对和其他活动
  • 建立您自己的3D互联网产业
立即注册新用户
它是免费的

用户名:

密码:

确认密码:

电子邮箱:

性别:

出生日期:
DefaultButton="true" class="defaultbutton" name="register" value="接受条款并注册!" style="height:26px" onclick="Map3DSystem.App.Login.ParaworldStartPage.OnMCML_UserRegister"/>
点击以上的注册按钮,我们将认为您已阅读并同意遵守ParaWorld服务条款
</pe:tab-item> <pe:tab-item text="我可以做些什么?">

地球尺度的世界,地球尺度的人口

一个前所未有的人类新文明,将全世界的网络资源团结起来

编织真实关系网

  • 联络朋友,了解他们的最新动态
  • 创造3D世界、游戏、电影,展示自我
  • 找到老同学结识新朋友
  • 和朋友分享你的创作、相片和电影
  • 交流爱好和想法
  • 组织3D派对和其他活动
  • 创造3D世界

  • 创建我的3D家园
  • 制作我的3D电影
  • 发行我的多媒体作品
  • 创办我的3D互联网产业
  • 人类新文明的参与者、创作者、贡献者
  • 娱乐在3D社交平台

  • 在你我的3D家园组织Party
  • 遨游在地球尺度的世界,见识到全世界人口的智慧
  • 开放我的娱乐天地,海纳天下客
  • 在朋友之间游戏娱乐
  • </pe:tab-item> <pe:tab-item text="开发网">

    每个人都可以参与到社区应用程序的开发中。让你的创意在成千上万的人群中传播
    只需10分钟就可以建立你自己的社区应用程序。 我要了解更多

    应用程序开发向导

    学习开发自己的社交应用程序

    MCML

    MCML portal

    NPL

    NPL portal

    ParaWorld API

    ParaWorld API portal

    Forum

    Developer Forum
    </pe:tab-item>

    %ENDCODE%

    source path script/kids/3DMapSystemApp/profiles/ProfileRegPage.html
    %CODE{"html"}% Profile registration page

    你可以通过隐私设置控制谁可以看见以下内容

    * 姓名:
    请用中文姓名

    * 性别:

    * 出生日期:

    * 家乡:


    每一项联系信息都可以单独设置隐私,请放心填写

    电子邮箱:

    QQ号码:

    MSN:

    手机号码:

    固定电话:

    网站:


    这里填写的信息, 对你感兴趣的人可以看到

    交友/婚姻状况:

    对谁感兴趣:
    女生/女士 男生/男士
    寻求:
    朋友 婚姻 笔友 圈子


    你可以通过隐私设置控制谁可以看见以下内容

    您可以从外部程序复制(Ctrl+C)粘贴(Ctrl+V)到下面文本框中。
    兴趣爱好:

    自我表述:


    填写学校信息,可以帮助你找到老同学,你可以通过隐私设置控制谁可以看见以下内容

    大学:
    如果列表中没有,你可以添加大学

    院系:
    如果列表中没有,你可以添加院系


    高中:
    如果列表中没有,你可以添加学校

    班级:

    初中:

    小学:


    填写工作信息,可以帮助你找到过去和现在的同事,你可以通过隐私设置控制谁可以看见以下内容

    公司:

    描述:

    工作时间:
    我现在在这家公司工作
    开始工作的年份:


    当前头像


    请上传大头照, 方便朋友认出你

    上传头像


    上传真实头像, 可以使你的访问次数提高200%以上,并且有机会出现在社区首页

    支持 JPG、JPEG、GIF、BMP 和 PNG 文件格式,最大4M。头像高度超出宽度1.5倍的部分会被切除。

    你知道么?

    你可以将上传的图片或朋友的图片,放置在自己的3D世界中。了解更多...
    %ENDCODE%

    MCML_Testcases

    test cases used when developing MCML

    • code __ : script/kids/3DMapSystemApp/mcml/test/browser.xml
    • code __ : script/kids/3DMapSystemApp/mcml/test/dlg_layoutflow.xml
    • code __ : script/kids/3DMapSystemApp/mcml/test/dlg_tabs.xml

    syntax

    function MCML_Testcases()

    source code samples

    source path script/kids/3DMapSystemApp/mcml/test/browser.xml
    %CODE{"xml"}% TestFileBrowser_onclick(name, filepath) document:GetPageCtrl():SetUIValue("filepath", filepath); end

    function TestFileBrowser_OnDoubleClick(name, filepath) _guihelper.MessageBox(tostring(filepath)); end

    function TestSwitchTab(name, filepath) document:GetPageCtrl():SetUIValue("testTabs", 1); end

    function OnCheckFileBrowser(name, treeNode, filepath, Checked) if(treeNode and filepath) then if(Checked) then _guihelper.MessageBox("you checked "..filepath); else _guihelper.MessageBox("you UNchecked "..filepath); end end end

    function OnCreateNodeFileBrowser(name, treeNode, filepath) if(treeNode and filepath) then if(string.find(filepath, "lua$"))then -- check all *.lua file and make the text blue treeNode.TextColor = "#0066cc"; treeNode.Checked = true; end end end

    function RefreshPage() document:GetPageCtrl():SetUIValue("RefreshCounter", "page will be refreshed in 3 seconds"); document:GetPageCtrl():SetNodeValue("RefreshCounter", "Page refreshed!!!"); document:GetPageCtrl():Refresh(3); end

    function OnClickTabItem(tabpagename) _guihelper.MessageBox(tabpagename.." is clicked after controls inside are created\n"); end

    ]]> <pe:tab-item text="fileBrowser Canvas3D">

    Please select from below
    CheckBoxes="true" oncheck="OnCheckFileBrowser" oncreatenode="OnCreateNodeFileBrowser">
    This is an canvas 3d:
    AssetFile= "model/05plants/01flower/01flower/flower10_v_a.x", x=0,y=0,z=0, } ]]>
    </pe:tab-item>

    <pe:tab-item text="class test" name="classTest" onclick="OnClickTabItem">
    the following is from a treeview control

    Start&nspb;Begin发网的计划End

    some red text
    <pe:editor-buttonset class="box"> <pe:editor-button text="button3.set1" class="highlightbutton"/> <pe:editor-button text="button3.set1"/> </pe:editor-buttonset>

    </pe:tab-item>

    <pe:tab-item text="alignment"> file uploader test container alignment test right bottom left bottom right top _ctt:center top _ctb:center bottom _ctb:center left _ctb:center right _ct:center </pe:tab-item>

    <pe:tab-item text="pagerefresh" selected="true"> page refresh test </pe:tab-item>

    <pe:tab-item text="editor test"> some inner text some inner text some inner text some inner text some inner text some inner text <pe:editor-buttonset> <pe:editor-button text="button3.set1"/> <pe:editor-button text="button3.set1"/> </pe:editor-buttonset> <pe:editor-text name="edtBox1" label="pe:editor-text" text="default text"/> <pe:editor-text name="edtBox2" label="multi-line(3 rows)" text="default text" rows="3"/> <pe:editor-divider /> <pe:editor-custom label ="pe:editor-custom" height="30"></pe:editor-custom> <pe:editor-divider /> <pe:editor-button name="TestSubmitBtn" text="test submit" onclick="test_pe_editor_button_onclick"/> trailing test </pe:tab-item> %ENDCODE%

    source path script/kids/3DMapSystemApp/mcml/test/dlg_tabs.xml
    %CODE{"xml"}%

    <pe:tab-item text="treeview test"> the following is from a treeview control

    plain text

    p style="color:#55AA22"

    long text auto tree node height;long text auto tree node height;long text auto tree node height sub node1

    p style="color:#55AA22"

    long text auto tree node height;long text auto tree node height;long text auto tree node height

    h1 title

    h2 title

    h3 title

    h4 title


    para graph test here

    HTML href text: pe_a
    • list 1:
    • list 2: long text long text long text long text long text long text long text
    • list 3:

    </pe:tab-item>

    <pe:tab-item text="html test"> some inner text some inner text some inner text some inner text some inner text some inner text

    h1 title

    h2 title

    h3 title

    h4 title


    para graph test here

    HTML href text: pe_a
    style="position:absolute;left:87px;top:40px;width:250" and image inside a href
    • list 1:
    • list 2: long text long text long text long text long text long text long text
    • list 3:
    </pe:tab-item>

    <pe:tab-item text="editor test" selected="true"> some inner text some inner text some inner text some inner text some inner text some inner text <pe:editor-buttonset> <pe:editor-button text="button3.set1"/> <pe:editor-button text="button3.set1"/> </pe:editor-buttonset> <pe:editor-text name="edtBox1" label="pe:editor-text" text="default text"/> <pe:editor-text name="edtBox2" label="multi-line(3 rows)" text="default text" rows="3"/> <pe:editor-divider /> <pe:editor-custom label ="pe:editor-custom" height="30"></pe:editor-custom> <pe:editor-divider /> <pe:editor-button name="TestSubmitBtn" text="test submit" onclick="test_pe_editor_button_onclick"/> trailing test </pe:tab-item> %ENDCODE%


    This topic: Main > NPL > MCMLExamples
    Topic revision: r1 - 2008-02-29 - LiXizhi
     
    This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
    Ideas, requests, problems regarding TWiki? Send feedback