-
1. Re: FLV fullscreen problem
kglad May 10, 2010 2:19 PM (in response to Petteri_Paananen)pass the content of your loader (after loading is complete and cast as a movieclip) to the below function:
function flvTakeOverDisableF(mc:MovieClip){
for(var i:uint=0;i<mc.numChildren;i++){
if(mc.getChildAt(i) is FLVPlayback){
FLVPlayback(mc.getChildAt(i)).fullScreenTakeOver = false;
break;
} else if(mc.getChildAt(i) is MovieClip){
flvTakeOverDisableF(MovieClip(mc.getChildAt(i)));
}
}
} -
2. Re: FLV fullscreen problem
Petteri_Paananen May 11, 2010 9:13 AM (in response to kglad)Thanks, that look promising...
I have a function where I load my external SWF in. I put a listener inside that function:
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, flvTakeOverDisableF);
Then I cast loaded SWF as a MovieClip inside the function you gave:
function flvTakeOverDisableF(mc:MovieClip){
var mc = MovieClip(loader.content); //casting loaded content as MovieClip mc
for(var i:uint=0;i<mc.numChildren;i++){
if(mc.getChildAt(i) is FLVPlayback){
FLVPlayback(mc.getChildAt(i)).fullScreenTakeOver = false;
break;
} else if(mc.getChildAt(i) is MovieClip){
flvTakeOverDisableF(MovieClip(mc.getChildAt(i)));
}
}
}I still do something wrong, I get warning:
TypeError: Error #1034: Type Coercion failed: cannot convert flash.events::Event@3d146a01 to flash.display.MovieClip.
-
3. Re: FLV fullscreen problem
kglad May 11, 2010 10:47 AM (in response to kglad)no, don't edit the code i suggested. use:
function whatever(){
//your loader code
.
.
loader.contentLoaderInfo.addEventListener(Event.COMPLETE,loadCompleteF );
}
function loadCompleteF(e:Event){
flvTakeOverDisableF(MovieClip(loader.content));
}
function flvTakeOverDisableF(mc:MovieClip){
for(var i:uint=0;i<mc.numChildren;i++){
if(mc.getChildAt(i) is FLVPlayback){
FLVPlayback(mc.getChildAt(i)).fullScreenTakeOver = false;
break;
} else if(mc.getChildAt(i) is MovieClip){
flvTakeOverDisableF(MovieClip(mc.getChildAt(i)));
}
}
} -
4. Re: FLV fullscreen problem
Petteri_Paananen May 11, 2010 10:55 AM (in response to kglad)Ok, thanks...
I did that and now I get warning:
ReferenceError: Error #1065: Variable FLVPlayback is not defined.
at sourceCS3_fla::MainTimeline/flvTakeOverDisableF()
at sourceCS3_fla::MainTimeline/magLoaded()
-
5. Re: FLV fullscreen problem
kglad May 11, 2010 1:15 PM (in response to Petteri_Paananen)are you using an flvplayback component?
-
6. Re: FLV fullscreen problem
Petteri_Paananen May 11, 2010 10:45 PM (in response to kglad)I suppose there has been used FLVPlayback component, but actually I can´t be sure, it looks like one but I only see SWF, not any source.... I must try to ask that.
-
7. Re: FLV fullscreen problem
Petteri_Paananen May 17, 2010 2:37 AM (in response to Petteri_Paananen)Have not heard a word from authors of that SWF file... but I open SWF into a decompiler and got lots of code... I picked up following function that was inside SWF:
public function get fullScreenTakeOver():Boolean
{
return flvplayback_internal::uiMgr.fullScreenTakeOver;
}Could I call that some way from my loading swf? And disable fullscreen of videoplayer that way?
-
8. Re: FLV fullscreen problem
kglad May 17, 2010 11:58 AM (in response to Petteri_Paananen)addt an flvplayback component to your loading swf's library. retest using the code i suggested. if that fails, delay the execution of the function i supplied for about 500ms after loading is complete and retest.
-
9. Re: FLV fullscreen problem
Petteri_Paananen May 17, 2010 9:43 PM (in response to kglad)ok,thanks... I tried that. Without delay it didn´t work... what do you think. can I just use setTimeout like this:
setTimeout(flvTakeOverDisableF(MovieClip(loader.content)),500);
-
10. Re: FLV fullscreen problem
kglad May 17, 2010 10:14 PM (in response to Petteri_Paananen)no, use:
setTimeout(call_flvTakeOverDisableF,500);
function call_flvTakeOverDisableF(){
flvTakeOverDisableF(MovieClip(loader.content))
}
-
11. Re: FLV fullscreen problem
Petteri_Paananen May 18, 2010 6:56 AM (in response to kglad)If I keep FLVPlayback component just in Library, it throws me:
ReferenceError: Error #1065: Variable FLVPlayback is not defined.
at sourceCS3_fla::MainTimeline/flvTakeOverDisableF()
at sourceCS3_fla::MainTimeline/call_flvTakeOverDisableF()
at Function/http://adobe.com/AS3/2006/builtin::apply()
at SetIntervalTimer/onTimer()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()If I drag it to stage, it doesn´t give any warnings but it behaves strangely. If I open it to browser and push fullscreen button, it opens that empty FLVPlayback Component to fullscreen:
-
12. Re: FLV fullscreen problem
Petteri_Paananen May 18, 2010 7:01 AM (in response to Petteri_Paananen)Never mind last one... I just named that extra FLVPlayback and used another fullScreenTakeOver = false; to it... now it works like a charm... million thanks to you (again)....
-
13. Re: FLV fullscreen problem
kglad May 18, 2010 7:12 AM (in response to Petteri_Paananen)you're welcome.
-
14. Re: FLV fullscreen problem
Ghost Of Death Jun 4, 2011 11:47 PM (in response to kglad)Whenever I search for a probelm and find a solution, I find that you are the one who posted that solution! Thanks for your great help!
-
15. Re: FLV fullscreen problem
kglad Jun 5, 2011 8:40 AM (in response to Ghost Of Death)you're welcome, too!
(believe it not, it's not unusual for me to search for the solution to a problem only to find that i'd solved it before.)




