Skip navigation
RicardoLourenCo
Currently Being Moderated

FLASH - 1º XML UPDATE 2º SWF into FLA

Nov 27, 2012 12:42 PM

Tags: #dreamweaver #swf #xml #2.0 #load #fla #actionsript #integration!

Hi

 

Recently i've been assigned to be the WebDesigner of my new JOB, but meanwhile i've been fighting with the normal problems, OTHER guy did the SITE! eheheh

 

And resuming my problems are:

 

a) when I update my XML file for a menu, when i copy it to the server.... in the web it appears the same  name as it has been for ages.... i've read that it ill refresh.... but i would like a confirmation! Can you help me with that?

 

 

b) I had to do a new banner, and include a older one made by the other... guy... When I am seeing the SWF in my computer, no problem... when i put it on dreamweaver... i doesnt show the supposed SWF...

 

I used in the timeline

loadMovie("1.swf", "empty_mc");

 

And it works, except on dreamweaver!

 

Please helpp....

 

Thank you

Best regards

 

Ricardo Lourenço

Lisbon, Portugal

 
Replies
  • Currently Being Moderated
    Nov 27, 2012 1:14 PM   in reply to RicardoLourenCo

    You mentioned loadMovie so I'm assuming you're using ActionScript 2.0?

     

    Cache is sometimes hard to deal with. Most likely your browser is caching the old XML and when you upload the new XML it doesn't get it because it already has a cached version. To get around it, add a random argument to the end of the request for the XML so the browser will think the request is unique every time.

     

    e.g.

    var myXML:XML = new XML();

    myXML.ignoreWhite = true;

    myXML.onLoad = someParserFunction;

     

    // send a random number to the load string that won't

    // affect the XML loaded at all

    myXML.load("my.xml?r=" + Math.round(Math.random() * 99999));

     

    The XML cache issue should go away.

     

    On the banner, what version of Dreamweaver? How are you viewing it, such as are you viewing it in Live View on a modern version of DW with a test server or are you just testing locally in the WYSIWYG editor?

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 28, 2012 8:06 AM   in reply to RicardoLourenCo

    The only code you've posted so far is "loadMovie('1.swf','empty_mc');". Is that literally what you're doing?

     

    As far as the XML goes, please post your code to load the XML so I can help you update it for cache friendliness.

     

    Note that when testing locally you can get into sandbox and domain violations very easily. The best thing to do is test in your desired context when you're a beginner. When you want to test, upload the files to your website where nobody else can see them for testing. Many of the issues you'll get into running the content locally will not happen online so that will remove a lot of unnecessary complexity.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 28, 2012 12:50 PM   in reply to RicardoLourenCo

    A lot of code but not really what I'm looking for. It's important to know I'm not being literal when I say things like:

     

    menu.onLoad = someParserFunction;

     

    That simply means I don't know what you're doing in your project and to point the onLoad to a function that will "do something" with the XML once it's loaded.

     

    You hadn't mentioned the XML was for a TreeView component. All you're going to want to do is, after the XML is loaded, set the .dataProvider of the component to the XML you just loaded. There's a function being fired off in that class that should handle that for you which is:

    // get the menu XML

    this.xml_conn.trigger();

     

    Find the code for xml_conn and find the trigger() method. There should be something in there that's not only loading XML but is also setting the dataProvider of "this.tree". When you find that you can paste the code or just adjust it like I mentioned above by adding the random number to it.

     

    As for loading the 1.swf, your target needs to exist. You specified 'empty_mc' as the target. If that's not a MovieClip already on the stage then you'll need to create it.

     

    e.g.:

     

    this.createEmptyMovieClip('empty_mc',this.getNextHighestDepth());

    loadMovie('1.swf','empty_mc');

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points