Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

calling a Flash object HTTPS ( only in IE, not loading the first time )

Former Member
0 Kudos

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

11 REPLIES 11

raja_thangamani
Active Contributor
0 Kudos

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

0 Kudos

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

0 Kudos

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

0 Kudos

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

0 Kudos

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

0 Kudos

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>

0 Kudos

Does anyone knows how to customise the cahe control of the WAS for a bsp application ??

thx

quentin

0 Kudos

Thanks for the info.

about cache , have you seen this

http://help.sap.com/saphelp_nw04/helpdata/en/72/c2153aab4a0c0ee10000000a114084/frameset.htm

Regards

Raja

0 Kudos

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

0 Kudos

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

0 Kudos

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