Javascript :: Display Local Image Using Flash?
May 18, 2011Suppose that, I have local image path that get from <input type="file"... web control using javascript.I want to pass this path to Flash object and display that image in it.
View 1 RepliesSuppose that, I have local image path that get from <input type="file"... web control using javascript.I want to pass this path to Flash object and display that image in it.
View 1 RepliesI have a HTML box and load a local html file from the project. In this HTML file I use jquery and I want to load an image from my user directory. I see the image from my user directory but jquery doesn't works. I get this error:
[Code]...
But if I load an image from the app workspace, everything works fine (I see the image and Jquery works). Is this a policy problem? The error says that is a "null object reference" problem, but this can't be true...
I am facing a tricky situation here...this is the problem...I have a flash object over which i want to display an image These are the tricks that i tried...1.Playing with z-index(no use) 2.Setting the wmode parameter to transparent/opaque(again no use)3.Using javascript and displaying image only after the page is loaded(still no use)
<div style="position:absolute; top:0px; z-index:-2000;">
<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" id="obj1" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" border="0" width="176" height="146">
[code]....
also tried with value="opaque"
so I have a pretty big flash file on my homepage, which raises a few issues about what to do if the user doesn't have flash player installed on his/her PC.
I would like to make sure that if the user has a old version of flash player, or doesn't have it at all, a backup image will display in place of the flash, how can I accomplish that?
Iss Javascript or jquery an option?
I just tried to display a flash file and an image with Fancybox.
To imagine about what am I talking, take a look on the next snapshoot:
[URL]
fancybox to be loaded automatically on pageload with the .swf file and the .jpg .swf file to be centered as it is also on the example above .jpg file to be positioned on the right bottom of the screen/page
[Code]....
Can this be done, to show up 2 media files on a fancybox overlay at the same time?
My website will have a logo on the header that will play as a flash movie (animated flash movie .swf). I am looking for code / algorithm that will display an image with the same dimensions as the flash movie if Flash is not installed or enabled for the current user accessing the site. How do I do this?
View 2 RepliesIs there any hook to react to a user drag and dropping a text file onto a browser? If the user drops a text file onto the browser with my page loaded, I'd like to be able to open the contents of the text file using javascript. I don't think this is possible, but just checking.
Is something like this possible in flash?
As an alternate, the user could specify a file path for me, then I could open the text file and read it. Seems like this is a security risk and probably won't be allowed, but just checking. It looks like this is possible with flash 10?
I am building a flash widget for uploading files, but I want to display the thumbnail with html/js, once I have the file loaded via Browse into flash and have access to the raw data, is there a way to convert that to a base64 encoded dataURL so I can send that back out to JS to create a thumbnail like ?
View 1 RepliesI am running Flex mobile project and I would like my mobile app to be able to load and display pdf files that are saved locally. I do not want to go out to the web to access these pdf files.
I cant figure out how to make this code work for a locally saved file.
Error MSG: "Error #2044: Unhandled ErrorEvent:. text=Load error."
<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
overlayControls="true" title="PDF Display"
[Code]...
I am trying to make a flash movie display the Geo-location of the user (city and state), just like those JavaScripts that you see everywhere that say something like: "welcome to my page, from CITY NAME, STATE NAME."
After much searching, I believe that I may have found a solution, but I do not know how to implement it. It requires the use of a ".as" file, which I have no idea what to do with. Here is where I am at:
I am not allowed to post URLs, but you can google the phrase "flash geoip javascript" and it's the first link. -MaxMind GS WebService
That URL shows the javascripts to use (which are easy enough to implement by themselves), but at the very bottom of that page is a link to an "ActionScript wrapper" which allegedly facilitates usage with Flash. I just don't know what do with with the "ActionScript wrapper" or where to go from here.
After browsing for the images, and selecting them. How can I display a preview of the image in the datagrid? I am able to display the file name, file size, but was unable to display the image. Below are the codes I have written, it is not a complete code but just enough to make it understandable.
// variables used
var list:Array = new Array();
var listDP:Array = new Array();
[Code]....
I'm using swfobject to dynamically load a flash object into a div, and I'm wondering if there's an easy way to display a loading animation until the flash object is ready for display? In this case, I'm loading an embedded Issuu object, and you can see an example of Issuu loading via swfobject here. Depending on your connection speed, there is typically just a blank white space while the flash object loads, and it'd be great to indicate progress with a loading animation if possible.
View 1 RepliesI know there´s an api for flash but it has been deprecated, how can i display google maps inside flash using javascript api v3
View 1 RepliesHow do i display the flash banner first and then the home page details using javascript.I need load the flash first and then display the home page
View 1 RepliesI'm trying to execute a function like window.alert for example, from actionscript, when both the html file and the swf file are using the file: protocol.without changing global flash security settings
View 3 RepliesI'm currently developing a flex mobile project. I currently need to load local javascript using stagewebview. Like:
var str:String = '<head>'+
'<script src="myLocalJs.js"/>'+
'</head><body>...</body>';
webView:StageWebView = new StageWebView();
webView.loadString(str);
Is there any way to load local javascript using StageWebView? I'm not expecting an answer like 'There is a project called StageWebViewBridge' since it does't have all the features I need.
My site has a jQuery drop-down navigation menu and that is displayed beneath the Flash. How can I display the navigation menu above the Flash object? I tried with setting wmode="transparent" but it is not work.
View 1 RepliesI want to create a custom video like the videos on jibjab, i.e allow a user to upload an image of their face and superimpose this onto a video of a character's face.
View 1 RepliesI'm looking for javascript libraries and code that can simulate localStorage on browsers that do not have native support.Basically, I'd like to code my site using localStorage to store data and know that it will still work on browsers that don't natively support it. This would mean a library would detect if window.localStorage exists and use it if it does. If it doesn't exist, then it would create some sort of fallback method of local storage, by creating its own implementation in the window.localStorage namespace.I understand that Flash and Silverlight can be used for local storage as well, but haven't found anything on using them as a fallback for standard HTML5 localStorage. Perhaps Google Gears has this capability too?Please share any related libraries, resources, or code snippets that you've found! I'd be especially interested in pure javascript or jquery-based solutions, but am guessing that is unlikely.
View 8 RepliesHow would one go about caching / managing many large files (videos) on a user's computer via browser mechanisms (plugins are acceptable solutions). From what I can tell, local storage is about database type data, not files.
View 2 RepliesI'm trying to load a local xml file:
xmlLoader.load(new URLRequest("../xml/xmlData.xml"));
But I'm getting this security sandbox violation:
#2148: Only local-with-filesystem and trusted local SWF files may access local resources.
I don't get this error when I embed the XML file directly with the EMBED metadata tag.
We currently have a corporate intranet built with ASP.NET and originally designed for IE. One of the purposes of the intranet is to manage file versioning and to launch programs with the current file version. This requires the intranet to start processes on the machine locally, and is done using ActiveX.
We are now reworking the intranet to be as browser-neutral as possible, but this local application launching thing has us stumped. Can anyone suggest a browser-neutral way to start processes locally? This is strictly for internal use on a corporate LAN with computers that are authenticated on a Windows domain.
Possibilities that we've floated, in rough order of preference:
[Code]...
Anyone have any thoughts on what is likely to work and be not a huge PITA to implement?
While trying to develop some Android app I ran into the following problem:I load an swf file to a WebView, that makes js calls. I want to catch those js calls, so I useWebViews.addJavascriptInterface() to do so.Everything worked just fine when i loaded the swf file from a remote server, but when I load the same swf file form the Android file system, the javascript methods seem not to run (at least I cannot see them).
View 1 RepliesI've got 3 columns in an SQLite db I built with Firefox's handy SQLite Manager. So, I created 3 columns, an index/reference that's just an incrementing INTEGER for easy reference, a descriptive title of the image (so it can be searchable later) in a TEXT, and a BLOB type that holds the pngs.
I'm trying to add this in an assets folder into my project (as a pre-populated database) and display the blob images, one at a time, in a window one after the other, scrollable by user. This is where I'm running into problems. Eventually I want to be able to encrypt it and add a search tool, but first things first, and that's displaying an image.
I have spent several hours scouring the web about this topic, but there isn't much help out there: Adobe has tips about using SQLite with AS3 (their reference documents and the support section of their website have some overview articles) but nothing refers to reading blob data in depth.
On this site, I've found some references to Adobe Air looking for extra byte information when reading blobs since they have a different syntax to write to the databases created within the program. See: What is the first bytes in a Blob column SQlite Adobe AIR? Blob Sizeinfo?
So I'm building a web application, and in part of the application the user should choose an XviD (.avi) video file from his machine, to be played in the browser (without uploading it). I decided to use Flash for this.
Now I have two questions about this:
Which Flash video player is free to use and capable of doing this? How should I let the user choose a video file, and how can I link the Flash video player to the file?
[URL]
i want to know the image's url. but it's in a flash. i don't know how to see it.
i'm trying to trace the x and y coordinates from within a sprite. i've added a rectangle to the stage:
var rect:Rectangle = new Rectangle(10, 10, 200, 200);
addChild(rect);
rect.x = rect.y = 100;
adding a Mouse_Move event to the rect, i can trace mouseX and mouseY to receive the coordinates of the stage while moving over the rect, but how do i get the local x and y coordinates? so if i mouse over the very top left of the rect sprite, the mouseX and mouseY return 10 as the global coordinates, but how do i make it return 0 and the local coordinates of the sprite?
i assumed localX and localY was what i was looking for, but this doesn't work:
function mouseOverTraceCoords(evt:MouseEvent):void
{
trace(mouseX, mouseY, evt.localX, evt.localY);
}
i am currently building an application ( projektor) which loads big local files (no webserver) for some reason the flash player freezes until the whole file is loaded. i cannot display the load progress. the same code works fine when used with streaming from a server.
View 2 RepliesI'm developing a game add-on/plugin which replaces a built in feature of an online game. The game loads an .swf therefore, my solution also has to be an swf for it to work 'in-game'.
I would like to be able to have the user press a button in the custom .swf I am making - and this would open an external application (amongst other things). I.e. if there was a button that said Notepad, it would open Notepad.exe on the machine.
My initial thinking was that i could have a XML Socket server 'daemon' runnning (c#) , which i could connect to with flash - however, as both the swf and the daemon are local, flash complained and gave this error: "Error #2010: Local-with-filesystem SWF files are not permitted to use sockets."
The only way i know to fix this - is to change the security settings of flash - not very user friendly!
So! Any thoughts on how I could otherwise go about this? I was thinking a custom http server could do the trick (connected with URLRequest) although i'm not too sure.
Is it possible to allow users to paste image data into a Website? That is, they have an image in the clipboard and can paste it into an HTML Site? (I would then somehow grab the bytes and store them - persistence isn't the problem here) It needs to be Cross-Browser IE8, FF3.5 and Chrome 4, but I can use browser plugins like Silverlight, Flash or bare JavaScript if possible (I might even use Browser Plugins, although that would be painful to manage and IE would need ActiveX is guess...). Also since it's an internal site, I can add the site to the Local Intranet Zone in IE (not sure if that changes stuff for Firefox and Chrome).
View 2 Replies