Professional Web Applications Themes

Film Loops Speed Up With Volume Control Knob - Macromedia Director Lingo

Hi All, I have a customized volume control knob for my site. The volume control knob works great but the film loops speed up dramatically when the volume control knob is used. Any ideas how I can keep the film loops at their current frame rate????? The script is as follows: -- DESCRIPTION -- Property pConstraint, pBar, pDirection Property pText, pTextName, pSound, pSoundName on getPropertyDescriptionList me set pdlist to [:] addprop pdlist, #pConstraint, [#comment:"Constraint Sprite", #format:#integer, #default:3] addprop pdlist, #pBar, [#comment:"Bar Sprite", #format:#integer, #default:4] addprop pdlist, #pDirection, [#comment:"Direction", #format:#symbol, #default:#Verticle, #range:[#Verticle,#Horizontal]] addprop pdlist, #pText, [#comment:"Put the SoundLevel into Feild" & ...

  1. #1

    Default Film Loops Speed Up With Volume Control Knob

    Hi All,

    I have a customized volume control knob for my site. The volume control knob works great but the film loops speed up dramatically when the volume control knob is used.

    Any ideas how I can keep the film loops at their current frame rate?????

    The script is as follows:

    -- DESCRIPTION --

    Property pConstraint, pBar, pDirection
    Property pText, pTextName, pSound, pSoundName


    on getPropertyDescriptionList me
    set pdlist to [:]
    addprop pdlist, #pConstraint, [#comment:"Constraint Sprite", #format:#integer, #default:3]
    addprop pdlist, #pBar, [#comment:"Bar Sprite", #format:#integer, #default:4]
    addprop pdlist, #pDirection, [#comment:"Direction", #format:#symbol, #default:#Verticle, #range:[#Verticle,#Horizontal]]
    addprop pdlist, #pText, [#comment:"Put the SoundLevel into Feild" & RETURN, #format:#boolean, #default:0]
    addprop pdlist, #pTextName, [#comment:"Feild Member Name", #format:#symbol, #default:#Volume]
    addprop pdlist, #pSound, [#comment:"Make a Sound on MouseUp" & RETURN, #format:#boolean, #default:0]
    addprop pdlist, #pSoundName, [#comment:"Sound Member Name", #format:#symbol, #default:#ding]
    return pdlist
    end getPropertyDescriptionList

    on mouseEnter me
    cursor 260
    end

    on mouseUp me
    cursor 260
    end mouseUp

    on mouseLeave me
    cursor -1
    end


    on beginSprite me
    set the constraint of sprite pBar to pConstraint
    -- SETS THE BAR TO IT'S APPROPRIATE POSITION IN ACCORDANCE WITH THE SOUNDLEVEL
    case pDirection of
    #Verticle: set the locv of sprite pBar=((the bottom of sprite pConstraint)-((the soundlevel-1)*(the height of sprite pConstraint)/7))
    #Horizontal:set the loch of sprite pBar=((the left of sprite pConstraint)+((the soundlevel-1)*(the width of sprite pConstraint)/7))
    end case
    if pText=1 then
    put the soundlevel into member string(pTextName)
    end if
    end

    on mouseDown
    cursor 290
    repeat while the stilldown
    case pDirection of
    #Verticle:
    set the locv of sprite pBar to the mousev
    set the soundLevel=(((the bottom of sprite pConstraint)-(the locv of sprite pBar))/((the height of sprite pConstraint)/7))+1
    #Horizontal:
    set the loch of sprite pBar to the mouseh
    set the soundLevel=(((the loch of sprite pBar)-(the left of sprite pConstraint))/((the width of sprite pConstraint)/7))+1
    end case
    if pText=1 then
    put the soundlevel into member string(pTextName)
    end if
    updatestage
    end repeat
    if pSound=1 then
    puppetsound member string(pSoundName)
    end if

    end


    ScottE Guest

  2. #2

    Default Re: Film Loops Speed Up With Volume Control Knob

    "ScottE" <elkinsmsaol.com> wrote in message
    news:bo1rfb$t0s$1forums.macromedia.com...
    >
    > Any ideas how I can keep the film loops at their current frame rate?????
    >
    > repeat while the stilldown
    ....
    > updatestage
    > end repeat
    This is your problem right here. What you need to do is instead of using
    repeat while the stillDown, you must restructure the loop to allow the movie
    to run at the normal frame rate, and then you can also take out the
    updateStage (which is the part that's affecting the frame rate). Basically
    it looks a bit like this:

    property pClicked

    on mouseDown me
    pClicked = true
    end

    on mouseUp me
    pClicked = false
    end

    on mouseUpOutside me
    pClicked = false
    end

    on enterFrame me
    if( pClicked ) then
    -- Put your code in here, minus the updateStage
    end if
    end

    - Robert


    Robert Tweed Guest

  3. #3

    Default Re: Film Loops Speed Up With Volume Control Knob

    Hi Robert,

    Perfect! That works like a charm! Many thanks.

    This is the final script that works beautifully for anyone who can use it:

    -- DESCRIPTION --

    Property pConstraint, pBar, pDirection
    Property pText, pTextName, pSound, pSoundName
    Property pClicked


    on getPropertyDescriptionList me
    set pdlist to [:]
    addprop pdlist, #pConstraint, [#comment:"Constraint Sprite", #format:#integer, #default:3]
    addprop pdlist, #pBar, [#comment:"Bar Sprite", #format:#integer, #default:4]
    addprop pdlist, #pDirection, [#comment:"Direction", #format:#symbol, #default:#Verticle, #range:[#Verticle,#Horizontal]]
    addprop pdlist, #pText, [#comment:"Put the SoundLevel into Feild" & RETURN, #format:#boolean, #default:0]
    addprop pdlist, #pTextName, [#comment:"Feild Member Name", #format:#symbol, #default:#Volume]
    addprop pdlist, #pSound, [#comment:"Make a Sound on MouseUp" & RETURN, #format:#boolean, #default:0]
    addprop pdlist, #pSoundName, [#comment:"Sound Member Name", #format:#symbol, #default:#ding]
    return pdlist
    end getPropertyDescriptionList

    on mouseEnter me
    cursor 260
    end

    on mouseUp me
    pClicked=false
    end mouseUp

    on mouseLeave me
    cursor -1
    end

    on mouseDown me
    cursor 290
    pClicked=true
    end

    on mouseUpOutside me
    pclicked=false
    end

    on beginSprite me
    set the constraint of sprite pBar to pConstraint
    -- SETS THE BAR TO IT'S APPROPRIATE POSITION IN ACCORDANCE WITH THE SOUNDLEVEL
    case pDirection of
    #Verticle: set the locv of sprite pBar=((the bottom of sprite pConstraint)-((the soundlevel-1)*(the height of sprite pConstraint)/7))
    #Horizontal:set the loch of sprite pBar=((the left of sprite pConstraint)+((the soundlevel-1)*(the width of sprite pConstraint)/7))
    end case
    if pText=1 then
    put the soundlevel into member string(pTextName)
    end if
    end

    on enterFrame
    if(pClicked) then
    case pDirection of
    #Verticle:
    set the locv of sprite pBar to the mousev
    set the soundLevel=(((the bottom of sprite pConstraint)-(the locv of sprite pBar))/((the height of sprite pConstraint)/7))+1
    #Horizontal:
    set the loch of sprite pBar to the mouseh
    set the soundLevel=(((the loch of sprite pBar)-(the left of sprite pConstraint))/((the width of sprite pConstraint)/7))+1
    end case
    if pText=1 then
    put the soundlevel into member string(pTextName)
    end if

    if pSound=1 then
    puppetsound member string(pSoundName)
    end if
    end if



    ScottE Guest

Similar Threads

  1. Controlling film loops
    By yoyoyoyoyoyoyoyok in forum Macromedia Director Basics
    Replies: 2
    Last Post: March 7th, 11:17 PM
  2. issue with film loops and memory?
    By AJJA17 webforumsuser@macromedia.com in forum Macromedia Director Lingo
    Replies: 0
    Last Post: December 10th, 02:39 PM
  3. controlling Film Loops with lingo?
    By Loren Schwarz in forum Macromedia Director Lingo
    Replies: 4
    Last Post: September 19th, 09:28 PM
  4. film speed
    By The Review in forum Photography
    Replies: 1
    Last Post: August 20th, 01:42 PM
  5. Film Loops and blinking
    By David Downie in forum Macromedia Director Lingo
    Replies: 1
    Last Post: July 18th, 05:43 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139