I thought it would be useful to have a thread with 'not-too-techy' points about how to convert files from version 3.72 to version 4, since it's taken me a while to complete my first conversion. Here are the points I have seen so far:
Use of 'Playsound' action needs to be converted to nameofsound.start()
Use of timer() funtion needs to changed to use getTimer()
Use of mouse.show() and mouse.hide() needs to changed to use mouseShow() and mouseHide()
Scripts which are within layers/buttons don't seem to import well. Copy and paste these instead.
Colours of text, etc, seem to be lost after import. Change these manually straight after importing them.
Substring(a,b,c) has changed to a.substr(b,c)
Use of commands that aren't in scripts were allowed in the graphical interface in 3.72 eg. Let, If, Loadvariables, didn't have to be in scripts in v3.72. These need to be put into scripts in v4.
Having got to grips with it now, version 4 is great. I'm really looking forward to working out some of the new stuff like XML, but that's a way off yet. If anyone else has any other observations of converting from 3.72 to 4, please add them to this post !
Morgan.
Last edited by ForumNewbie; 07-17-2003 at 07:25 PM.
Scale is now done in percentages in the scripting, so where you used to have an object scaled to value '1' in v3.72 for it to appear normal size, it will need scaling up to '100' in v4.
Where you used the 'position' property for an element in a script in version 3.72, you can drop the word 'position' in version 4 to save some precious keystrokes.
ie. element.position.x can be abbreviated to element.x
Don't name any of your own elements 'Text' if you're using the excellent new 'Build Menu' feature. The Build Menu feature uses this element name, and your scripts might not work right. Just use another name to avoid the problem.
Tips from someone who's taken too long to get his old movies converted properly
Here's a few conversion issues that have caused me a bit of trouble. I think people have mentioned these in one or two threads, but I've only just managed to properly understand them, so I thought I'd add them to this list of points for reference:
1. If you want to use a variable that was created in the starting script, or in a script in the main movie (ie. Not in a layer or child movie) then you must put 'root.' in front of it to access it in any scripts.
2. The same is true of functions that are created in the starting script. If you need to call them from scripts anywhere else in your movie, make sure you call them with 'root.functionname(arguments)'
3. If you're having trouble with 'loadVariables' and it seems not to be posting anything at all, try the following:
Where:
'url.php' is the url of the file you're sending variables to.
'variablename1' is the variable name expected in the server side script, and variable1 is the value from 3dfa you want to pass.
'variablename2' is another variable name expected in the server side script, and variable2 is another value from 3dfa you want to pass.
Obviously, you can post loads of variables this way if required.
This worked on 2 of my movies that just refused to post variables normally, my Dart Game (Much smaller file after conversion) and my 10 pin bowling game .
Hope this is useful to someone else,
M.
Last edited by ForumNewbie; 07-18-2003 at 09:08 PM.
I can't open some of my older .movie files. Does anyone know how get around this? I need to make some updates and now up stuck. I really don't want to re-create all my old .movie files.
Here is the message:
Unknown type 'ActionLoadMovie' cannot be created
Unknown type 'main_menu.movie' cannot be created
Unknown type 'level' cannot be created