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

相关推荐
nuomigege1 小时前
beagleboneblack刷入官方IOT镜像后无法运行nodered问题的处理
linux·运维·服务器
gyx_这个杀手不太冷静1 小时前
OpenCode 深度解析:架构设计、工具链集成与工程化实践
前端·架构·ai编程
huaxiu52 小时前
ubuntu下应用打不开
linux·运维·ubuntu
m0_459252462 小时前
fastadmin动态渲染统计信息
开发语言·前端·javascript·php
m0_683124792 小时前
Ubuntu服务设置开机自启
linux·运维·ubuntu
BestOrNothing_20152 小时前
(1)双系统中Ubuntu22.04启动盘制作与启动盘恢复全过程
linux·ubuntu·双系统·启动盘制作·启动盘恢复
AI成长日志2 小时前
【实用工具教程】Linux常用命令速查与实战场景:文件操作、进程管理与网络调试高频命令解析
linux·php
该怎么办呢2 小时前
Source/Core/Matrix4.js
前端·javascript
MegaDataFlowers2 小时前
快速上手Spring
java·后端·spring
小江的记录本2 小时前
【MyBatis-Plus】Spring Boot + MyBatis-Plus 进行各种数据库操作(附完整 CRUD 项目代码示例)
java·前端·数据库·spring boot·后端·sql·mybatis