Link problems with XML and actionscript 3

  • mikemike7
  • Born
  • Born
  • mikemike7
  • Posts: 1

Post 3+ Months Ago

Hi, I hope you can help me with a problem.

I have a slide viewer that loads information by a XML file.

I have a page with links. Each link goes to a specific frame and loads a new Xml file. The first xml loads with my new images and works perfectly.

When clicking on each image I've intructed the xml to go to different urls. Only the first xml file which loads these images and data (links) is working. The other xml files' datas (links) aren't working but the new images are. I've checked the xml files and all the data are correct. Please help me!

Code: [ Select ]
 
import flash.events.MouseEvent;
import flash.net.URLRequest;
import flash.net.navigateToURL;
import flash.events.MouseEvent;
import com.afcomponents.events.ScrollPanelEvent;
 
function onScrollItemClick(event:MouseEvent) {
 
var url:URLRequest = new URLRequest(event.target.data);
navigateToURL(url, "_self");
}
 
function onScrollXMLLoaded(event:ScrollPanelEvent) {
myScroll.addGenericItemEventListener(MouseEvent.CLICK, onScrollItemClick);
}
myScroll.addEventListener(ScrollPanelEvent.XML_LOAD_COMPLETE, onScrollXMLLoaded);
 
function prevPageClick(event:MouseEvent):void {
myScroll.displayPreviousPage();
}
btnPrevPage.addEventListener(MouseEvent.CLICK, prevPageClick);
 
function prevImgClick(event:MouseEvent):void {
myScroll.selectPreviousItem();
}
btnPrevImg.addEventListener(MouseEvent.CLICK, prevImgClick);
 
function nextImgClick(event:MouseEvent):void {
myScroll.selectNextItem();
}
btnNextImg.addEventListener(MouseEvent.CLICK, nextImgClick);
 
function nextPageClick(event:MouseEvent):void {
myScroll.displayNextPage();
}
btnNextPage.addEventListener(MouseEvent.CLICK,nextPageClick);
stop();
 
bona4.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
function mouseDownHandler(event:MouseEvent):void {
gotoAndStop(1);
}
 
TP4.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler1);
function mouseDownHandler1(event:MouseEvent):void {
gotoAndStop(2);
}
 
SE4.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler2);
function mouseDownHandler2(event:MouseEvent):void {
gotoAndStop(3);
}
 
  1.  
  2. import flash.events.MouseEvent;
  3. import flash.net.URLRequest;
  4. import flash.net.navigateToURL;
  5. import flash.events.MouseEvent;
  6. import com.afcomponents.events.ScrollPanelEvent;
  7.  
  8. function onScrollItemClick(event:MouseEvent) {
  9.  
  10. var url:URLRequest = new URLRequest(event.target.data);
  11. navigateToURL(url, "_self");
  12. }
  13.  
  14. function onScrollXMLLoaded(event:ScrollPanelEvent) {
  15. myScroll.addGenericItemEventListener(MouseEvent.CLICK, onScrollItemClick);
  16. }
  17. myScroll.addEventListener(ScrollPanelEvent.XML_LOAD_COMPLETE, onScrollXMLLoaded);
  18.  
  19. function prevPageClick(event:MouseEvent):void {
  20. myScroll.displayPreviousPage();
  21. }
  22. btnPrevPage.addEventListener(MouseEvent.CLICK, prevPageClick);
  23.  
  24. function prevImgClick(event:MouseEvent):void {
  25. myScroll.selectPreviousItem();
  26. }
  27. btnPrevImg.addEventListener(MouseEvent.CLICK, prevImgClick);
  28.  
  29. function nextImgClick(event:MouseEvent):void {
  30. myScroll.selectNextItem();
  31. }
  32. btnNextImg.addEventListener(MouseEvent.CLICK, nextImgClick);
  33.  
  34. function nextPageClick(event:MouseEvent):void {
  35. myScroll.displayNextPage();
  36. }
  37. btnNextPage.addEventListener(MouseEvent.CLICK,nextPageClick);
  38. stop();
  39.  
  40. bona4.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
  41. function mouseDownHandler(event:MouseEvent):void {
  42. gotoAndStop(1);
  43. }
  44.  
  45. TP4.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler1);
  46. function mouseDownHandler1(event:MouseEvent):void {
  47. gotoAndStop(2);
  48. }
  49.  
  50. SE4.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler2);
  51. function mouseDownHandler2(event:MouseEvent):void {
  52. gotoAndStop(3);
  53. }
  54.  
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

Post Information

  • Total Posts in this topic: 1 post
  • Users browsing this forum: No registered users and 14 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.