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

相关推荐
奕鼎竜瑆几秒前
Solid 前端响应式开发从零到精通
前端·人工智能
夜听莺儿鸣28 分钟前
502-002_Linux驱动开发模块化编程
linux·驱动开发·模块化编程
动恰客流统计32 分钟前
景区客流统计怎么做?兼顾管控与运营的实施方案解析
大数据·前端·人工智能
wuminyu1 小时前
C++协程实现接收端的零拷贝Buffer管理原理剖析
java·linux·c语言·jvm·c++
派小心.1 小时前
A/B测试工具免费版够用吗?
前端·数据分析
前端snow2 小时前
ai agent --- redis 缓存
前端
科力锐品牌君2 小时前
应用级灾备 | 海量非结构化数据如何实现高效数据保护
linux·运维·网络·安全·系统安全·数据安全·灾备
zhangrelay2 小时前
ROS项目设计案例智能大模型正经乱答案例
linux·笔记·学习·ubuntu·机器人
duanshu_3 小时前
官网表单与下载异常怎么排查?五个环节定位故障
前端·自动化·flyweight
流浪0013 小时前
Linux系统篇39——线程(四) pthread库的由来和线程的创建与等待
linux·操作系统·线程·pthread库