/** * Check read only script * Warns you about opening read only files in Flash IDE * By Phil Douglas 2008 * www.lookmumimontheinternet.com **/ fl.outputPanel.clear(); trace = fl.outputPanel.trace; function onDocumentOpened(){ var currentDoc = fl.getDocumentDOM(); nativePath = currentDoc.path; uriPath = nativePath.split(':').join('|'); uriPath = uriPath.split("\\").join("/"); uriPath = 'file:///'+uriPath attributes = FLfile.getAttributes(uriPath) if(attributes.indexOf('R')!=-1){ alert('This file is read only. If it is in SVN you should request a lock before working on it.'); } } fl.removeEventListener("documentOpened", onDocumentOpened); fl.addEventListener("documentOpened", onDocumentOpened);