Blank Swf after printing from another app - apache-flex

Ok, so i am having a problem, where i developed an app that uses the webcam, adds an image and then takes a picture, well, i implemented textbook style the printjob, and well everytime after printing my swf goes blank.
As3 printing problem, blanks swf after print or cancel
But now i have been continuing testing, and i found out, that if i print from another application and then comeback, my video stream from the webcam is blank, this has no sense at all, since i am printing from another app.
Please i need help with this, i have found one additional case:
http://board.flashkit.com/board/showthread.php?t=781089
What is going on here i mean, this must be a flash player issue right.

I'm not sure that I completely understand your question but have you tried setting up a crossdomain policy file so you can get access the BitmapData of the image you're trying to print?

Related

HTTP: pictures not fully received. how to avoid that, i.e. force browser to try again?

I have written a small picture script which shows a directory listing with thumbnails and also previews of the pictures.
Directory listing example
Image preview example
Source code
In some cases, when you click through several image previews (you can also use the arrow keys left/right to do that faster), some images don't fully load (and they are only shown partly then).
I think this has started to appear more often since I am preloading the next few pictures but it also has appeared before. This also occurs most often if you switch the images very fast.
I wonder why this appears and how I can avoid this. I guess that the browser somehow looses some connection to the server (or the server closes it unexpectedly for some reason). Thus I tried to work around this by setting Content-Length (and I was hoping that the browser would reconnect automatically if the file was not received fully) but that didn't helped.
Also, in the browser, a normal reload of the page doesn't help, I have to force a full reload.

Disable print, print screen, right click using asp.net

