469,631 Members | 1,209 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,631 developers. It's quick & easy.

Integration between flash swf with html on ie browser

hi, friends, i got stuck in a problem, where i am not able to load the swf files in the another swf files through xml file, running online in ie browser.


1. There are two button on the stage instanced named (next_btn) and (prev_btn)
2. A movieclip named container_mc.
3. swfs which is to be load in the container_mc

here is code for my fla file:




Expand|Select|Wrap|Line Numbers
  1. //====================  < Button controll script >  =====================\\
  2. next_btn.onPress = function() {
  3. if(s <xmldata.firstChild.childNodes.length-1){
  4. //trace("xmllength = "+xmldata.firstChild.childNodes.length+ "  s = "+s )
  5. //trace("movie name = "+xmldata.firstChild.childNodes[s].firstChild.childNodes[0].nodeValue)
  6. s++;
  7. }
  8. else {
  9.  
  10. s=0
  11. }
  12.  
  13. container_mc.loadMovie(xmldata.firstChild.childNodes[s].firstChild.childNodes[0].nodeValue);
  14. trace("nextButton is pressed");
  15. };
  16. prev_btn.onPress = function() {
  17. if(s > 0){
  18.  
  19. s--;
  20. }
  21. else {
  22. s = xmldata.firstChild.childNodes.length-1
  23. }
  24.  
  25.  
  26. container_mc.loadMovie(xmldata.firstChild.childNodes[s].firstChild.childNodes[0].nodeValue);
  27. trace("prevButton is pressed");
  28. };
  29.  
  30. //====================  < /Button controll script >  =====================\\
  31.  
  32. _global.completeMovie = true;
  33.  
  34. //_root.container_mc.loadMovie("showMov1.swf")
  35.  
  36. //====================  < XML load script >  =====================\\
  37. var xmldata:XML = new XML();
  38. xmldata.ignoreWhite = true;
  39. xmldata.onLoad = function(sucess:Boolean) {
  40. if (sucess) {
  41. check_text.text = "sucesssfully loaded";
  42. if (completeMovie == true) {
  43. }
  44. trace("file has been loaded");
  45. } else {
  46. check_text.text = "Error in loading ";
  47. trace("error in loading file");
  48. }
  49. };
  50.  
  51. xmldata.load("moviedata.xml");
  52.  
  53. //====================  < /XML load script >  =====================\\
  54. _global.s = 0;
  55. onEnterFrame = function () {
  56. if (completeMovie == true) {
  57. s++;
  58. container_mc.loadMovie(xmldata.firstChild.childNodes[s].firstChild.childNodes[0].nodeValue);
  59. };
  60. var xmllength:Number = xmldata.firstChild.childNodes.length;
  61. if (s == xmllength) {
  62. s = -1;
  63. }
  64. };
  65.  
  66.  
code on loaded swf:
first frame: _global.completeMovie = false;
lastframe:_global.completeMovie = true;

code on xml file:

Expand|Select|Wrap|Line Numbers
  1. <data>
  2.     <moviedata>
  3.         <movie1>showMov1.swf</movie1>
  4.     </moviedata>
  5.     <moviedata>
  6.         <movie2>showMov2.swf</movie2>
  7.     </moviedata>
  8.     <moviedata>
  9.         <movie3>showMov3.swf</movie3>
  10.     </moviedata>
  11. </data>
  12.  
http://www.mobileappshub.com/Mflash/game_run_area.html

The problem is that when i played my file the first swf which is (game_run_area.swf) loaded but after the rest of the swf is not loaded into the game_run_area.swf.

Plz reply if some one has the solutions.

Thanks

Deepak Nagpal
Jan 17 '08 #1
0 2628

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

5 posts views Thread by Turner | last post: by
3 posts views Thread by gb | last post: by
8 posts views Thread by Ben Bartsch | last post: by
115 posts views Thread by post2google | last post: by
18 posts views Thread by gconrads | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.