SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Evangelist
    Join Date
    Jan 2001
    Location
    earth
    Posts
    501
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    how to pass a variable value to a member

    Hi.
    I have a doubt on doing something on Director.

    I have a TextField, named 'fielcategories', that is filled with data from a Database: 20 categories like: Actions, Food, Nature, Emotions.
    set sqlString ="Select namecategory from category where IDidioma = 'PT'"

    This is OK.


    What I want to do is:

    01.To detect which category do you have selected from the TextField. 02. Independently of the one selected the playback-head always go to the same marker, named 'category'. On this marker there is another TextField, named 'titlecategory', on which should be the name of the category choosen by the user at the point 01.

    Example:

    You have choose 'Animals'. You go to a frame where you have a field with ANIMALS write. If you choose 'Emotions'... This is the code on the TextField 'fielcategories':

    global namecategory

    on mouseDown me

    go to "category"

    pointmouse=the mouseLoc
    currentMember = sprite(7).member
    lineNum = pointToLine(sprite 7, pointmouse)
    namecategory=lineNum
    end


    This is the code at the marker:

    global namecategory

    on EnterFrame me
    member("titlecategory" ).text=string(namecategory)
    end


    What it's show is the number of the line.

    But I was thinking something like this:

    If lineNum 1 equals to the IDcategory 1, of the respective table on DB, and lineNum 2 equals to IDcategory 2 and so on...

    So something like:

    lineNum = 0 (default value)
    lineNum = IDcategory
    namecategory = lineNum

    [img]images/smilies/smile.gif[/img]
    Could anyone help me with this?
    Thank you.
    Last edited by magi; Jun 6, 2003 at 11:48.

  2. #2
    gingham dress, army boots... silver trophy redux's Avatar
    Join Date
    Apr 2002
    Location
    Salford / Manchester / UK
    Posts
    4,838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hang on...is this a director question ?
    re·dux (adj.): brought back; returned. used postpositively
    [latin : re-, re- + dux, leader; see duke.]
    WaSP Accessibility Task Force Member
    splintered.co.uk | photographia.co.uk | redux.deviantart.com

  3. #3
    Gone!
    Join Date
    Aug 2001
    Location
    Witty Location Parody
    Posts
    3,889
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by redux
    hang on...is this a director question ?
    Yep!

  4. #4
    SitePoint Evangelist
    Join Date
    Jan 2001
    Location
    earth
    Posts
    501
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by redux
    hang on...is this a director question ?

    Opss. Yes. Is there any problem?


  5. #5
    gingham dress, army boots... silver trophy redux's Avatar
    Join Date
    Apr 2002
    Location
    Salford / Manchester / UK
    Posts
    4,838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well, just pointing out that it would have been nice if you had at least made passing mention of "i'm using director to do this, and here's my problem". i was just about to ask an advisor to move this thread to the database forum...that's all
    re·dux (adj.): brought back; returned. used postpositively
    [latin : re-, re- + dux, leader; see duke.]
    WaSP Accessibility Task Force Member
    splintered.co.uk | photographia.co.uk | redux.deviantart.com

  6. #6
    SitePoint Evangelist
    Join Date
    Jan 2001
    Location
    earth
    Posts
    501
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by redux
    well, just pointing out that it would have been nice if you had at least made passing mention of "i'm using director to do this, and here's my problem". i was just about to ask an advisor to move this thread to the database forum...that's all [img]images/smilies/wink.gif[/img]
    OK. I forgot. [img]images/smilies/blush.gif[/img]
    But I have written that now.

  7. #7
    SitePoint Evangelist
    Join Date
    Jan 2001
    Location
    earth
    Posts
    501
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's ok now:

    pointmouse=the mouseLoc
    lineNum = pointToLine(sprite 7, pointmouse)
    lineText=sprite(7).member.line[lineNum]
    nomecategoria=lineText


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
  •