Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

I have a question about IFlashPlayer_LoadURL(). I tried the sample codes, I checked that it worked well with the file on my computer. (#define SWF_MOVIE_FILE "media/sample.swf"
) With using IFlashPlayer_LoadURL(), I could find the file and it was played well.

Otherwise, regarding the media file on Internet, I couldn t play it. I just changed the file s URL like this,
#define SWF_MOVIE_FILE "mobile.embider.com/dev/private/oki/sample.swf"
I tried it in the same way. After IFlashPlayer_LoadURL(), I could received the event (IFlashPlayer_Event_LoadComplete), but I couldn t see anything.
Do I have to use other API for loading the file on Internet? Let me know the way to play the file using the web- URL.

The location of the sample code is as followings, ,
Qualcomm\Brew MP 1.0 SDK Rev 1.7\samplecode\c_ui_flashplayer

Thanks

Hi,
If the "sample.swf" file which you are trying to play has action script code written in AS 2.0 or 3.0 then it may not work in BMP.
Regards,
RV.

Hi,
If the "sample.swf" file which you are trying to play has action script code written in AS 2.0 or 3.0 then it may not work in BMP.
Regards,
RV.

Hi rv_nath,
For .swf located on the internet, be sure to include the "http://" like the following:
#define SWF_MOVIE_FILE "http://mobile.embider.com/dev/private/oki/sample.swf"
then it will work correctly.
I noticed that it returns IFlashPlayer_Event_LoadComplete as well, if "http://" is left off the string. I'll look into this.
Thanks,
Jason

Hi rv_nath,
For .swf located on the internet, be sure to include the "http://" like the following:
#define SWF_MOVIE_FILE "http://mobile.embider.com/dev/private/oki/sample.swf"
then it will work correctly.
I noticed that it returns IFlashPlayer_Event_LoadComplete as well, if "http://" is left off the string. I'll look into this.
Thanks,
Jason

I missed "http://"
I have checked that it worked well with "http://mobile.embider.com/dev/private/oki/sample.swf"
Thanks for your help - .

I missed "http://"
I have checked that it worked well with "http://mobile.embider.com/dev/private/oki/sample.swf"
Thanks for your help - .

Hi guys,
I'm facing a problem with IFLASHPLAYER_LoadURL. It is returning value 1 (means general failure).
I used IFlashPlayer_LoadURL(pMe->pIFlashPlayer, SWF_MOVIE_FILE) where SWF_MOVIE_FILE is "loader.swf". It is returning failed. I think it is problem with SWF_MOVIE_FILE name. I tried in different cases. Actually this movie file exists in my computer only, in my application directory itself.. What should i give here ? Do i need to give some different name?
THanks
Jithendra

Hi guys,
I'm facing a problem with IFLASHPLAYER_LoadURL. It is returning value 1 (means general failure).
I used IFlashPlayer_LoadURL(pMe->pIFlashPlayer, SWF_MOVIE_FILE) where SWF_MOVIE_FILE is "loader.swf". It is returning failed. I think it is problem with SWF_MOVIE_FILE name. I tried in different cases. Actually this movie file exists in my computer only, in my application directory itself.. What should i give here ? Do i need to give some different name?
THanks
Jithendra

Hello,
I think you used wrong file path.
Set the file path as below,
#define SWF_MOVIE_FILE "fs:/~/loader.swf"
You can find some samples with Flash player in %BREWMPSDK%/samplecode.
I hope it will help you.
Thanks

Hello,
I think you used wrong file path.
Set the file path as below,
#define SWF_MOVIE_FILE "fs:/~/loader.swf"
You can find some samples with Flash player in %BREWMPSDK%/samplecode.
I hope it will help you.
Thanks

Hi,
Thanks for the reply...I tried with that string also...
#define SWF_MOVIE_FILE "fs:/~/loader.swf"
It didnt work..
Thanks
Jithendra

Hi,
Thanks for the reply...I tried with that string also...
#define SWF_MOVIE_FILE "fs:/~/loader.swf"
It didnt work..
Thanks
Jithendra

Could you attach the log when you call IFlashPlayer_LoadURL()?
You can check it on the log window of BrewMP simulator.
If you can't call it normally, BrewMP might return some error messages.

Could you attach the log when you call IFlashPlayer_LoadURL()?
You can check it on the log window of BrewMP simulator.
If you can't call it normally, BrewMP might return some error messages.

