help.i am in deep trouble with my boss???

Ask a Question related to Macromedia Director Lingo, Design and Development.

  1. #1

    Default help.i am in deep trouble with my boss???

    i can't figure anything.it doesn't work.
    i want to create a script that makes a field box understands a drag&drop text action when it is dropped there and put result on screen wrong or write.i mean take a word ,put it in a field box or text box and check if it is the wright one results correct otherwise wrong.
    any idea ? whould be helpful.
    thanks in advance...


    the is a big difference between living and just staying alive.
    jellobiafra webforumsuser@macromedia.com Guest

  2. Similar Questions and Discussions

    1. Deep Query Question
      I have three fields, Lname, employeeNo, and mgrEmployeeNo. Smith, 1EF87, 1RT43 would be Joe Smith who has an employee number of 1EF87 and his...
    2. directory levels deep
      how can if look at a folder and check how many level deep it is.. i have files in this structures.. that I need to put online.. the foldername...
    3. Convincing my boss
      Hello, I'm a DTP-er. I work for een Educational Instituut. I work for 4 years with Pagemaker. Now, at this time i want to convince my boss into...
    4. DBM::Deep is $$$
      Just wanted to say.. If you have never heard of, or tried this module; you may wish to check it out. This module is excellent imo.
    5. Deep copy
      Hi I find that when I need to do a deep copy that I usually just do the following: x = Marshal.load(Marshal.dump(y) Is there a more...
  3. #2

    Default Re: help.i am in deep trouble with my boss???

    I have a solution for you, but it is another way to achieve the same.
    First things first, create 3 answers. Let's say "One", "Two", and "Three". These are text members and you have to make them dragable.

    Well then, now we are going to create 3 "boxes". These Boxes need to be the same width and height as their correct answers. The boxes you can create to draw a rectangle with director. Set the 3 boxes invisible. On the first frame you can put a script were you set the boxes visibility to 0.
    I.E: We have the answers in the first 3 sprites.
    Then at sprites 4,5,6 we have the answer boxes
    In the script line you put the script:
    on exitframe me
    sprite(4).visible = 0
    sprite(5).visible = 0
    sprite(6).visible = 0
    end

    Okay, let's move on.
    Let's take the first answer: "one"
    What you are going to do is let director check if the co-ordinates of the answer are the same with the co-ordinates of the answer box.
    On the answer you put the following script:

    property pStartH, pStartV, pTargetH, pTargetV, goodVal
    on mouseUp me
    set pTargetH = 439 (This is the horizontal coordinate of the INVISIBLE ANSWER BOX)
    set pTargetV = 99 (This is the vertical coordinate of the INVISIBLE ANSWER BOX)
    set goodVal = 0

    if sprite(1).locH > (pTargetH) and sprite(7).locH <(pTargetH + 9)
    then
    set goodVal = goodVal + 1
    end if
    if sprite(1).locV > (pTargetV) and sprite(7).locV < (pTargetV + 7)
    then
    set goodVal = goodVal + 1
    end if

    if goodVal = 2 then
    sprite(8).member = member("answercorrect")
    else
    sprite(8).member = member("answerfalse")
    end if
    end

    What we see is that this script checks the coordinate of sprite 1 (the answer) and checks if it is in its proper place (the coordinates of target). When the dragged answer is in it's proper place then the sprite 8 (you have to create this one!!) will change in another member, answercorrect. Is it isn't in it's proper place then sprite 8 will change to answerfalse. This last 3 members can all be text members, so you can test if it works.So the large script is important. You'll need to put that on every answer, and make sure you measure the good coordinates of the answerboxes. (For lay-out you can make boxes, lines etc at other sprites, just to make it look better) If you need any help you can leave your mail adres, then i will help you further! good luck!



    Thyrecktorr webforumsuser@macromedia.com Guest

  4. #3

    Default Re: help.i am in deep trouble with my boss???

    Well... you can't drag text into a text or field sprite, so how are you
    trying to accomplish this? Are you attempting to drag another text or
    field sprite over another? Are you attempting to drag a bitmap of text?

    If you're dragging one text or field sprite over another, you can
    compare the contents of the members of those sprites:

    if sprite(X).member.text = sprite(Y).member.text then...

    or

    if sprite(X).member.word[1] = sprite(Y).member.word[1] then...

    or

    if sprite(Y).member.text contains sprite(X).member.text then...

    if you are trying to compare dissimilar media then you'll have to cme
    up with a way to hold some common value to compare across the two.

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

  5. #4

    Default Re:Change prop location in List

    I'm letting Director read the list and make sprites of the props, but when I do that, Director puts them in the order where the last prop is the first in the sprite row... (its like a menubar) but I want to write a script so that a user can edit the location where the sprite is put.

    thats why


    Eelco Heuvelmans webforumsuser@macromedia.com Guest

  6. #5

    Default Re:Change prop location in List

    ok so now we know ;)

    try using a list within a list like this :


    thelist = [#A123: [#pos: 1, #name:"number1"], #A456: [#pos: 2, #name: "number2"], #A789: [#pos:3, #name: "number3"]]

    then you can use the #pos property to keep track of where each sprite is and refer to it as follows :

    pos = thelist.a123.pos

    if you want to change the sprite's position then you don't actually have to move the values around instead you can simply set the #pos value to the new position like this :

    thelist.a123.setaprop(#pos,4)

    and then to see it's new position use :

    pos = thelist.a123.pos



    That's why you should never have to move the contents of a property list around !

    good luck.






    rick@mcorp webforumsuser@macromedia.com Guest

  7. #6

    Default Re: help.i am in deep trouble with my boss???

    thanks Thyrecktorr and rob for your help.
    i 'll try now and see if it works.
    my mail is [email]priopas@yahoo.com[/email] how can i communicate with you Thyrecktorr for further support?
    [email]priopas@yahoo.com[/email]

    the is a big difference between living and just staying alive.
    jellobiafra webforumsuser@macromedia.com Guest

Posting Permissions

  • You may not post new threads
  • You may 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