How to Disable print, print screen, right click using asp.net
You cant. You cannot avoid content being copied from your pages.
Disabling Right Click is possible, but it doesnt solve your 'problem'. The user could still copy your image, by disabling javascript or just inspecting the source.
And even if you could disable those keys, the user could still just make a photo of his monitor. Good luck disabling that!
Short answer: You don't. You are writing a web application; features of the underlying platform are outside your scope, and you have no business trying to fiddle with them.
Long answer: You can try to capture those keys using javascript, and override the default behaviour, which will somewhat stop very naïve users, but all it takes to disable this "security" is to turn off javascript. Even if you come up with more sophisticated "protection", the essence remains: You are sending content to the client, and once it gets there, it is out of your hands. Given suitable tools (wget is enough for most things), anyone can copy and modify your content in any way they like. Similarly, whatever can be shown on the screen inside a browser can be captured and saved. There is no way around it. If you don't want your content copied, don't send it.
Forget about it. You will irritate your end users who will find a way to con you and do what you didn't want them to do. Forbidden fruit is always the sweetest. By telling them explicitly "you cannot do this", they will wonder why do you want to guard your content and they might try even harder to do stuff you otherwise wouldn't want them to do.
Psychology and technology are against you in this case.
Printing
You could disable printing (well sort of - it's not 100% effective) using a "print" style sheet.
I have not tried it myself, but here is a link that could get you started: http://webdesign.about.com/od/advancedcss/qt/block_print.htm
Print screen
Print screen is something that is typically controlled by the operating system not the browser nor webpage. So you are unlikely to be able to stop this. However, casting my mind back I remember a time (perhaps a long long time ago), where you couldn't take screen shots in Windows (maybe Windows 98) of videos... so if your really in need of disabling print screen - perhaps you could perhaps encode your content in a video... but this will have many many downfalls - namely accessibility, search engine optimisation and it being a royal pain to do... so I wouldn't recommend it under any circumstance.
Right screen
Right click you can disable, but not using a server-side technology (such as ASP.net) instead in a client-side technology such as javascript. A quick search in your favourite search engine will find some help. But disabling right click is rudimentary to get around, so it is not full proof.
An alternative to protect your content is to possibly investigate "rights" in PDFs. I believe you can disable the "right" to print.
However none of these solutions are going to be full-proof. As long as you are making your content available to an end-user on their own computer, there is always going to be a way around your restrictions.
I have implemented for disabling printing using window.onbeforeprint()
Refer this Answer

How to edit images using javascript in real time and save the edited image on the server?

Is it possible to edit images using a javascript library and then send the edited image to the server for saving.
Edits will be in real time, means the user can see the edit result in the same time he is editing without the need to refresh the page.
I want a javascript library to do some edits on an image on a webpage 'such as crop, resize, rotate,...' and send send the edited result to the server.
How this can be done or if there any smart work around to something like this.
The libraries mentioned don't seem to be fully cross browser. As far as I know there is no fully cross browser compliant way to edit pixel data on the client.
The current best approach would be to do these manipulations on the server. You can still do this real time using a web service.
As an example see the image editor in TinyMCE which supports crop, rotate, resize, flip, all from the client without a page refresh.
Pixastic is an image manipulation library; once you've modified the image, some sort of post back / upload call from the script will be able to upload the image provided you've implemented the needed functionality to do so.
An incomplete list to be sure, but these are two that come to mind which allow you do a wide variety of editing on the client side and push back to the server.
PIxastic
AIE
And there are numerous less complete image editing tools for simply cropping or adjusting contrast as well.
jcrop is what you are looking for .

How does YouTube prevent video content from being saved/redistributed?

Sure, you can embed a YouTube video on any site, but the content ultimately must come from their server. What technology(ies) do they have that prevents us from saving/redistributing content?
From a protocol standpoint, you would think that anything that comes over the wire could be saved. I hope I am not the only guy on Earth who does not know how to "save" a YouTube video...
There are a couple of plugins for Firefox out there that let you save the content. Basically it parses the sourcecode and looks for the videofile (either .flv or .mp4) and downloads that directly. The flash player on the page just plays the supplied file. They could of course obfuscate the path to the video file, but that can be reverse engineered as well. They can't really do anything about it, because the video file has to be on the user's computer at some point, or if not, the stream could be intercepted as well.
eg. https://addons.mozilla.org/de/firefox/addon/6584/?src=api
Mostly it's a legal deterrent rather than technical. There are a plethora of programs out there that will allow you to download their video. But there are two things they do that help reduce unauthorized downloads:
Use is flash to control the download and playback.
Hosting video yourself is not cheap, and thus it's much easier to simply leave the video on youtube.
They don't do anything about it. Very likely your Flash viewer downloads a copy and puts in somewhere on your harddrive (under my Linux system with Firefox and Adobe Flash in /tmp). After you are done viewing the file is removed to save disk space, but since it is on your harddrive nothing prevents you from making a copy elsewhere.
You might want to look at the 'analogue hole', in the end, data still has to be displayed on your screen, or get through your speakers and what not. It's always theoretically possible to intercept it at that point, or even just record your audio-out into another machine.
So as far as the analogue hole goes, the only solution is to skip that, in this form:
(source: thisdomainisirrelevant.net)
Which is not that marketable.

Cursor through html in VS lags

If I have a decent size asp.net page open in Source view, and hold down the Up key or Down key to scroll through it, it will periodically get "stuck". It will stop on a line for a few microseconds, and you can see the screen flash, like it's trying to catch up with what it's trying to do behind the scenes. In my two-monitor setup, I'm working in monitor 2, and you can see the icons on the desktop on monitor 1 flash. It's annoying because I invariable overstep lines and have to move back and forth, constantly correcting for the lag. Any idea what it's doing as I cursor through the code? Anything I can turn off to stop this from happening? (Slowing down my key repeat rate is not an option.)
It's possibly the property pane - this was a big issue in VS2005, and VS2005SP1 not only added a feature to turn this off, but turned it off by default, however it looks like they've removed the option to turn it off in VS2008.
Scott Guthrie had a post on HTML Source Editing Performance in VS2005 SP1.
Closing the property pane may well solve the issue if you don't really use it all that much.

Resources