Hiding & Unhiding Sprite with Lingo?!

Whats up guys; here's the situation.
I have some videos that play; the problem is that it's
unclear when each video is done playing. So the client wants me to
flash the next button once the video in that section is done
playing.
So here's what I have; I set the visibility of the
highlighted next button to 0 on the first frame. Then I detect the
currentTime of the video and once it reaches the end I set the
visibility to 1.
Works perfectly, the video stops and the next button appears.
The problem is that I can't "re-hide" the next button once the user
starts the next video clip.
I tried using the same function as I do in the first frame,
but the next button just won't hide. Here's my Lingo:
First Frame to hide the nextbutton:
on exitFrame
sprite("nextbuttonroll").visible = 0
end
Lingo to unhide the Next button once a video is done:
on Exitframe
if sprite("capitol").currentTime > 5000 then
sprite("nextbuttonroll").visible = 1
end if
end
Then 1 frame before the next video starts I just pasted that
first line again:
on exitFrame
sprite("nextbuttonroll").visible = 0
end
And it just stays there. It seems like that second function
is forever stored in memory and it never wants to re-hide the next
button.
Any ideas? Can I clear the memory using unLoadMember or
something?

Jeez...talk about a headache over nothing.
The problem was that I was viewing it in Director (not the
published projector) and for some reason buttons tend to stay in
there roll0over state. (something about how Director does it's
Window Focusing)
Anyway, I published the file and it works perfectly.
So the code above is legit if someone wants to use it.

