login  Naam:   Wachtwoord: 
Registreer je!
 Forum

[FLASH] Positionering

Offline a2dmarijnn - 19/05/2009 21:20
Avatar van a2dmarijnnNieuw lid heey mensen

ik heb een probleem ik zit met een slideshow maar hij zet hem in het midden van mijn website hij zo eigenlijk op x=18 y=216,8 staan met een hoogte en breedte van width="276" height="208"

kan er mij iemand halpen om in volgende code deze positionering te plaatsen ?

ik heb dit gevonden via :
http://www.repu.../index.php

  1. import mx.transitions.Tween;
  2. import mx.transitions.easing.*;
  3.  
  4. var myShowXML = new XML();
  5. myShowXML.ignoreWhite = true;
  6. myShowXML.load("slideshow.xml");
  7.  
  8. myShowXML.onLoad = function() {
  9. _root.myWidth = myShowXML.firstChild.attributes.width;
  10. _root.myHeight = myShowXML.firstChild.attributes.height;
  11. _root.mySpeed = myShowXML.firstChild.attributes.speed;
  12.  
  13. _root.myImages = myShowXML.firstChild.childNodes;
  14. _root.myImagesNo = myImages.length;
  15.  
  16. createContainer();
  17. callImages();
  18.  
  19. };
  20.  
  21.  
  22. function createContainer() {
  23. _root.createEmptyMovieClip("myContainer_mc",1);
  24.  
  25. myContainer_mc.lineStyle(0,0x000000,0);
  26. myContainer_mc.lineTo(_root.myWidth,0);
  27. myContainer_mc.lineTo(_root.myWidth,_root.myHeight);
  28. myContainer_mc.lineTo(0,_root.myHeight);
  29. myContainer_mc.lineTo(0,0);
  30.  
  31.  
  32.  
  33. }
  34.  
  35. function callImages() {
  36.  
  37. _root.myMCL = new MovieClipLoader();
  38. _root.myPreloader = new Object();
  39. _root.myMCL.addListener(_root.myPreloader);
  40.  
  41. _root.myClips_array = [];
  42.  
  43. _root.myPreloader.onLoadStart = function(target) {
  44.  
  45. _root.createTextField("myText_txt",_root.getNextHighestDepth(),0,0,100,20);
  46. _root.myText_txt._x = (Stage.width-_root.myText_txt._width)/2;
  47. _root.myText_txt._y = (Stage.height-_root.myText_txt._height)/2;
  48. _root.myText_txt.autoSize = "center";
  49.  
  50. _root.myText_txt.text = "test";
  51.  
  52. };
  53.  
  54. _root.myPreloader.onLoadProgress = function(target) {
  55.  
  56. _root.myText_txt.text = "Loading.. "+_root.myClips_array.length+"/"+_root.myImagesNo+" Completed";
  57.  
  58. };
  59.  
  60.  
  61. _root.myPreloader.onLoadComplete = function(target) {
  62.  
  63. _root.myClips_array.push(target);
  64. target._alpha = 0;
  65.  
  66. if (_root.myClips_array.length == _root.myImagesNo) {
  67.  
  68. _root.myText_txt._y = myContainer_mc._y + myContainer_mc._height;
  69. _root.target_mc = -1;
  70. moveSlide();
  71. myShowInt = setInterval(moveSlide, (_root.mySpeed*1000)+1000);
  72.  
  73.  
  74. }
  75.  
  76. };
  77.  
  78. for (i=0; i<_root.myImagesNo; i++) {
  79.  
  80. temp_url = _root.myImages[i].attributes.url;
  81. temp_mc = myContainer_mc.createEmptyMovieClip(i, myContainer_mc.getNextHighestDepth());
  82.  
  83. _root.myMCL.loadClip(temp_url,temp_mc);
  84. }
  85.  
  86. }
  87.  
  88.  
  89. function moveSlide() {
  90.  
  91. current_mc = _root.myClips_array[_root.target_mc];
  92. new Tween(current_mc, "_alpha", Strong.easeOut, 100, 0, 1, true);
  93.  
  94. _root.target_mc++;
  95.  
  96. if (_root.target_mc>=_root.myImagesNo) {
  97. _root.target_mc = 0;
  98. }
  99.  
  100. _root.myText_txt.text = _root.myImages[target_mc].attributes.title;
  101. next_mc = _root.myClips_array[_root.target_mc];
  102. new Tween(next_mc, "_alpha", Strong.easeOut, 0, 100, 1, true);
  103.  
  104. }

1 antwoord

Gesponsorde links
Offline vinTage - 20/05/2009 00:21
Avatar van vinTage Nieuw lid
  1. myContainer_mc._x = ...;
  2. myContainer_mc._y = ...;

gewoon zo ?
Gesponsorde links
Dit onderwerp is gesloten.
Actieve forumberichten
© 2002-2024 Sitemasters.be - Regels - Laadtijd: 0.172s