1 Reply Latest reply on Oct 11, 2007 7:37 AM by VIDEOTEL YLB

    Setting Variables to embedded SWF in Director

    Urban1977 Level 1
      I have a print button on screen at the end of a test within my director project. Once the user completes they are able to print there results. I have a certificate created in Flash publised using player 7 AS2 which is suppose to recieve varibles and populate text fields on stage.

      This works perfect when testing within the authoring environment or when using a projector but when using Shockwave it doesn't seem to send all the variables to the flash movie. therefore does not trigger the flash printObj command.

      Now last time I checked the project online it was working perfect in Shockwave 10.1 and the earlier version of shockwave 10.2

      I noticed with shockwave the latest version it crashes out the browsers. I have fixed it from crashing but not all the variables are getting to the flash movie.

      I am using:

      on mouseUp me
      pPrintMe = true

      on exitframe me

      myCallBack= sprite(pPrintSprite).getVariable("drCallback", true)

      if pPrintMe=true then

      setVariable(sprite(pPrintSprite) , "drTitle", string(myObjectList[#CBT][1]))
      setVariable(sprite(pPrintSprite) , "drName", string(myObjectList[#firstname] & " " & myObjectList[#lastname]))
      setVariable(sprite(pPrintSprite) , "drTID", string(myObjectList[#tid]))
      setVariable(sprite(pPrintSprite) , "drModule", "Has completed the test for the above training package with the following results:")
      setVariable(sprite(pPrintSprite) , "drScore", string(gtestPList[#score][1] & " out of " & gtestPList[#score][2] & " points"))
      setVariable(sprite(pPrintSprite) , "drPercent", string(gTestPList[#score][4]))
      setVariable(sprite(pPrintSprite) , "drDate", string(baSystemTime("%0d-%b-%Y")))
      setVariable(sprite(pPrintSprite) , "copyright", "Copyright© "&string(baSystemTime("%Y"))&" Company name")

      end if

      Now simple enough code. I blame Adobe for breaking my code!