Background: I'm building this photo gallery in AS3, when user clicks a thumbnail is displays text gathered from an XML file.
Problem Description: Everything runs wonderful on my local machine, but when I upload the files to the server and preview the site from the server, the line spacing on the description text is way different than when I preview the site local.
Below see two images so you can see the difference
Correct one (Preview from Local Machine)
correct Spacing http://www.olemedia.net/lineSpacing1.jpg
Incorrect One (From the Browser)
incorrect Spacing http://www.olemedia.net/lineSpacing2.jpg
Solution: Any suggestions?
It is indeed a line break issue that depends on what platform you're on, or rather. how the xml document was saved. Line breaks on windows are \r\n (Carriage Return + Line Feed). if I recall correctly. Flash player interprets both as a newline. I usually do something like this:
var text:String = xml.whatever.text().split("\r").join("");
That will get rid of all the \r's (if they're there) and leave only \n's.
Your images don't show up (I think there's a minimum reputation required to post images), but based on the description I'm going to guess that your local machine is windows and the server is unix. It's probably a problem with line-endings being \r\n instead of \n, most editors can do this conversion for you, or there are various tools to convert.
If this isn't right, link to the images so that we can see what's happening.
I found the solution. Is a bug with Flash CS4 (mac and windows).
I place my flash file to a Linux server and also to a windows server. Definitely windows server was the problem. I'm not sure why but it is. I'm working from mac, and possibly this effect also on the type of server you publish you swf files.
Thanks everybody, much appreciate your time and dedication.
Related
Is it possible to set format of PDF to generate in wkhtmltopdf?
From my PC wkhtmltopdf generates format "PDF-1.4"
But remote Ubuntu 14.04 server that is generating pdf with a 'virtual' X server using xvfb giving format PDF-0:
The only problem is opening generated pdf file in Chrome :)
Chrome cannot open PDF-0.
Thanks
It looks like the resulting PDF from xvfb might not be 100% correct. There are some problems with the meta data. It's missing the creator for example. Also PDF-0 does not appear to be a valid PDF version. There might be other problems with the document. This would be a possible reason why the generated file does not appear in Chrome.
A good way to examine the document would be using Acrobat's preflight tool. It will inspect the document for potential problems, and that could give provide a clue on what's going on. The tool is located under "Print Production" in Acrobat. The profile to run is called "Report PDF syntax issues". I'm sure there are other tools out there that can also explain what is wrong with the document.
This section should provide a resolution to the problem. As mentioned in the comments below, updating the QT version from 4.8.6 to something newer should resolve the issue. The working setup appears to be running 5.3.2, while the non working one is under QT 4.8.6.
May i recommend phantomjs as an alternative (headless tool, no server x needed at all) to xkhtmltopdf.
HTML to PDF rendering is very straight forward (e.g. http://phantomjs.org/screen-capture.html )
Bounty answer:
Apparently QT 4 and QT 5 behave differently when printing to a PDF. Thus, your problem can be solved by upgrading the QT libs on your server.
You may consider filing a bug against wkhtmltopdf since your described behavior obviously renders it incompatible with QT 4.
See also original comment here.
I have recently downloaded my facebook archive, which is a very old account I started in 2009.
There is some conversations I would like to read, the main problem is that messages.html inside the zip weights 98 mo.
Unfortunately,neither mozilla or google chrome can open those 21109 lines of codes in a webview without crashing.
I could open the document with Notepad++, but it's just like searching for a needle in a haystack.
Could you help me please ?
Further to the LINUX comments, we can only assume you are trying to look (or search) inside the html file. You can use any good, text editor like: TextPad, EditPad, etc. You can also download "Unxutils" (not it is not mis-spelled) and use the Windows ports of grep/sed/awk/head/tail/cut etc. There maybe comments or answers posted to use Cygwin which work fine, but require the use of DLL libraries and such. The UnxUtils are stand-alone exe files are work right out of the box with no installation required.
If you are interested in getting some readable files for each conversation you can use the first part of this tutorial which generates csv files which are easily searchable.
http://openmachin.es/blog/facebook-messages
I am working on a local project (read: offline) and I am trying to get Brackets' live preview to work since it comes in handy quite often.
Right now I have opened my project files using Brackets' "open file" option since it supposedly maps the path to the source files. Although I am getting an error saying In order for Live Preview to connect, Chrome needs to be relaunched with remote debugging enabled.
I have read else where that Chrome, by default, does not need to be relaunched for that change and that Brackets force this flag by itself.
I have tried reinstalling Brackets, launching with another project and searched all over Chrome for this flag and did not find any thing.
Any tips?
This page shows you how to instal remote debugging! It's a Chrome dev tool. It's geared towards android apps for whatever reason, but I had that same error, and following the instructions on that page helped me launch the brackets page.
If that doesn't work, here are some troubleshooting tips that have helped me out with live preview:
1) Make sure your filename has a .html at the end
2) Use different browser (I've found chrome to be a bit finicky with brackets)
3) Make a different blank file, launch that, then launch the file
Open the folder, not the file, and then select the file.
Ever since I switched from Eclipse PDT to PHPStorm, I've been having problems on my site where images won't display correctly, especially the little icons in TinyMCE. My favicon also seems to be corrupted.
I'm sure the problem is that PHPStorm is doing a newline character substitution and not respecting my image files as Binary files. When I compare an image from the server with what I have stores locally, I see that it's doing newline substitution.
Any thoughts on how to solve this?
Here's the example of what one should do in Eclipse. I think I'm looking for something similar in PHPStorm.
Settings
IDE Settings
File Types
Upper half of the dialog select Image Files. Below click on Add and type *.ico, or whetever the file extension of your files is.
Should do it
I finally got it to work!
Just before checking your project out, you need to check "change keyword substitution to" and choose "binary".
I have a script that loads a php page for variables. There are no problems when the swf is uploaded to the site but when I run it locally, I keep getting "Error opening URL" messages. I'm using absolute pathing and if I paste the URL my script is using in a browser, the correct page opens. This only started happening after the site changed servers. Any ideas what the problem could be? Thanks.
The "Error opening URL" seems to be caused by a number of issues. I have tried to keep track of all the different solutions I have used in the past to fix the problem. Ever time I encounter the "Error opening URL" the solution is different. Hopefully one of these solutions helps you.
I usually find the following solutions on google.
- Make sure crossdomain policy is setup correctly.
- Set a bunch of variables like Security.allowDomain(domainHERE)
- Change publishing setting for your flash file.
- Make sure your connecting to the right url.
Here is what works for me... usually.
1) Make sure you are connecting to the right URL.
Use the full path, don't use relative links. Also, copy and paste the url in your web browser to see if it connects.
You can also use flash.events.HTTPStatusEvent.HTTP_STATUS to view the HTTP headers but I would recommend you check out solution 5 first. Its a much easier way with more details.
Source: http://www.judahfrangipane.com/blog/2007/02/15/error-2032-stream-error/
2) Put a crossdomain.xml file in the root of your server (usually public_html or www)
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM
"http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="*"/>
</cross-domain-policy>
Source:
http://www.senocular.com/pub/adobe/crossdomain/policyfiles.html
3) While editing the flash file, press Ctrl + Shift + F12
Make sure Local playback security is set to Access Network Only.
4) If you are hosting locally using MAMP, WAMP, XAMP or something similar, skip this step. Otherwise, Call your webhost and yell at them ;)
I have hosted with godaddy, hostgator and liquidweb. It seems that all of them have some kind of firewall setup blocking flash from accessing the files you want it to.
Give your host a call, tell them your problem and ask them to whitelist the files you are trying to connect to and you should be good to go.
Remember, everytime you want to connect to a new file, it has to be whitelisted. I always forget this and it takes me 3 hours to figure out why changing the name of my file or moving it messes everything up. :)
5) Use Charles Web Debugging Proxy Program to gather some important information.
I will break this down into a few steps.
Usually for me the "Error opening URL" is due to a coding problem on the site I'm trying to connect to.
Open Charles
Run your flash file
Select the site your flash file tried to connect to in Charles side bar.
View the Response tab near the top.
On the Response tab you should see a few other tabs near the bottom. View the Headers tab.
See what HTTP_Status was returned. Then look search this page to see what that status code means. It will give a somewhat broad definition but it still helps narrow things down.
500 Means a problem with your server... If your server is running fine, then its most likely a code problem.
Then view the Text tab near the bottom of the Response tab. This will show you exactly what that webpage looks like to flash. If your server is in some kind of debug mode where it displays errors, this is where you will see them.
Well I hope this helps someone. I will try to continue to update it with more issues and solutions I run into. This is probably the number one problem I run into with flash. Super annoying!
Crossdomains.xml file possibly?
not really a solution, but a work-around:
before CTRL-ENTER on your .fla, do a CTRL-S
this seems to work about 90% of the time for me
NOTE: I never had this problem until one random day about 6 months ago. Now it plagues most of my old projects, cs4 or cs6.