0 Replies Latest reply on Dec 15, 2007 8:35 AM by harmsdk

    Problem communicate between director and flash cs3 on mac

    harmsdk
      Hey

      I have this problem when I'm running my publish file on a Intel Mac (osx 10.4.11) it can't establish connection between the director and flash. This work fine on a Power Mac and Windows.

      It's created with Director 10.4 and Flash CS3

      Is there issue on Intel Mac with published Director files.

      /Flemming

      It's very simple what I do i Director :
      on initialiseConnection
      -- create the local connection object
      put("newObject")
      gDirector_LCO = newObject("localConnection")

      -- assign handlers to deal with incoming events
      setCallback(gDirector_LCO, "isRunningFromCD", #isRunningFromCD_Event)
      setCallback(gDirector_LCO, "getDataPath", #getDataPath_Event)
      put("connect")
      -- -- name of the other end of the LCO to make connection with
      gDirector_LCO.connect("flash_LCN")
      end

      on closeLC

      -- do this when completely finished with object
      if gDirector_LCO <> 0 then
      gDirector_LCO.close()
      gDirector_LCO = VOID
      end if


      end

      on sendResponse responseType, message
      put("on sendResponse")
      case (responseType) of

      #isRunningFromCD:
      put("isRunningFromCDReply")

      gDirector_LCO.send("director_LCN", "isRunningFromCDReply", message)

      #getDataPath:
      put("getDataPathReply")
      gDirector_LCO.send("director_LCN", "getDataPathReply", message)

      otherwise:
      put("nothing")
      nothing

      end case




      end

      -- ************************************************
      -- ** Wrapper functions for all calls from Flash **
      -- ************************************************

      -- all functions can use an error global or field
      -- error messages from any function can then be passed back via that container
      -- and if function returns FALSE the contents are passed to sendResponse() and thus returned to Flash

      -------------------------------------------------------------------
      -------------------------------------------------------------------

      on isRunningFromCD_Event ignoreThis1, ignoreThis2, messageContent

      -- force global for this debug version purposes only
      gRunningFromCD = TRUE
      put("error")
      -- send response to Flash
      sendResponse #isRunningFromCD, gRunningFromCD

      end


      -------------------------------------------------------------------
      -------------------------------------------------------------------

      on getDataPath_Event ignoreThis1, ignoreThis2, messageContent

      -- no message content needed
      put("on getDataPath_Event"+gDataPath)
      if gDataPath = VOID or gDataPath = EMPTY then
      response = "Datapath not detected" -- send error
      else
      response = gDataPath
      end if

      -- send response to Flash
      sendResponse #getDataPath, response

      end