|
From: oreopeewee on 7 Jul 2006 08:31 I have to code to activate buttons for a video. I also have the slider bar and button activated. However, the slider button does not automatically progress while the video is playing but I can use the button to manually position the video. How can I get the button to progress automatically. thanks Here is the code I am using on mouseDown -- This assumes that the slider constraint -- is beneath the knob the user drags knobChan = the clickOn sliderChan = the clickOn - 1 -- assuming the video sprite is in sprite 1 vidChan=43 left = sprite(sliderChan).left right = sprite(sliderChan).right range = right - left offset = the mouseH - sprite(knobChan).locH dur = sprite(vidChan).member.duration factor = float(dur) / range sprite(vidChan).movieRate=0 repeat while the stillDown if (the mouseH > left) AND (the mouseH < right) then sprite(knobChan).locH = the mouseH updateStage sprite(vidChan).movieTime = (the mouseH - left) * factor end if end repeat -- sprite(vidChan).movieRate = 1 end mouseDown
From: Rob Dillon - Adobe Community Expert on 7 Jul 2006 10:00 Have you looked at the one in the Library? Code Library... Media... Quicktime... Quicktime Control Slider -- Rob _______ Rob Dillon Adobe Community Expert http://www.ddg-designs.com 412-243-9119 http://www.macromedia.com/software/trial/
From: oreopeewee on 7 Jul 2006 10:28 I have looked at the QT control slider and I cannot apply it to my slider button I can only apply it to the video itself. Do you know what I might be doing wrong?
From: Rob Dillon - Adobe Community Expert on 7 Jul 2006 14:27 You're not doing anything wrong. You need to also create the two sprites needed for a horizontal slider. You drag this behavior to the QT sprite and then tell it what sprite to use as the slider. Open the behavior in the behavior inspector, then you can read the instructions for use. -- Rob _______ Rob Dillon Adobe Community Expert http://www.ddg-designs.com 412-243-9119 http://www.macromedia.com/software/trial/
|
Pages: 1 Prev: Question about drop down list Next: slider bar to control frames in movie |