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));