IFLASHPLAYER_LoadURL is returning error value 13.. | developer.brewmp.com IFLASHPLAYER_LoadURL is returning error value 13.. | developer.brewmp.com

Developer

IFLASHPLAYER_LoadURL is returning error value 13..

Hi guys,

In IFlashPlayer_LoadURL, i'm getting return value as 13. What does it mean?

This is my code...

ISHELL_CreateInstance(pMe->piShell, AEECLSID_FlashAMCPlayer, (void **)&pMe->piFlashPlayer);
//Create FlashWidget
ISHELL_CreateInstance(pMe->piShell, AEECLSID_FlashWidget, (void **) &pMe->piwFlash);
//Create FlashFrameModel
ISHELL_CreateInstance(pMe->piShell, AEECLSID_FlashFrameModel,(void **)&pMe->piFlashFrameModel);
//Set FlashPlayer to FlashFrameModel
IFlashFrameModel_SetIFlashPlayer(pMe->piFlashFrameModel, pMe->piFlashPlayer);
//Set FlashFrame model as FlashWidgt's model
IWidget_SetModel(pMe->piwFlash, (IModel *)(void *)pMe->piFlashFrameModel);
// Create an instance of SignalCBFactory.
ISHELL_CreateInstance(pMe->piShell, AEECLSID_SignalCBFactory, (void **)&pMe->piSignalCBFactory);
// Create a signal to be used for Flash player events.
ISignalCBFactory_CreateSignal(pMe->piSignalCBFactory,Flash_OnEvent, pMe,&pMe->piSignal, &pMe->piSignalCtl);
// Register a signal to be set if a Flash player event occurs.
IFlashPlayer_OnEvent(pMe->piFlashPlayer, CAST(ISignal *, pMe->piSignalCtl));
//Load swf file
IFlashPlayer_LoadURL(pMe->piFlashPlayer, SWF_MOVIE_FILE); // SWF_MOVIE_FILE = "loader.swf"..

loader.swf is the falsh file. But while loading it is giving return value 13.

Thanks
Jithendra

Error 13 is AEE_EBADSTATE, which means the player is in an invalid state.
From the documentation about IFlashPlayer_LoadURL() in AEEFlashAMCPlayer.bid:
Note that IFlashPlayer_SetFrameBuffer() must be called first with a valid
IFlashFrameBuffer object prior to calling this method.
Since you are using the FlashWidget, you don't need to call IFlashPlayer_SetFrameBuffer() directly; instead, the FlashWidget will do it for you once you set the size of the widget via a call to IWidget_SetExtent(). Once you do that, you should be able to call IFlashPlayer_LoadURL() successfully.
Hope this helps,
Mike

Error 13 is AEE_EBADSTATE, which means the player is in an invalid state.
From the documentation about IFlashPlayer_LoadURL() in AEEFlashAMCPlayer.bid:
Note that IFlashPlayer_SetFrameBuffer() must be called first with a valid
IFlashFrameBuffer object prior to calling this method.
Since you are using the FlashWidget, you don't need to call IFlashPlayer_SetFrameBuffer() directly; instead, the FlashWidget will do it for you once you set the size of the widget via a call to IWidget_SetExtent(). Once you do that, you should be able to call IFlashPlayer_LoadURL() successfully.
Hope this helps,
Mike

Hi,
Thanks for the reply.
I used IWidget_SetExtent() in my code now. Now IFLASHPLAYER_LoadURL is returning error 257, which means file does not exist. But the file is in present in the directory.
I noticed a small thing, i guess this is the problem. I checked all privilages in MIF file. And when i launch the app, then that MIF file was removed and created 1 more MIF automatically( In this newly generated MIF, privilages are unchecked). I guess this is the reason. To clarify i created filemgr instance and tried to create a file, but FILE instance itself is not created. Which means MIF privilages problem. I guess this is the problem for that error.
I dont know why MIF is generating automatically every time i launch the application.
Thanks
Jithendra

Hi,
Thanks for the reply.
I used IWidget_SetExtent() in my code now. Now IFLASHPLAYER_LoadURL is returning error 257, which means file does not exist. But the file is in present in the directory.
I noticed a small thing, i guess this is the problem. I checked all privilages in MIF file. And when i launch the app, then that MIF file was removed and created 1 more MIF automatically( In this newly generated MIF, privilages are unchecked). I guess this is the reason. To clarify i created filemgr instance and tried to create a file, but FILE instance itself is not created. Which means MIF privilages problem. I guess this is the problem for that error.
I dont know why MIF is generating automatically every time i launch the application.
Thanks
Jithendra

