Forum Discussion
RPW68
9 years agoVisitor
Has anyone had any luck getting this to work with the Video-Player example?
I have been trying to get the example above integrated into it but can't get it to work. I am setting the "adPlayFlag" to true right before the video plays but it isn't executing any of the code in the main While Loop. I am fairly certain that the problem, for me, is that I am not updating the field properly The main scene for the Video-Player example is VideoScene which is where I setup the "adPlayFlag" and "adFinishedPlaying" fields (per the example):
The video is played from the "SpringBoard" scene and when I try to set "adPlayFlag" to true either an error occurs or nothing happens:
This results in "Invalid value for left-side of expression.":
This results in "Use of uninitialized variable."
And if I do this, nothing happens (I don't get an error, but it doesn't execute RAF code within Main.brs):
I am sure that this is something very basic but I am still adjusting to working in Scene Graph.
Any suggestions, comments, or help would be greatly appreciated.
I have been trying to get the example above integrated into it but can't get it to work. I am setting the "adPlayFlag" to true right before the video plays but it isn't executing any of the code in the main While Loop. I am fairly certain that the problem, for me, is that I am not updating the field properly The main scene for the Video-Player example is VideoScene which is where I setup the "adPlayFlag" and "adFinishedPlaying" fields (per the example):
<field id="adPlayFlag" type="bool" alwaysNotify="true" />
<field id="adFinishedPlaying" type="bool" alwaysNotify="true" />
The video is played from the "SpringBoard" scene and when I try to set "adPlayFlag" to true either an error occurs or nothing happens:
This results in "Invalid value for left-side of expression.":
m.scene.adPlayFlag = true
This results in "Use of uninitialized variable."
scene.adPlayFlag = true
And if I do this, nothing happens (I don't get an error, but it doesn't execute RAF code within Main.brs):
adPlayFlag = true
I am sure that this is something very basic but I am still adjusting to working in Scene Graph.
Any suggestions, comments, or help would be greatly appreciated.