Professional Web Applications Themes

imporovement to part of my script - Macromedia Director Basics

hi, no i tried it, and it did not work, but looks like it the right ball park. this is what i used, it does not pickup anything if the mouseMember > 0 then memNameNum =value( member(the mouseMember).name) if memNameNum > 0 then pdl = Files[memNameNum] end if end if cheers lee "JB" <lingoguysbcglobal.net> wrote in message news:lingoguy-7CD6A3.11560301082003forums.macromedia.com... > if indeed you have members named "01", "02", "03"... > > > you may be able to replace the if-then statements with a function that > handles any number > > if the mouseMember > 0 then > memNameNum =value( member(the ...

  1. #1

    Default Re: imporovement to part of my script

    hi,
    no i tried it, and it did not work, but looks like it the right ball park.
    this is what i used, it does not pickup anything

    if the mouseMember > 0 then
    memNameNum =value( member(the mouseMember).name)

    if memNameNum > 0 then
    pdl = Files[memNameNum]
    end if
    end if

    cheers
    lee


    "JB" <lingoguysbcglobal.net> wrote in message
    news:lingoguy-7CD6A3.11560301082003forums.macromedia.com...
    > if indeed you have members named "01", "02", "03"...
    >
    >
    > you may be able to replace the if-then statements with a function that
    > handles any number
    >
    > if the mouseMember > 0 then
    > memNameNum =value( member(the mouseMember).name )
    >
    > if memNameNum > 0 then then pdl = Files[memNameNum]
    >
    >
    > as long as no other members on stage have names startig with numerical
    > digit, they yield memNameNum = 0, this code should work.
    >
    > value( "01") is 1

    LeeD Guest

  2. #2

    Default Re: imporovement to part of my script

    cheers rob, MosseMilk did this and it works fine.
    thanks for your time
    lee

    -------------------
    Files = ["txt01","txt02"]
    pdl = [] -- Why list? Why not pdl = 0 ?

    a = void
    a = the mousemember

    if a <> void then
    num = integer(a.name)
    pdl = files [ num ]
    end if
    --------------

    "Rob Dillon" <robddg-designs.com> wrote in message
    news:040820030907467519%robddg-designs.com...
    > Hi Lee,
    >
    > You could just make a second list of the possible mouseMembers. For
    > instance:
    >
    > -- someWhere in your initialization...
    > memberList = ["01","02","03"]
    > files = ["txt01","txt02","txt03"]
    > --
    >
    > on mouseUp me
    > pdl = files[memberList.getOne(the mouseMember.name)]
    > end
    >
    >
    > That's off the top of my head so there may be a paren out of place.
    >
    > Or, if you just want to concantenate the name based on the mouseMember:
    >
    > on mouseUp me
    > pdl = "txt" & the mouseMember.name
    > end
    >
    > --
    > Rob
    > _______
    > Rob Dillon
    > Team Macromedia
    > [url]http://www.ddg-designs.com[/url]
    > 412-243-9119
    >
    > [url]http://www.macromedia.com/software/trial/[/url]

    LeeD Guest

  3. #3

    Default Re: imporovement to part of my script

    > pdl = [] -- Why list? Why not pdl = 0 ?
    >
    > a = void
    These two lines are completely unnessesary.

    --
    Rob
    _______
    Rob Dillon
    Team Macromedia
    [url]http://www.ddg-designs.com[/url]
    412-243-9119

    [url]http://www.macromedia.com/software/trial/[/url]
    Rob Dillon Guest

Similar Threads

  1. ksh script - Preventing multiple runs of a particular script
    By Melissa in forum Linux / Unix Administration
    Replies: 4
    Last Post: June 26th, 01:49 PM
  2. 6.1 script not working on 7.0 server. Script used towork!
    By piaposa in forum Coldfusion Flash Integration
    Replies: 1
    Last Post: February 9th, 03:43 PM
  3. Running command from string variable as if part of script
    By Tushar Gokhale in forum PERL Beginners
    Replies: 3
    Last Post: December 23rd, 02:52 AM
  4. Execute shell script from a perl script
    By kderaedt in forum Perl / CGI
    Replies: 3
    Last Post: June 26th, 08:26 PM

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