How are you running your app? Through AppCreator? Or Visual Studio?

How are you running your app? Through AppCreator? Or Visual Studio?

Hi,
I'm running from visual studio. Is this the problem?
Jithendra

Hi,
I'm running from visual studio. Is this the problem?
Jithendra

You should make sure that the .mif you are editing is the same one that is getting compiled with your project, or disable any post build step that copies the .mif to your app directory.
Also, make sure that the capitalization matches between the actual file name and the URL that you are passing to IFlashPlayer_LoadURL().
Hope this helps,
Mike

You should make sure that the .mif you are editing is the same one that is getting compiled with your project, or disable any post build step that copies the .mif to your app directory.
Also, make sure that the capitalization matches between the actual file name and the URL that you are passing to IFlashPlayer_LoadURL().
Hope this helps,
Mike

Hii,
I guess MIF is the problem.
I checked all privilages in MIF file. And when i launch the app, then that MIF file was removed and created 1 more MIF automatically( In this newly generated MIF, privilages are unchecked). I guess this is the reason. To clarify i created filemgr instance and tried to create a file, but FILE instance itself is not created. Which means MIF privilages problem. I guess this is the problem for that error.
I dont know why MIF is generating automatically every time i launch the application.
Thanks
Jithendra

Hii,
I guess MIF is the problem.
I checked all privilages in MIF file. And when i launch the app, then that MIF file was removed and created 1 more MIF automatically( In this newly generated MIF, privilages are unchecked). I guess this is the reason. To clarify i created filemgr instance and tried to create a file, but FILE instance itself is not created. Which means MIF privilages problem. I guess this is the problem for that error.
I dont know why MIF is generating automatically every time i launch the application.
Thanks
Jithendra

Hi,
Now that path is fine. I'm facing new problem.
IFlashPlayer_LoadURL is returning 21 value. Which means EPRIVLEVEL. But in CIF file i included both privilages AEEPRIVID_FlashPlayerAllowASExtensionEvents and AEEPRIVID_FlashPlayerAllowASExtensions . I dont know why it is throwing again EPRIVLEVEL error. Do i need to include some more privs?
Thanks
Jithendra

Hi,
Now that path is fine. I'm facing new problem.
IFlashPlayer_LoadURL is returning 21 value. Which means EPRIVLEVEL. But in CIF file i included both privilages AEEPRIVID_FlashPlayerAllowASExtensionEvents and AEEPRIVID_FlashPlayerAllowASExtensions . I dont know why it is throwing again EPRIVLEVEL error. Do i need to include some more privs?
Thanks
Jithendra

This is my CIF file.
include "flashapp.h"
include "AEEFlashPlayerPrivs.bid"
include "AEEFlashWidget.bid"
-- Include Directory = F:\SVN\flashapp\flashapp
-- Include Directory = C:\Program Files\Qualcomm\Brew MP SDK\Platforms\1.0.2.320\platform\languages\inc
AEEPRIVID_PLFile = 0x0001 --Declare
ModRsc {
name ="IDS_STRING_6",
id = 6,
type = 1,
data =UTF16_EncString("Remoba"),

Class {
classid = AEECLSID_flashapp,

Applet {
appletid =AEECLSID_flashapp,
resbaseid =20,
applethostid = 0,
type = 0,
privs = {AEEPRIVID_FlashPlayerAllowASExtensions,AEEPRIVID_FlashPlayerAllowASExtensionEvents,AEEPRIVID_PLFile},

ModRsc {
name ="IDS_STRING_20",
id = 20,
type = 1,
data =UTF16_EncString("flashapp"),

Do i need to include any privs for flash?

This is my CIF file.
include "flashapp.h"
include "AEEFlashPlayerPrivs.bid"
include "AEEFlashWidget.bid"
-- Include Directory = F:\SVN\flashapp\flashapp
-- Include Directory = C:\Program Files\Qualcomm\Brew MP SDK\Platforms\1.0.2.320\platform\languages\inc
AEEPRIVID_PLFile = 0x0001 --Declare
ModRsc {
name ="IDS_STRING_6",
id = 6,
type = 1,
data =UTF16_EncString("Remoba"),

Class {
classid = AEECLSID_flashapp,

Applet {
appletid =AEECLSID_flashapp,
resbaseid =20,
applethostid = 0,
type = 0,
privs = {AEEPRIVID_FlashPlayerAllowASExtensions,AEEPRIVID_FlashPlayerAllowASExtensionEvents,AEEPRIVID_PLFile},

ModRsc {
name ="IDS_STRING_20",
id = 20,
type = 1,
data =UTF16_EncString("flashapp"),

Do i need to include any privs for flash?