SetSoundtrack() not working

Discuss Moho bugs (or suspected bugs) with other users. To report bugs to Smith Micro, please visit support.smithmicro.com

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
7feet
Posts: 840
Joined: Wed Aug 04, 2004 5:45 am
Location: L.I., New Yawk.
Contact:

SetSoundtrack() not working

Post by 7feet »

Thanks, LM, for throwing this in, but it's not working correctly. So what I did:

Print the path of the current soundtrack using moho.document:Soundtrack(). That reports correctly. Set a new one with SetSoundtrack, and then print moho.document:Soundtrack() again. Still looks good. However, the new soundtrack isn't actually assigned. The old one still plays and displays in the timeline. Ack!

I have a whole passel of pretty nifty sound stuff about ready to go, but I need this lil' doodad so it's a bit of a bummer. If you could look into it I'd greatly appreciate it. Oh, yeah, this is using 5.2 on Win2k. Thanks again.
User avatar
Rai López
Posts: 2292
Joined: Sun Aug 08, 2004 1:41 pm
Location: Spain
Contact:

Post by Rai López »

HI! There is a 5.2.1 version available, althought LM say nothing about a possible solution of this bug in the announcements post... but well, who knows :roll: ...GOOD LUCK!!!
User avatar
7feet
Posts: 840
Joined: Wed Aug 04, 2004 5:45 am
Location: L.I., New Yawk.
Contact:

Post by 7feet »

I tried 5.21 right after I posted, still a no-go. I just hadn't installed it yet because it's a pain to track down and reinstall all my scripts.
User avatar
Lost Marble
Site Admin
Posts: 2355
Joined: Tue Aug 03, 2004 6:02 pm
Location: Scotts Valley, California, USA
Contact:

Post by Lost Marble »

You're right - it isn't working. I'll get it fixed for the next update. I don't remember what script you're working on that needs to do this?
User avatar
7feet
Posts: 840
Joined: Wed Aug 04, 2004 5:45 am
Location: L.I., New Yawk.
Contact:

Post by 7feet »

A mixer of sorts. The first one I was trying to use it with was the PadSound script I put over in the swcripting section. Basically, add silence to the begginning of an audio file so that it starts at the currently selected frame, and then assign it as the soundtrack. But once it's working I'm planning on putting together a reasonable audio mixer script (that should make some people happy). I wrote a buncha audio routines in Lua, so I might as well use them. Thanks.

Also, I believe it's been mentioned before, but is there anything in place that will allow me to get the path of the currently opened Moho file? I have a few things that need to produce data files to keep track of things, and it would be a lot simplern to keep track of things to just be able to save them to the same folder as the moho file.

And I have one other question - Is there acces in the scripting interface to the animatable bone dynamics keyframe values yet, and if so, what are the called? Thanks again.
User avatar
Lost Marble
Site Admin
Posts: 2355
Joined: Tue Aug 03, 2004 6:02 pm
Location: Scotts Valley, California, USA
Contact:

Post by Lost Marble »

7feet wrote:Also, I believe it's been mentioned before, but is there anything in place that will allow me to get the path of the currently opened Moho file?
No, but I think that can be added.
7feet wrote:And I have one other question - Is there acces in the scripting interface to the animatable bone dynamics keyframe values yet, and if so, what are the called? Thanks again.
Yes. If you have a bone object, then it would be:

bone.fBoneDynamics

It's a AnimBool object, so you could do things like

bone.fBoneDynamics:SetValue(144, true)
if (bone.fBoneDynamics.value) then
...
end
User avatar
7feet
Posts: 840
Joined: Wed Aug 04, 2004 5:45 am
Location: L.I., New Yawk.
Contact:

Post by 7feet »

Gotcha. Thanks. I figured out the dynamics bit a little after I posted it from the "expecting type animbool" error.

And if you throw in those couple of doodads, I'd be quite happy.
Post Reply