12-25-2006 10:03 PM
Hi everyone !
I'm trying to call a flash object from a bsp page, I've uploaded the flash into the mime repository (via the SE80). It works quiet well in Firefox, but with IE, i need to refresh the page, it won't load the first time i access the page.
Does anyone has any idea ?? do i have to customize something within the SICF ?
thx for the help
merry Xmas
Quentin
12-26-2006 4:25 AM
You can make the page reloaded automatically via JavaScript so that your Flash object will be loaded..
javascript:window.location.reload(True);
You could attach this JavaScript code to an OnClientClick event or in your server event set a flag. Test for this flag in your view/page coding and generate the JavaScript call based upon that flag.
Raja T
12-26-2006 11:08 AM
thx for the reply, I knew that i can do that, but it does not seems like a very clean solution.
I would like to know why it is not working IE. I think that might be caused by a Cache problem with HTTPS and IE.
I'd like to know, if someone had that problem before, I'm developping applications with Flex and BSP, and i need to make it work with HTTPS.
Thanks for your answer anyway
Good day
Quentin
12-26-2006 11:16 AM
are you using flex builder to develop the flex application? if yes are you using the generated html page for the flex object in your bsp or just using the swf in your own bsp
Raja
12-26-2006 11:30 AM
I used flex builder and flashdevelop to generate my swf object.
I'm calling my flash, with the swfobject script. very usefull
only 3 lines of javascript code.
Do you think the problem is linked with the way i call my flash ??
did you already use a flex obect with your bsp in https ??
Quentin
12-26-2006 11:48 AM
i am new to flex. i am using flex builder 2 to build flex objects. when i create flex application using MXML application and compile it, it automatically compiles to a swf and associated html for that.
i have noticed that if i just upload the swf into my bsp and using it my bsp pages, there were problems with statemanagement, back button etc.
but if the use the generated html (copy paste it to my bsp) along with the generated history.htm and histoy.js and the script file AC_OETags.js those problems were gone.
i am not using https.
<i>I'm calling my flash, with the swfobject script. very usefull
only 3 lines of javascript code.</i>
i am not aware of this , can you share the code, may be i could try that in my environment.
Regards
Raja
12-27-2006 7:00 AM
http://blog.deconcept.com/swfobject/
the javascript to use with Flash
as stated in the web site,
only the following code is needed to display a flash movie in a page
<script type="text/javascript" src="swfobject.js"></script>
<div id="flashcontent">
This text is replaced by the Flash movie.
</div>
<script type="text/javascript">
var so = new SWFObject("movie.swf", "mymovie", "200", "100", "7", "#336699");
so.write("flashcontent");
</script>
12-27-2006 12:25 PM
Does anyone knows how to customise the cahe control of the WAS for a bsp application ??
thx
quentin
12-27-2006 7:05 PM
Thanks for the info.
about cache , have you seen this
http://help.sap.com/saphelp_nw04/helpdata/en/72/c2153aab4a0c0ee10000000a114084/frameset.htm
Regards
Raja
02-04-2008 1:34 PM
Hi there,
any news on this?
I have almost the exact same problem. Both using IE and Firefox the SWF does not get displayed and I need to right-click and select "play". It then works real nice.
I have tried both js solution given within this thread and the result is the same. I am not even using https
I have installed the same htm/swf pages on a J2EE server and it works fine for both IE and FireFox browsers. It seems to be a config BSP problem.
Under SE80, I have moved pages from the MIME section to the view or page section, with the same result
ANY suggestion will be very welcome
02-06-2008 4:55 PM
Solved it, I created a page to call the flex from the MIME
here it is :
DATA: w_xstring TYPE xstring.
DATA: w_mimetype TYPE string.
* References
DATA: w_url TYPE string.
CONCATENATE 'sap/bc/bsp/sap/Z0008/' url INTO w_url.
CALL FUNCTION 'Z_FLEX_MIME'
DESTINATION sy-sysid
EXPORTING
url = w_url
IMPORTING
l_xstring = w_xstring
l_mimetype = w_mimetype.
response->set_data( w_xstring ).
navigation->response_complete( ).
EventHandler Oninitialization :
sap/bc/bsp/sap/Z0008/ is the url to my swf file in the SICF
Module Function Z_FLEX_MIME
FUNCTION Z_FLEX_MIME.
*"----------------------------------------------------------------------
*"*"Interface locale :
*" IMPORTING
*" VALUE(URL) TYPE STRING
*" EXPORTING
*" VALUE(L_XSTRING) TYPE XSTRING
*" VALUE(L_MIMETYPE) TYPE STRING
*"----------------------------------------------------------------------
* References
DATA: lo_mr_api TYPE REF TO if_mr_api.
* instantiate MIME API class
CALL METHOD cl_mime_repository_api=>if_mr_api~get_api
RECEIVING
r_mr_api = lo_mr_api.
* Get file from MIME repository
CALL METHOD lo_mr_api->get
EXPORTING
i_url = url
IMPORTING
e_content = l_xstring
e_mime_type = l_mimetype
EXCEPTIONS
parameter_missing = 1
error_occured = 2
not_found = 3
permission_failure = 4
OTHERS = 5.
ENDFUNCTION.
If you have any questions please fell free to ask
good day
Quentin
Edited by: Quentin Dubois on Feb 6, 2008 5:55 PM
04-02-2008 6:29 AM
to over come .swf not loading for the first time (you need to right click and click play) you have apply OSS Note 904314
(Adding .swf to profile parameter ict/exclude_compression fixed the issue.)
Regards
Raja