Accessibility

TechNote (Archived)

netDone() function returns 0 (FALSE)

Attention
The information in this TechNote is out of date (as of February 14th, 2003) and should be used for reference only. Users of the Shockwave player should update their player. For information on current Shockwave versions see Shockwave Player version history (TechNote 14820).
For more information about enabling or disabling the Shockwave"auto-update" feature see How to disable the auto update setting in Shockwave (TechNote 16683).

IssuenetDone() Function returns 0 (FALSE), when used in a Shockwave movie (DCR). This is not an issue when used in authoring or projectors.

ReasonThe netDone() function which indicates whether a background loading operation is finished returns 0 (FALSE), indicating the net operation is still in progress. This result is primarily a problem when accessing a file or URL that does not exist. The netDone() function will always return 0. Setting conditional statements that depend on a netDone() result can be problematic. The issue is specific to Shockwave's NetFile Xtra version 8.5.1r106 and NetLingo Xtra version 8.5.1r105.

The netDone() Function is used with net Lingo functions such as getNetText(), preloadNetThing(), gotoNetMovie(), gotoNetPage(), or putNetText(). For more information on net operations see the Director MX documentation. Managing and Publishing Projects > Using Shockwave Player > Checking whether media elements are loaded with Lingo > Downloading files from the Internet with Lingo.

Solution
This issue is revolved by updating the netLingo Xtra. Developers should update the netLingo Xtra in the Director MX Xtras folder. For more information see Xtras and fontMap.txt updates for Director MX (TechNote 16830). Users of the Shockwave player should update the player. For more information about enabling or disabling the Shockwave Player "auto-update" feature see How to disable the auto update setting in Shockwave (TechNote 16683).

Alternate Workaround
Use 'startTimer' and 'the time' to check how long a net operation has been activated. If an acceptable time has passed and netDone has not returned "OK", 'the timer' can be used to indicate problems accessing the file.
Code example:

 global myNetID on exitFrame me  myNetID = preLoadNetThing("http://someURL/whatEver.jpg")   startTimer end 

On next frame use:

 global myNetID on exitFrame me   if the timer > 1000 then go to frame 30   if netDone(myNetID) = false then     go to the frame   end if end 

It is also possible to use a Timeout Object to implement the same functionality. Using a timeout object allows the application to continue to navigate without holding on a specific frame and it will also no longer be frame rate dependent:

 on exitFrame me    myNetID = preLoadNetThing("http://someURL/whatEver.jpg")    timeout("myTimeOut").new(1000, #timeoutHandler) end 

In a movie script:

 on timeoutHandler me    go to frame 30    timeout("myTimeOut").forget() end 


AlertThis content requires Flash

To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.

Download the free Flash Player now!

Get Adobe Flash Player

Creative Commons License

Search Support


Document Details

ID:tn_16738
Browser:Chrome
Internet Explorer
Netscape
Opera
Safari
Firefox

Products Affected: