Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Help with playing avi as anim/black background

Author
Message
Jurassicp
16
Years of Service
User Offline
Joined: 1st Apr 2008
Location:
Posted: 2nd Apr 2008 02:10
I am trying to do a simple number generator and i have made some animations in 3ds max and saved them as avi's. i knocked up a simple random number generator and i want to do the following:

when the rnd picks a number between 1-49 - say it picks number 30 then the program will load the avi file "30.avi"
the program works very well but i have a problem with the avi when it re-loads - for example:

the main screen is white, and the avi is of a ball with a small white background, i set the program to pick a number between 1-49 and it loads the correct avi file. once it has done this i return the program to the beginning to choose another random number.
when the avi re-loads it has a black background for a split second.
is there any way to remove this split second black background on avi's
either by setting colour values etc.
ive tried sync and it does help a little - works some of the time. ive tried various sync rates but just gets worse, sync rate is 0 atm and is just after the play animation call.

any help is appreciated.

jp

we may be many nations but we are only one human being.
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 2nd Apr 2008 05:32 Edited at: 2nd Apr 2008 05:32
jurassicp,

it would help if you included the code (or a simple example that replicates the problem) you're using for this (it would help even more if you could include a couple of the avi's if they're small enough). otherwise, we'd be guessing what the problem is.

Virtual Nomad
AMD XP 1800+ (~1.6 Ghz) / 1.5 GB RAM
ATI Radeon 8700LE 128 MB / Windows XP
Jurassicp
16
Years of Service
User Offline
Joined: 1st Apr 2008
Location:
Posted: 2nd Apr 2008 11:43


ive not tidied up the code yet as im still working on it but i have posted an example above, i hve changed the program to load between just 2 .avi's and ive attached them below:

www.pcspares.eclipse.co.uk/Project.zip

the above code is one with sync taken out, much help would be appreciated.

ive also noticed that when i test the full program when i click on a button to restart an error code pops up at random times saying error code 2004 (or 2002) could not find animation.....blah blah.


thanks for any help.

we may be many nations but we are only one human being.
Jurassicp
16
Years of Service
User Offline
Joined: 1st Apr 2008
Location:
Posted: 2nd Apr 2008 20:44
the error with the 2002/2004 code was because i had my media stored in another location, sometimes it worked sometimes it didn't. i solved this by copying the media the proper folder, strange though i thought that when you attach media inside the program it should build an .exe with the attached media included.


still having problems with the avi's though.

we may be many nations but we are only one human being.
Murdock 743
20
Years of Service
User Offline
Joined: 16th Jun 2004
Location:
Posted: 4th Apr 2008 17:01
Just a shot in the dark, but maybe you could try and delete the previously loaded avi after the wait key command or add the "flush video memory" command afterwards. This may still give you the black pause but I suppose it's worth a shot.

Cheers,
Christian
Jurassicp
16
Years of Service
User Offline
Joined: 1st Apr 2008
Location:
Posted: 5th Apr 2008 12:14
thanks very much for the help but its still the same, im currently working on using spheres with texture on instead of the avi's so i will report if this is better or not

thank you

we may be many nations but we are only one human being.

Login to post a reply

Server time is: 2024-09-27 12:17:42
Your offset time is: 2024-09-27 12:17:42