krpano 字符串拼接,传参。

xml 复制代码
<action name="onstartsounds301" scope="local" args="mpurl">
<!--        str = get(mpurl) + ".mp3";-->
        strUrl = '%CURRENTXML%/mp3/'+get(mpurl) + ".mp3";
<!--        createsound(jj)-->
<!--		playsound(bgsnd,('%CURRENTXML%/mp3/' + mpurl + '.mp3'));-->
		playsound(bgsnd,(strUrl));
    </action>

字符串拼接传参

错误方式

xml 复制代码
1.  playsound(bgsnd,'%CURRENTXML%/mp3/'+mpurl+ '.mp3');
2.  strUrl = '%CURRENTXML%/mp3/'+get(mpurl) + ".mp3";
playsound(bgsnd,strUrl );

正确方式

xml 复制代码
1.  playsound(bgsnd,('%CURRENTXML%/mp3/' + mpurl + '.mp3'));
2.  strUrl = '%CURRENTXML%/mp3/'+get(mpurl) + ".mp3";
playsound(bgsnd,(strUrl));

论坛地址 :https://krpano.com/forum/wbb/index.php?thread/19820-syntax/\&postID=92670\&highlight=playsound#post92670

相关推荐
盐焗鹌鹑蛋1 小时前
【Linux】动静态库的制作与使用
linux
小赵同学WoW1 小时前
1-2 TypeScript 中的 `any` 与 `unknown`
前端
six_1 小时前
C# 上位机(持续更新中)
前端·面试·c#
风雨_1 小时前
Git Worktree sourcetree完整使用指南
前端
半个落月1 小时前
React 组件通信进阶:useContext 与自定义 Hook 实战详解
前端·react.js
用户921080262862 小时前
ChatComposer 输入区改造:基于技能市场实现 Agent 输入框
前端
用户45989204565162 小时前
一套 KMP 多仓库版本治理工作流:用 Version Catalog + CI 把发版流水线自动化
前端·kotlin
小赵同学WoW2 小时前
1-4 TypeScript 中的 `number`、`bigint` 与 `string`
前端
艾伦_耶格宇2 小时前
【ELK】-4 logstash的搭建及操作
linux·运维·ubuntu·elk
小赵同学WoW2 小时前
1-3 `boolean` 与字面量类型
前端