Similar Messages

  • Toggle Full Screen with lingo?

    Hi there,
    I have just got a Mac mini 10.6.2 and I'm testing exporting mac projectors from Dir11.5 on XP.
    What I'd like to achieve is to swap between two states whilst playing the projector.
    State 1: Small draggable Windowed state with title bar and Mac Dock / desktop visible.
    State 2: Pure 800x600 Full Screen with No Dock or title bar visible.
    I am using BuddyAPI successfully to switch monitor screen modes to 800x600 and back again to native res.
    My problem is, if I want to hide the dock and title bar, I seem to have to publish with the "Full Screen" checkbox ticked in the publish settings. This means when I switch back to native res windowed mode there is the solid movie background colour hiding the mac desktop and dock (as you'd expect).
    Is there a way to turn full screen (black out the desktop and dock) on and off during runtime with lingo?
    I know its a long shot, but though I'd check with the pros before assuming it's not possible.
    Cheers
    Richard Smith

    My understanding is that Flash will not allow you to do that.
    Full screen mode is invoked only if explicitly requested from
    within the flash on mouse events.

  • Search text on RTF with lingo

    dear all ...
    can help me?..
    I make glossary with RTF text because on RTF Text is easy to change content but can help me to make search text or word on RTF text with lingo..?
    Thankyou

    Changing the BG colour of a chunk of text is not easy. It can be done with some imaging-lingo hoop-jumping, or by having a pool of shape sprites that can be dynamically allocated, sized and positioned.
    Place the following in a JavaScript typed #movie script:
    function jsSearch (aString, aMatch) {
      var aPattern = new RegExp(aMatch, "gi");
      var found;
      var results = list();
      while((found = aPattern.exec(aString)) != null) {
        results.append(found.index);
      return results;
    and this in a "regular" Lingo #movie script:
    on mHighlightMatches aMember, aString
      -- error check inputs
      if ilk(aMember, #member) = 0 then
        aMember = member(aMember)
        if ilk(aMember, #member) = 0 then
          exit
        end if
      end if
      if stringP(aString) = 0 then aString = string(aString)
      if stringP(aString) = 0 then exit
      -- will only work with #text nmembers
      if (aMember.type <> #text) then exit
      aMember.color = rgb(0, 0, 0)
      len = length(aString)
      lMatchPositions = jsSearch(aMember.text, aString)
      if count(lMatchPositions) = 0 then
        alert "Search text not found"
      else
        repeat with aStart in lMatchPositions
          aMember.char[aStart..(aStart + len)].color = rgb(255, 255, 0)
        end repeat
      end if
    end
    and now your button script might look like:
    on mouseUp me
      mHightlightMatches(member("text2"), member("text1").text)
    end

  • Change the widht of a field with lingo

    Is it possible to adjust the widht of a field with lingo? Or adjust the length of the field to the text content?
    Thanks.

    Thenks Sean,
    I have two field set to "fixed" for a pop up menu.
    The script for the first field is this:
    property variabileLinea
    on mouseDown
      sprite(me.spriteNum).member = member("MyField1")
    end
    on mouseUp me
      sprite(me.spriteNum).member = member("MyField3")
      member("MyField2").line[1] = member("MyField1").Line[variabileLinea]
    end
    on EnterFrame me
      variabileLinea = _mouse.mouseLine
      member("MyField1").Line[variabileLinea].hilite()
    end
    "MyField1" adjust the lenght of the field to the text content, "MyField2"  after the mouse up no. Any suggestion?
    Thanks.

  • Hiding Table Columns with the Spry Element Selector

    I am trying to set up a toggle button that will show/hide
    rows >1 when clicked. I've used Adobe's
    "Hiding
    Table Columns with the Spry Element Selector" example and it
    worked fine with an HTML list, until I linked to actual XML data.
    Now it works in reverse. What gives?
    Here's the example:
    http://a44.awardspace.com/testing/toggleShowHideRows.htm

    That's what I started with. Same result:
    http://a44.awardspace.com/testing/toggleShowHideRows.htm

  • Import bitmaps with lingo (importfileinto) WITH white Border

    how can i import jpgs with lingo (importfileinto) WITH white Border?

    You can use an options list with importFileInto, and set a #trimWhiteSpace property with a value of 0;
    vMember = new(#bitmap)
    vOptions = [#trimWhiteSpace: 0]
    vJPG = "Path:To:Your:test.jpg"
    vMember.importFileInto(vJPG, vOptions)

  • Column hiding /unhiding based on a condition

    I have a report in which I want to add "State" Column. But it show up only when "Region" = 'Northeast'. And do not show State for other "Region"
    So basically, I want to hide "State" column dynamically based on condition where "Region"='Northeast'.
    Would Siebel On Demand let us do Column hiding /unhiding based on a data condition?
    Please let me know if this is possible.
    Thanks
    Rakesh

    I don't think SOD lets hide/unhide a column based on a condition. All you can do is restrict the number of rows using a filter.

  • Can not run with Lingos

    can not run with Lingos!!!!

    Sorry, but my mind-reading abilities are malfunctioning. What is it that cannot run with whatever? What happens when you try? Any error messages that are not state secrets?

  • Boot a pc on lan with Lingo

    Hello:
    Can you tell me how can I boot one or more pc's over a Lan with Lingo?
    I think this is call WOL.
    Do I need any Xtras for this?
    Have you any sample code?
    thank you very much

    I have never used the asUDP xtra, but after a quick read of the documentation it looks like it might work. You will probably need to use the accompanying BytesXtra as well. The structure of the Magic Packet is described in this wikipedia article http://en.wikipedia.org/wiki/Wake-on-LAN.
    It is an interesting project. Please post updates of your progress.

  • PROBLEM WITH DW LAYER HIDING/UNHIDING

    I've serious problem and trouble in working with layer. I've
    created my webpage with layers. I have several layers and sublayers
    inside each. However I'm not albe to work easy with these . I need
    to load some layers on webpage load. Attaching behaviour at the
    index loading I cannot see in the windows that appear what are the
    current layers shown, active, or hided or predefined. the window is
    unresizable and I guess this is a bug of dreamweaver.
    PLEASE SOMEONE CAN HELP ME HO WBYPASSING THIS PROBLEM?
    Thanks
    VIKTOR
    Text

    > I've created my webpage
    > with layers.
    Yes, this could be a serious problem. Make sure you know
    these -
    http://www.thepattysite.com/layer_laws.cfm
    and then make sure you understand this -
    http://www.great-web-sights.com/g_layer-overlap.asp
    Now, please post a link to the page so I can see what you
    have.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "coolplus" <[email protected]> wrote in
    message
    news:e27h4a$cnc$[email protected]..
    > I've serious problem and trouble in working with layer.
    I've created my
    > webpage
    > with layers. I have several layers and sublayers inside
    each. However I'm
    > not
    > albe to work easy with these . I need to load some
    layers on webpage load.
    > Attaching behaviour at the index loading I cannot see in
    the windows that
    > appear what are the current layers shown, active, or
    hided or predefined.
    > the
    > window is unresizable and I guess this is a bug of
    dreamweaver.
    > PLEASE SOMEONE CAN HELP ME HO WBYPASSING THIS PROBLEM?
    >
    > Thanks
    > VIKTORText
    >

  • Download from internet with lingo

    Can I write lingo that will allow a Director movie to download a file from the internet and put it, say, onto the desktop of the user's computer?  I don't mean in a "stealth" fashion.  I mean a Director movie that the person chooses to run because they want to download that file.
    I tried downloadNetThing, but from the example in the manual, I can't seem to get the syntax sorted out properly, or there is some other problem.  Here's the code I'm currently trying:
    on exitFrame me
      downloadTheNetThing("http://www.mydomain.com\images\myinstaller.exe",c:\Documents and Settings\owner\desktop&"myinstaller")
    end
    Ideas?
    Thanks.
    Dewey

    The first problem is that I said to not use "exitFrame". Perhaps I should have used stronger language.
    I modified a script from my library to do file downloading and I wrote a behavior to demo how to use it.  Try them out and read the code carefully.
    Paste the following code into a Parent script named "FileDownLoader".
    -- FileDownLoader Parent Script
    property  pActiveNetOperations  --  Data on current network operations in progress.
    -- private static property
    property  this  -- reference to this object. DO NOT access directly.
    -- PUBLIC METHODS
    on getInstance me  -- Use this to get an object instance
      return me.new()
    end getInstance
    -- NOTE:  if you make changes to this script you MUST call this handler before running your program again,
    --              otherwise your changes will not exist.  ie. in the message window:  script("FileDownLoader").clearStatics()
    on clearStatics me
      me.script.this = void
    end clearStatics
    -- Method to call to download a file to your computer
    -- Makes callback which returns: Error:Boolean, ErrorMessage:String
    on downLoadFile me, URL, FilePath, CallingOb, CallbackHandler
      -- store info about this operation for monitoring and callbacks.
      NetOpData = [#id:0, #CallbackOb:CallingOb, #CallBackHandler:CallbackHandler]
      NetOpData.id = downloadNetThing(URL, FilePath)
      -- if there is a callback object and a handler then add this data to pActiveNetOperations. Otherwise we are done.
      if NetOpData.CallBackOb.ObjectP AND NetOpData.CallBackHandler.SymbolP then
        pActiveNetOperations.add(NetOpData)   -- store callback info
        -- setup timeout object to monitor net operation completion
        if pActiveNetOperations.count = 1 then
          timeout().new("NetMonitor", 250, #monitorNetOps  , me)  -- check network operations four times a second.
        end if
      end if
    end downLoadFile
    -- PRIVATE METHODS
    on new me
      if me.script.this.objectP then return me.script.this  -- enforce Singleton pattern
      me.script.this = me
      pActiveNetOperations = []
      return me.script.this
    end new
    -- Polls the current network operations to see if they are done or errored out.
    -- returns Error:Boolean, ErrorMessage:String
    on monitorNetOps me, timeOb
      -- tag net operations that need to be deleted from the queue.
      ToDelete = []
      -- Create list of callbacks to be made.
      CallBacks = [] 
      -- check each net operation for completion.
      repeat with Index = 1 to pActiveNetOperations.count
        NetOpData = pActiveNetOperations[index]
        --    *** Debug Code.  Uncomment if need more details about the stream status.  ***
        --    StreamStatus = getStreamStatus(NetOpData.id)
        --    put StreamStatus
        --    case StreamStatus.state of
        --      "Connecting":
        --        put "Connecting to the server..."
        --      "Started":
        --        put  "Download started..."
        --      "InProgress":
        --        tempPercent = integer ( 100 * (Float(StreamStatus.bytesSoFar) / StreamStatus.bytesTotal) )         
        --        put  string (tempPercent) & "% downloaded..."
        --      "Complete":
        --        put  "Download completed."        
        --    end case
        -- check if net operation is done
        if netDone(NetOpData.id) then
          ToDelete.add(index)
          if netError(NetOpData.id) <> "OK" then  -- there was an error
            ErrorMessage = me.getErrorMessage(netError(NetOpData.id))
            TempList = [NetOpData.CallBackHandler, NetOpData.CallBackOb, 1, ErrorMessage]  -- handler,object,error, errorMsg
          else  -- no error. return data passed back
            ReturnText = netTextResult(NetOpData.id)
            TempList = [NetOpData.CallBackHandler, NetOpData.CallBackOb, 0, ""]  -- handler,object,error, errorMsg
          end if
          CallBacks.add(TempList)  --  store callback info for each net operation that is completed.
        end if
      end repeat
      -- delete completed network operations
      if ToDelete.count then
        repeat with Pos = ToDelete.count down to 1
          pActiveNetOperations.deleteAt(ToDelete[Pos])
        end repeat
      end if
      -- if no network operations are a happening, then stop monitoring
      if pActiveNetOperations.count = 0 then
        timeOb.forget()
      end if
      -- Send data back to calling objects.
      repeat with CallBack in CallBacks
        Call(CallBack[1],CallBack[2], CallBack[3], CallBack[4])  -- handler,object,error, errorMsg
      end repeat
    end monitorNetOps
    -- Returns error message
    on getErrorMessage me, ErrorNum
      case ErrorNum of
        0: return("Everything is okay.")
        4: return("Bad MOA class. The required network or nonnetwork Xtra extensions are improperly installed or not installed at all.")
        5: return("Bad MOA Interface. See 4.") 
        6: return("Bad URL or Bad MOA class. The required network or nonnetwork Xtra extensions are improperly installed or not installed at all.")
        20: return("Internal error. Returned by netError() in the Netscape browser if the browser detected a network or internal error.")
        4146: return("Connection could not be established with the remote host.")
        4149: return("Data supplied by the server was in an unexpected format.")
        4150: return("Unexpected early closing of connection.")
        4154: return("Operation could not be completed due to timeout.")
        4155: return("Not enough memory available to complete the transaction.") 
        4156: return("Protocol reply to request indicates an error in the reply.")
        4157: return("Transaction failed to be authenticated.")
        4159: return("Invalid URL.")
        4164: return("Could not create a socket.")
        4165: return("Requested object could not be found (URL may be incorrect).")
        4166: return("Generic proxy failure.")
        4167: return("Transfer was intentionally interrupted by client.")
        4242: return("Download stopped by netAbort(url).")
        4836: return("Download stopped for an unknown reason, possibly a network error, or the download was abandoned.")
        otherwise: return("Unknown network error.")
      end case
    end getErrorMessage
    ------------------------------------------------------------------------------------------ --------------------  end of script
    This next script is a Behavior that you attach to a Text member sprite. The default values are set to the ones you posted, but you will get an error because there is something wrong with your URL.  Using a text member sprite provides a way to display a success status or an error message. It also provides a sprite to Click. Note that the call to download a file is initiated on mousedown.
    --  File download Test behavior
    -- Drop on a TEXT MEMBER
    property  pMe  -- this sprite
    property  pURL  -- url to retrieve file from
    property  pFilepath  -- full path to store file on local hard drive
    On GetBehaviorDescription me
      return "File download Test behavior."
    end GetBehaviorDescription
    On GetPropertyDescriptionList me
      Props = [:]
    --  Props[#pURL] = [#default:"http://chart.apis.google.com/chart?cht=p3&chd=t%3a90,10&chs=250x100&chl=Pacman", #format:#string, #comment:"URL"]   -- sample
        Props[#pURL] = [#default:"http://www.mecssoftware.com/images/carol&dewey.jpg", #format:#string, #comment:"URL"]
      Props[#pFilepath] = [#default:"C:\Documents and Settings\All Users\Desktop\test1.png", #format:#string, #comment:"Full path to store file."]
      return Props
    end GetPropertyDescriptionList
    on beginSprite me
      pMe = sprite(me.spriteNum)
      pMe.member.text = empty  -- clear text member
    end beginSprite
    on mouseDown me
      -- make call to download a file
      script("FileDownLoader").getInstance().downLoadFile(pURL, pFilepath, me, #displayStatus)   -- url, full file path, this object, handler to call
    end mouseDown
    on displayStatus me, error, errorMsg  -- callback from the "FileDownLoader" object.
      if error then
        pMe.member.text = "There was an error downloading your file." & Return & errorMsg
      else
        pMe.member.text = "File Downloaded Succesfully."
      end if
    end displayStatus
    ------------------------------------------------------------------------------------------ --   end of script

  • Hiding & unhiding items on push of a button

    Hello,
    hope any one could help...
    I have a Form with some items there...
    for some purpose I want to make a button and when it will be pressed for the first time, it hides one item say 'A' and unhide second item 'B' (which was first not visible)..
    and when the button is pressed again for the second time it then hides item 'B' and unhides item 'A' and this process continues on every push with both items hiding and unhiding on alternate push of the button..
    For this i wrote the following coding on when button pressed trigger
    :GLOBAL.DUMMY := GET_ITEM_PROPERTY('A',VISIBLE);
    :GLOBAL.DUMMY := GET_ITEM_PROPERTY('B',VISIBLE);
    IF      
    :GLOBAL.DUMMY = 'B PROPERTY_TRUE' AND
    :GLOBAL.DUMMY = 'A PROPERTY_FALSE'
    THEN
    SET_ITEM_PROPERTY('B',VISIBLE,PROPERTY_FALSE);
    SET_ITEM_PROPERTY('A',VISIBLE,PROPERTY_TRUE);
    ELSE
    SET_ITEM_PROPERTY('B',VISIBLE,PROPERTY_TRUE);
    SET_ITEM_PROPERTY('A',VISIBLE,PROPERTY_FALSE);
    END IF;
    this coding succesfully hides 'A' and unhides item 'B' on the first push but nothing happens when I press the button again...as i said above I wnat it to unhide 'A' and and hide 'B' on the second push and then this process follow with items 'A' and 'B' hide and unhide respectively on alternate pushes...
    I would be grateful if some one helps me in solving this problem..
    regards,
    Sonali.

    Look to see what value is returned by GET_ITEM_PROPERTY('B',VISIBLE). I doubt very much that it's 'B PROPERTY_TRUE'.
    Furthermore, your second call overwrites the prior value in DUMMY so your IF statement is never going to be true....
    ...particularly in view of the the fact that you are testing for one variable to simultaneously be two different values. This is not Boolean Logic as we know it.
    Your code works the first time because it executes the ELSE branch, but it will execute IF branch.
    Be a smartie - never call your variables DUMMY.
    Cheers, APC

  • Help with lingo game

    Hey guys,
    i'm making an adventure style game using lingo. But i can't
    figure out how to make my sprite transport from room to room. I'd
    like the character to go up to the door either push space or click
    on the door (maybe a notice comes up?) then appear in another room.
    I've looked for tutorials on this kind of thing but have been
    unsuccessful. Can anyone help me? I learn better from one to one
    and would really appreciate anyone with some spare time. I have a
    private email address is this is better.
    Thanx so much guys. x

    it's a 2d game. I've figured out the marker thing now and i'm
    happy with clicking on the door rather than using space bar to go
    from room to room. I wonder if you could help me with a new problem
    though? lol, here it is;
    Hey guys, can anyone help me?
    Here is some script that makes my character obviously move
    and detects walls. I would like to modify the script so that when
    my character hits the right keydown, the sprite changes to cast
    member "right". I have tried and so far all i have done is succeed
    in making the cast member change but this then deactivates the
    walls. Any ideas??
    on exitFrame me
    if keyPressed(123) then
    move(me,-5,0)
    end if
    if keyPressed(124) then
    move(me,5,0)
    end if
    if keyPressed(125) then
    move(me,0,5)
    end if
    if keyPressed(126) then
    move(me,0,-5)
    end if
    end
    on move me, dx, dy
    oldRect = sprite(me.spritenum).rect
    newRect = oldRect + rect(dx,dy,dx,dy)
    hitWall = FALSE
    repeat with i = 2 to 30
    if sendSprite(i,#hitWall,newRect) then
    hitWall = TRUE
    exit repeat
    end if
    end repeat
    if not hitWall then
    sprite(me.spriteNum).loc = sprite(me.spriteNum).loc +
    point(dx,dy)
    end if
    end
    Many thanks.

  • Subclassing Sprite with maintimeline MC's

    wow, what a day. day 2 of learning AS3 by diving in the deep
    end!
    anyway...........
    ok, so if i'm gonna make a display object class then i'm
    gonna extend Sprite. cool, this much understood. the problem ihave
    is that the project is for an arts organisation and some of the
    artists there are gonna appreciate the work a lot more if they can
    actually SEE what their proposed screens look like in the FLA
    itself. to that end, i've inherited an FLA that has a bunch of mcs
    - single frame containers essentially with the odd button /
    textinput / image inside - that are to serve as the actual screen
    furniture themselves
    or, in short, i'm not creating the display objects
    dynamically with AS3: they're already sitting there for me on the
    stage.
    so the question is: what's gonna be the best way of
    incorporating these mcs into a class that extends Sprite? in my -
    possibly naive, i have no idea (only been doing this for 2 days!!!)
    - view these classes WOULD ACTUALLY BE these mcs. like i had some
    container called 'screen1_mc' and that somehow became:
    public class FirstScreen extends Sprite
    so if i pass them in via the constructor, like:
    var screen1:FirstScreen = new FirstScreen( screen1_mc )
    thats not going to do it is it? then screen1_mc will simple
    become a property of FirstScreen.as, not FirstScreen.as itself,
    like:
    public function FirstScreen ( firstScreen:Sprite )
    _firstScreen = firstScreen;
    etc..........
    hmm............ hows this done then? :S
    dub.

    overnight silence eh?
    you know what: f_ck it, i'm going to bosch it in as a
    property of the class and leave it at that.
    if anyone wants to suggest to me a better solution, please,
    i'm all ears...............

  • To run an exe with lingo script

    I am making a tutor CD for children and I want to run a
    application exe with the help of Lingo Script plz. help with
    codings
    KUNDAN

    try:
    open "<fullPathToExe>"
    e.g.
    open (the moviePath)&"myApp.exe"
    "dankunus" <[email protected]> wrote in
    message
    news:efj1f2$fui$[email protected]..
    >I am making a tutor CD for children and I want to run a
    application exe
    >with the help of Lingo Script plz. help with codings
    >
    > KUNDAN

Maybe you are looking for

  • DMS Document access through Portal

    Hi Sap Gurus, we are in the process of integrating SAP DMS with Enterprise portal 6.5,  and SAP DMS on 6.0 SP 12, ie the latest Version, when we try to access or view the documents in Portal, we could only see those which have been maintained through

  • Updated Adobe AIR now Premiere Pro v7 crashes.

    Just finished building a DVD with encore and went to play it Adobe Media Player which prompted for an update to AIR which I did.  Then Media Player wanted to be updated so I did that.  Couldn't get Adobe media player to play the DVD (I suspect it is

  • Gnome applet Icons Missing

    I installed a fresh arch linux on another pc.  I installed gnome and gnome-extras. There is one problem: The icons on the "system tray" are missing. The applets are there but the icons are not shown: I already rebuilt the hicolor and gnome icons (and

  • Html and indexed pages

    I am trying to get ranked in google and only my index pages tend to get indexed. I do not understand why my secondary pages, do not get indexed for Lake Martin Real Estate searches. http://www.yourlakemartin.com Site header and search word as follows

  • Unable to load data with data source 2LIS_04_P_COMP

    trying to load ARBPL,MATNR and COMP of PP detailed setup. Due to the design error (as per SAP) I am trying to load (instead of deactivating the MATNR datasource)from each datasource seperately, each time deleting the setup table.( that is : load setu