Page 1 of 1
Play movie automatically
Posted: Sun Aug 21, 2011 11:25 am
by Es124
Hi,
how do i let a movie ( mov. file ) start automatically when i go to that specific card ? ( without using the play buttom )
thanks,
Enno
Re: Play movie automatically
Posted: Sun Aug 21, 2011 12:16 pm
by jmburnod
Hi Enno,
You can play it at opencard like this :
Code: Select all
on opencard
start player "myPlayer"
end opencard
Best regards
Jean-Marc
Re: Play movie automatically
Posted: Sun Aug 21, 2011 5:05 pm
by kevin11
I have tried to use "start player whatever", with a .mov file loaded and visible on a card.
It doesn't however play, just sits there at the first frame. I can use the cursor to drag through the frames, which tells me the .mov is loaded correctly, it displayers correctly, I just can't get "start player" to do anything.
Any ideas anyone please ?
Re: Play movie automatically
Posted: Sun Aug 21, 2011 5:29 pm
by Klaus
Hi Kevin,
this should work in any case!
Can you start the player with the (QuickTime) controller?
Does it work, when you put the script into a button:
Code: Select all
on mouseup
start player XYZ
end mouseup
and click the button?
Do you have anything else in your "opencard" script?
Best
Klaus
Re: Play movie automatically
Posted: Mon Aug 22, 2011 12:25 am
by kevin11
using a new card, your script, and a player named to match, won't play the movie atomatically.
It will allow me to cycle through frames by dragging the mouse.
The controller has no play button, just back, zoom out, zoom in, and zoom dragged object.
In edit mode, I can change the animation speed and the movie will play at different speeds, but in browse mode it won't play. Answer statements in scripts tell me the code is executing.
basically, the animation plays in edit mode, but in bwose mode there is no play button, and you can't trigger playing.
using livecode 4.6.3 on windows xp sp2
Re: Play movie automatically
Posted: Mon Aug 22, 2011 11:12 am
by Klaus
Hi Kevin,
could you please answer my questions abvove?
And:
Is QuickTime in the latest version installed on that machine?
What file format does the movie have?
Could you post a screenshot eventually?
This is whart is puzzling me:
The controller has no play button, just back, zoom out, zoom in, and zoom dragged object.
Ah, wait, is this a
QuickTIme VR movie?
If yes this is not intended to "play" in any way, you need to script this!
Check "pan" and "tilt" in the LiveCode dictionary!
Best
Klaus
Re: Play movie automatically
Posted: Mon Aug 22, 2011 11:50 am
by Es124
Hi,
i try
on opencard
start player "Player"
end opencard
but it's just play when i push the play buttom, also when i test it on the IOS simulator, the card with the movie is grey . ( no movie )
see pict.
Re: Play movie automatically
Posted: Mon Aug 22, 2011 12:00 pm
by Klaus
Hi Es124,
thanks for the screenshot, it clarifies things!
1. a player does NOT get the "opencard" message (as the name might suggest!),
so you need to put this handler into the script of the CARD! That will work!
2. playback of video is completely different on iOS than on the desktop!
Please check the "iOS Release Notes" (menu: Help) for more info.
Best
Klaus
Re: Play movie automatically
Posted: Mon Aug 22, 2011 12:40 pm
by Es124
Hi Klaus,
Yes ! it works now, thanks .
So if i want to play the movie's on different devices ( iPad, iPhone, Android tablet, Android phone , windows and Mac ) it will be always different.
greetings,
Enno
Belgium
Re: Play movie automatically
Posted: Mon Aug 22, 2011 12:46 pm
by Klaus
Hi Enno,
So if i want to play the movie's on different devices ( iPad, iPhone, Android tablet, Android phone , windows and Mac ) it will be always different.
Yes, unfortunately!
Although I am not sure if Android and iOS have different syntax for this.
But you can check "the platform" to act accordingly:
Code: Select all
...
put the platform into tPlat
switch tPlat
case "MacOS"
case "Win32"
## Desktop
start player "player
break
case "mobile"
## do your mobile stuff here
break
### etc...
end switch
...
Groetjes
Klaus
Re: Play movie automatically
Posted: Mon Aug 22, 2011 2:39 pm
by kevin11
Hi Klaus,
>could you please answer my questions abvove?
I believe I did, above ! ???
Your script does not activate the player.
It's a brand new card, as I said, and therefore there is no other script on the card.
The qt controller, although visible, has no play button, only back, zoom, etc, so cannot play from the controller.
The mouse only allows me to drag through frames, it does not start playing.
A mouse click does not start the animation.
The script does not start the animation.
"start player ZYX" or whatever the player name is, does not start the animation.
Livecode appears to be complete unable to play this animation.
However, if I use the inspector to change the loop speed, it will play through the loop when in edit-mode, each time I change the speed setting.
There is nothing that can be done to make the animation play in browse mode, but it seems happy in edit mode.
Regards
Kevin
Re: Play movie automatically
Posted: Mon Aug 22, 2011 2:58 pm
by Klaus
Hi Kevin,
yes, please forget the lines BEFORE I found that this may be a QT VR movie
Just tested this here with a QT VR and it works as exspected:
NO automatic animation!
QT VR movies do not "play" in any way, they are supposed to be user-controlled!
So they can be "start"ed, but this does not do anything until the user moves the mouse inside of the VR movie!
Open it in the QuickTime Movie Player and see yourself!
So if you want any animation, you need to script it!
As I already mentioned, check "tilt", "pan" and "zoom" in the liveCode dictionary!
Best
Klaus
Re: Play movie automatically
Posted: Mon Aug 22, 2011 3:51 pm
by kevin11
Hi Klaus,
>QT VR movies do not "play" in any way, they are supposed to be user-controlled !
Yes, of course, I knew this all along, I was just testing you.
Seriously, thanks, this puts my mind at rest.
Regards
Kevin
Re: Play movie automatically
Posted: Mon Aug 22, 2011 3:58 pm
by kevin11
Hello again,
Actually, I was thinking it would behave more like the html equivalent :
EMBED src="anisamples/AEA_0090.mov" AUTOSTART="true"
which of course plays the animation in a browser, and is what we do with our animation samples on our website. Once the animation is loaded, it plays, without requiring the user to click on a play button. Not sure why livecode doesn't support this....?
Kevin
Re: Play movie automatically
Posted: Mon Aug 22, 2011 4:24 pm
by Klaus
Hi Kevin,
you can of course use an iOS "browser" object to display your movie, if that works for you!
Check the release notes!
Best
Klaus