Hi,
I have created a sample app on flash. This is my code.
result += ISHELL_CreateInstance(pMe->piShell, AEECLSID_FlashAMCPlayer, (void **)&pMe->piFlashPlayer);
//Create FlashWidget
result += ISHELL_CreateInstance(pMe->piShell, AEECLSID_FlashWidget, (void **) &pMe->piwFlash);
//Create FlashFrameModel
result += ISHELL_CreateInstance(pMe->piShell, AEECLSID_FlashFrameModel,(void **)&pMe->piFlashFrameModel);
//Set FlashPlayer to FlashFrameModel
result += IFlashFrameModel_SetIFlashPlayer(pMe->piFlashFrameModel, pMe->piFlashPlayer);
//Set FlashFrame model as FlashWidgt's model
result += IWidget_SetModel(pMe->piwFlash, (IModel *)(void *)pMe->piFlashFrameModel);
{
IWidget * piwLayer = 0;
WidgetExtent we;
//AEERect rcRoot;
// Base container
result += ISHELL_CreateInstance(pMe->piShell, AEECLSID_XYContainer, (void **)&(pMe->picLayer));
result += IXYContainer_QueryInterface(pMe->picLayer, AEEIID_IWidget, (void **)&piwLayer);
we.width = pMe->deviceInfo.cxScreen;//pMe->rcRoot.dx;
we.height = pMe->deviceInfo.cyScreen;//pMe->rcRoot.dy;
IWidget_SetExtent(pMe->piwFlash, &we);

// Create an instance of SignalCBFactory.
result += ISHELL_CreateInstance(pMe->piShell, AEECLSID_SignalCBFactory, (void **)&pMe->piSignalCBFactory);
// Create a signal to be used for Flash player events.
result += ISignalCBFactory_CreateSignal(pMe->piSignalCBFactory,Flash_OnEvent, pMe,&pMe->piSignal, &pMe->piSignalCtl);
// Register a signal to be set if a Flash player event occurs.
result += IFlashPlayer_OnEvent(pMe->piFlashPlayer, CAST(ISignal *, pMe->piSignalCtl));
//Load swf file
res =IFlashPlayer_LoadURL(pMe->piFlashPlayer, SWF_MOVIE_FILE); // SWF_MOVIE_FILE "fs:/~/flash_basicapp.swf"...
So when ever i launch the brew mp simulator it is creating 4 files in this path "C:\Brew MP\Targets\Sapphire (1.0.2.320)\fs\usermods\flashapp" (flash app is my sample app).
1. MIF
2. BAR
3. DLL
4. PDB file.
So i think this is the MIF directory path. So in this path there is no "flash_basicapp.swf" file. So when i try to do IFlashPlayer_LoadURL, it is returning EFILENOEXISTS error. So after launching the brew mp simulator, if i paste the flash_basicapp.swf file in this path ("C:\Brew MP\Targets\Sapphire (1.0.2.320)\fs\usermods\flashapp"), then it is returning this junk value 127319040.
What this junk value means?
And when ever i launch the brew mp simulator, it is creating new MIF BAR DLL PDB files. Why it is like that? And previously pasted "flash_basicapp.swf" in the working directory is automatically removed. Why it is removed automatically when i launch the simulator?
Thanks in advance
Jit

Hi,
I have created a sample app on flash. This is my code.
result += ISHELL_CreateInstance(pMe->piShell, AEECLSID_FlashAMCPlayer, (void **)&pMe->piFlashPlayer);
//Create FlashWidget
result += ISHELL_CreateInstance(pMe->piShell, AEECLSID_FlashWidget, (void **) &pMe->piwFlash);
//Create FlashFrameModel
result += ISHELL_CreateInstance(pMe->piShell, AEECLSID_FlashFrameModel,(void **)&pMe->piFlashFrameModel);
//Set FlashPlayer to FlashFrameModel
result += IFlashFrameModel_SetIFlashPlayer(pMe->piFlashFrameModel, pMe->piFlashPlayer);
//Set FlashFrame model as FlashWidgt's model
result += IWidget_SetModel(pMe->piwFlash, (IModel *)(void *)pMe->piFlashFrameModel);
{
IWidget * piwLayer = 0;
WidgetExtent we;
//AEERect rcRoot;
// Base container
result += ISHELL_CreateInstance(pMe->piShell, AEECLSID_XYContainer, (void **)&(pMe->picLayer));
result += IXYContainer_QueryInterface(pMe->picLayer, AEEIID_IWidget, (void **)&piwLayer);
we.width = pMe->deviceInfo.cxScreen;//pMe->rcRoot.dx;
we.height = pMe->deviceInfo.cyScreen;//pMe->rcRoot.dy;
IWidget_SetExtent(pMe->piwFlash, &we);

// Create an instance of SignalCBFactory.
result += ISHELL_CreateInstance(pMe->piShell, AEECLSID_SignalCBFactory, (void **)&pMe->piSignalCBFactory);
// Create a signal to be used for Flash player events.
result += ISignalCBFactory_CreateSignal(pMe->piSignalCBFactory,Flash_OnEvent, pMe,&pMe->piSignal, &pMe->piSignalCtl);
// Register a signal to be set if a Flash player event occurs.
result += IFlashPlayer_OnEvent(pMe->piFlashPlayer, CAST(ISignal *, pMe->piSignalCtl));
//Load swf file
res =IFlashPlayer_LoadURL(pMe->piFlashPlayer, SWF_MOVIE_FILE); // SWF_MOVIE_FILE "fs:/~/flash_basicapp.swf"...
So when ever i launch the brew mp simulator it is creating 4 files in this path "C:\Brew MP\Targets\Sapphire (1.0.2.320)\fs\usermods\flashapp" (flash app is my sample app).
1. MIF
2. BAR
3. DLL
4. PDB file.
So i think this is the MIF directory path. So in this path there is no "flash_basicapp.swf" file. So when i try to do IFlashPlayer_LoadURL, it is returning EFILENOEXISTS error. So after launching the brew mp simulator, if i paste the flash_basicapp.swf file in this path ("C:\Brew MP\Targets\Sapphire (1.0.2.320)\fs\usermods\flashapp"), then it is returning this junk value 127319040.
What this junk value means?
And when ever i launch the brew mp simulator, it is creating new MIF BAR DLL PDB files. Why it is like that? And previously pasted "flash_basicapp.swf" in the working directory is automatically removed. Why it is removed automatically when i launch the simulator?
Thanks in advance
Jit

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

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

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

Dependencies{
AEECLSID_FlashAppletFactory

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

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

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

Dependencies{
AEECLSID_FlashAppletFactory

Hi,
I'm sorry, I don't have any idea about your problem regarding your simulator and launching a App.
However, if there isn't enough memory, Flash can't be played.
So why don't you increase the memory for simulator?
You can set it as below,
Brew MP\Target Manager\Targets\Sapphire (1.0.2.320)\fs\sys\mod\Simulator\settings.ini
IDS_DD_HW_RAM_SIZE
I hope it'll help you.
Thanks.

Hi,
I'm sorry, I don't have any idea about your problem regarding your simulator and launching a App.
However, if there isn't enough memory, Flash can't be played.
So why don't you increase the memory for simulator?
You can set it as below,
Brew MP\Target Manager\Targets\Sapphire (1.0.2.320)\fs\sys\mod\Simulator\settings.ini
IDS_DD_HW_RAM_SIZE
I hope it'll help you.
Thanks.

Hi,
Thanks for the reply. Yaa it is coming to IFlashPlayer_Play. It is returning success too. But the swf file is not playing. I guess the IDS_DD_HW_RAM_SIZE is the problem. I increased it too. But it is not playing. I'm using saphire(1.0.2.320) simulator.
if (AEE_SUCCESS == IFlashPlayer_GetEvent(pMe->piFlashPlayer, &event)) {
if (IFlashPlayer_Event_LoadComplete ==
(IFlashPlayer_Event_LoadComplete & event))
{
int err;
err =IFlashPlayer_Play(pMe->piFlashPlayer);
DBGPRINTF("Err");
}
Thanks
Jit

Hi,
Thanks for the reply. Yaa it is coming to IFlashPlayer_Play. It is returning success too. But the swf file is not playing. I guess the IDS_DD_HW_RAM_SIZE is the problem. I increased it too. But it is not playing. I'm using saphire(1.0.2.320) simulator.
if (AEE_SUCCESS == IFlashPlayer_GetEvent(pMe->piFlashPlayer, &event)) {
if (IFlashPlayer_Event_LoadComplete ==
(IFlashPlayer_Event_LoadComplete & event))
{
int err;
err =IFlashPlayer_Play(pMe->piFlashPlayer);
DBGPRINTF("Err");
}
Thanks
Jit