<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:clearspace="http://www.jivesoftware.com/xmlns/jive/rss" version="2.0">
  <channel>
    <title>Adobe Community: Message List - Changes to cast won't stay when I switch between .dir files</title>
    <link>https://forums.adobe.com/community/director/director_lingo?view=discussions</link>
    <description>Most recent forum messages</description>
    <language>en</language>
    <pubDate>Tue, 06 May 2014 11:01:44 GMT</pubDate>
    <generator>Jive Engage 7.0.0.1  (http://jivesoftware.com/products/)</generator>
    <dc:date>2014-05-06T11:01:44Z</dc:date>
    <dc:language>en</dc:language>
    <item>
      <title>Re: Changes to cast won't stay when I switch between .dir files</title>
      <link>https://forums.adobe.com/message/6357521?tstart=0#6357521</link>
      <description>&lt;!-- [DocumentBodyStart:cf48a84d-7ab6-44e2-b6c7-648baed46a7e] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;I'm not sure why startMovie() is not firing. I have not encountered that issue before.&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Here is&lt;a class="jive-link-external-small" href="http://help.adobe.com/en_US/Director/11.5/Beginners/WS287f927bd30d4b1f5218ba7912ff9103109-7fe2.html" rel="nofollow"&gt; a workaround&lt;/a&gt; that might ensure that a #startMovie event is sent.&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Create a timeout object with a period of 0 and an object as its target. Since the timeout will never be triggered when the period is 0, the name of the timeout handler is unimportant&lt;/li&gt;&lt;li&gt;Set the persistence of the timeout to TRUE&lt;/li&gt;&lt;li&gt;All system events in Movie Scripts will now be called twice.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;span style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 10pt; line-height: 1.5em;"&gt;You can create an empty movie and give it this Movie Script, to test:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="font-size: 12px; font-family: 'Segoe UI';"&gt;global gWrapper&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px; font-size: 12px; font-family: 'Segoe UI';"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="font-size: 12px; font-family: 'Segoe UI';"&gt;on enterFrame()&lt;/p&gt;&lt;p style="font-size: 12px; font-family: 'Segoe UI';"&gt;&amp;nbsp; if not gWrapper then&lt;/p&gt;&lt;p style="font-size: 12px; font-family: 'Segoe UI';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; gWrapper = script(1).create()&lt;/p&gt;&lt;p style="font-size: 12px; font-family: 'Segoe UI';"&gt;&amp;nbsp; end if&lt;/p&gt;&lt;p style="font-size: 12px; font-family: 'Segoe UI';"&gt;end&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px; font-size: 12px; font-family: 'Segoe UI';"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px; font-size: 12px; font-family: 'Segoe UI';"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="font-size: 12px; font-family: 'Segoe UI';"&gt;on startMovie(instance, timeOut)&lt;/p&gt;&lt;p style="font-size: 12px; font-family: 'Segoe UI';"&gt;&amp;nbsp; put instance, timeOut&lt;/p&gt;&lt;p style="font-size: 12px; font-family: 'Segoe UI';"&gt;end&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px; font-size: 12px; font-family: 'Segoe UI';"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px; font-size: 12px; font-family: 'Segoe UI';"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="font-size: 12px; font-family: 'Segoe UI';"&gt;on mouseUp()&lt;/p&gt;&lt;p style="font-size: 12px; font-family: 'Segoe UI';"&gt;&amp;nbsp; go movie the movie&lt;/p&gt;&lt;p style="font-size: 12px; font-family: 'Segoe UI';"&gt;end&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px; font-size: 12px; font-family: 'Segoe UI';"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px; font-size: 12px; font-family: 'Segoe UI';"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px; font-size: 12px; font-family: 'Segoe UI';"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="font-size: 12px; font-family: 'Segoe UI';"&gt;on exitFrame()&lt;/p&gt;&lt;p style="font-size: 12px; font-family: 'Segoe UI';"&gt;&amp;nbsp; go the frame&lt;/p&gt;&lt;p style="font-size: 12px; font-family: 'Segoe UI';"&gt;end&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px; font-size: 12px; font-family: 'Segoe UI';"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px; font-size: 12px; font-family: 'Segoe UI';"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="font-size: 12px; font-family: 'Segoe UI';"&gt;-- TIMEOUT WRAPPER --&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px; font-size: 12px; font-family: 'Segoe UI';"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="font-size: 12px; font-family: 'Segoe UI';"&gt;on create(me)&lt;/p&gt;&lt;p style="font-size: 12px; font-family: 'Segoe UI';"&gt;&amp;nbsp; vTimeOut = timeOut().new("SystemEvents", 0, #nullHandler, me)&lt;/p&gt;&lt;p style="font-size: 12px; font-family: 'Segoe UI';"&gt;&amp;nbsp; vTimeOut.persistent = TRUE&lt;/p&gt;&lt;p style="font-size: 12px; font-family: 'Segoe UI';"&gt;&amp;nbsp; return true&lt;/p&gt;&lt;p style="font-size: 12px; font-family: 'Segoe UI';"&gt;end create&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:cf48a84d-7ab6-44e2-b6c7-648baed46a7e] --&gt;&lt;img src='/beacon?t=1415930935256' /&gt;</description>
      <pubDate>Tue, 06 May 2014 11:01:44 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/6357521?tstart=0#6357521</guid>
      <dc:date>2014-05-06T11:01:44Z</dc:date>
      <clearspace:dateToText>6 months 1 week ago</clearspace:dateToText>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Re: Changes to cast won't stay when I switch between .dir files</title>
      <link>https://forums.adobe.com/message/6356549?tstart=0#6356549</link>
      <description>&lt;!-- [DocumentBodyStart:23ca9643-e988-4276-9fdb-5aba062ec5e4] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;Thanks for replying!&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Unfortunately its not the CXT. I just found that it wasn't having any trouble picking up the cast file at all, that actually works.&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Instead it looks like, when I play the game in Director, when the game goes from one .dir to the next, it does NOT execute the handler "on startmovie"&lt;/p&gt;&lt;p&gt;However, when I publish and do the executable, it seems that the game DOES execute "on startmovie" when switching from one .dir to the next. When it does this, it runs the start up scripts which refresh the name and scores and saved data. Does that sound like it could be correct??&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I may just have to re do a lot of the script. I'll keep posting updates. Thanks for the help!&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:23ca9643-e988-4276-9fdb-5aba062ec5e4] --&gt;</description>
      <pubDate>Tue, 06 May 2014 00:23:19 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/6356549?tstart=0#6356549</guid>
      <dc:date>2014-05-06T00:23:19Z</dc:date>
      <clearspace:dateToText>6 months 1 week ago</clearspace:dateToText>
      <clearspace:replyCount>1</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Re: Changes to cast won't stay when I switch between .dir files</title>
      <link>https://forums.adobe.com/message/6356213?tstart=0#6356213</link>
      <description>&lt;!-- [DocumentBodyStart:9b77d469-dc7c-41f5-b09e-6bd0e705015b] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;You are saving the cast with the .cxt extension, which Director considers as being a protected file. Does it help to use ".cst" as the extension?&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:9b77d469-dc7c-41f5-b09e-6bd0e705015b] --&gt;</description>
      <pubDate>Mon, 05 May 2014 22:17:06 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/6356213?tstart=0#6356213</guid>
      <dc:date>2014-05-05T22:17:06Z</dc:date>
      <clearspace:dateToText>6 months 1 week ago</clearspace:dateToText>
      <clearspace:replyCount>2</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
    <item>
      <title>Changes to cast won't stay when I switch between .dir files</title>
      <link>https://forums.adobe.com/message/6356145?tstart=0#6356145</link>
      <description>&lt;!-- [DocumentBodyStart:f3eb962d-352d-4136-990c-165ed4f6f649] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;Hello, first time on Adobe's forums.&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;First of all, this is not my original script, I was hired to bring a game from old version of Director (I believe Director 5) into Director 11.5 so it will work on new Windows OSs.&lt;/p&gt;&lt;p&gt;The game is broken into about 4 .dir files, and the Lingo script uses a cast named MathCityNaMu to save the game state when the players moves from one DIR file to the next.&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The script creates a cast member inside of the cast file called "MathCityNaMu". At first the cast only contains one member, called "kount". The script duplicates that cast member and inserts the players name and score into the newly created duplicate cast member via this script &lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; member("kount").duplicate()&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; member("kount").name =string(MainCharacterName)&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The script then saves the cast by this line&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="font-size: 10pt; line-height: 1.5em;"&gt;castLib("mathCityNaMu").save( "@casts\mathCityNaMu.cxt")&lt;br/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;And then when the second .dir file opens, it picks up the cast via this line.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; castLib("mathCityNaMu").filename = "@casts\mathCityNaMu.cxt"&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;This process works when I play the game in Adobe Director. However, when I go to publish to an .exe, the functionality is lost. The .exe will hold all the character information until it makes the jump from one .dir file to another, when it loses it. It seems that for some reason the next .dir file will not pick up the right cast, or perhaps the cast is never getting saved properly in the first place. Anyway there is a lot going on in this script and I am willing to try anything. Please lend me some help!&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:f3eb962d-352d-4136-990c-165ed4f6f649] --&gt;</description>
      <pubDate>Mon, 05 May 2014 21:38:43 GMT</pubDate>
      <author>forums_noreply@adobe.com</author>
      <guid>https://forums.adobe.com/message/6356145?tstart=0#6356145</guid>
      <dc:date>2014-05-05T21:38:43Z</dc:date>
      <clearspace:dateToText>6 months 1 week ago</clearspace:dateToText>
      <clearspace:replyCount>3</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
  </channel>
</rss>

