Author Topic: Locally publishing in flash cs3 doesny work  (Read 2100 times)

Max

  • Newbie
  • *
  • Posts: 13
Locally publishing in flash cs3 doesny work
« on: February 11, 2009, 03:45:52 pm »
Whenever i publish megazine.swf it gives an error on the xml(in the build in console) however the path to the xml is ok, when i open it after publishing it works just fine.

edit: *just read the bug report post*

from the consolse:

Very Simple Console [Version 1.12]
(C) Copyright 2007 Florian Nuecke.

Type "help" for command listing.

** [20:02:24] [   MegaZine    ] System:  MegaZine Version 1.31 initialized.
** [20:02:24] [   MegaZine    ] Notice:  Begin loading XML data from file 'file:///C...ers%20magazine/megazine.xml'.
** [20:02:24] [   MegaZine    ] Error:   Could not load XML data: Error #2032: Stream Error. URL: file:///C|/Documents%20and%20Settings/Administrator/Desktop/Nexwork/Tempeleers/flash/release/tempeleers%20magazine/megazine.xml?r=707068
« Last Edit: February 11, 2009, 08:03:23 pm by Max »

Florian Nücke

  • κρύα πόδια
  • Administrator
  • Hero Member
  • *****
  • Posts: 1985
  • MegaZine3 Developer
    • MegaZine3
Re: Locally publishing in flash cs3 doesny work
« Reply #1 on: February 12, 2009, 01:24:08 pm »
I'm assuming you open the SWF in the standalone Flash Player when that happens, right?

If so: the reason lies within the fact that a random parameter is automatically added to the URL to the XML every time (in this case the ?r=707068) to circumvent Flash's caching - which oftentimes keeps things in cache even though they're in need for an update. The standalone Flash Player does not understand that parameter syntax (it's an http/browser thingy), so it actually tries to open a file with that name - which doesn't exist, obviously.

I'll have to investigate how to tell whether the engine is running inside a browser or the standalone player, then I can add a workaround for that.
For the Snark was a Boojum, you see.

Before you ask a question
          After you get an answer
  • please document your problem with the answer in the Project Wiki. (e.g. in the FAQs)
  • help others out if you can, by answering their questions on the forum.

Max

  • Newbie
  • *
  • Posts: 13
Re: Locally publishing in flash cs3 doesny work
« Reply #2 on: February 13, 2009, 11:10:39 am »
Well i just removed the extra parameter from the load request which helps. Although now it doesnt get refreshed it isnt nescessary for me at this point.

Couldnt you build in an extra check, when it hits IOErrorEvent on the load request it first tries loading the xml url without the extra param? That way when published in flash IDE it works and online it still doesnt get cached. Just a thought.

Florian Nücke

  • κρύα πόδια
  • Administrator
  • Hero Member
  • *****
  • Posts: 1985
  • MegaZine3 Developer
    • MegaZine3
Re: Locally publishing in flash cs3 doesny work
« Reply #3 on: February 13, 2009, 02:43:02 pm »
I found out how to check for the player type (if you're interested: http://digitalmedia.oreilly.com/helpcenter/actionscript30cookbook/chapter3.html) so I'll add an extra check based on that for the next version.

//Closed, check implemented.
« Last Edit: February 22, 2009, 04:37:07 am by Florian Nücke »
For the Snark was a Boojum, you see.

Before you ask a question
          After you get an answer
  • please document your problem with the answer in the Project Wiki. (e.g. in the FAQs)
  • help others out if you can, by answering their questions on the forum.