ActionScript 3.0 :: Capture Javascript Calls From A Loaded SWF?
Jun 7, 2010
My main movie (SWF A) loads another movie (SWF B) and plays it.SWF B is legacy content - I can't modify it.SWF A is AS3. SWF B might be AS2 or AS3SWF B makes several calls to a javascript function that would normally reside in the hosting web page.The javascript calls might use ExternalInterface, or they might use getURL(javascript: xxx) or they might even use fscommand.
My questions:
Is there any way I can intercept the javascript call in movie A? I don't want to have to resort to the browser, so simply using ExternalInterface or similar to pipe the request back into the movie won't work.
If there is a way, how does it vary across the different versions (ie. what's the difference between the child movie being AS2 or AS3, and what's the difference between the various means of calling js?
I'm working on a web deployment, using Flex 4.0. I would be interested also in whether this is possible in Air, or Air Mobile.
View 1 Replies
Similar Posts:
Oct 15, 2009
I am using Flex and with the AS3 libraries.I can make calls etc but when i get values returned in the event,they are in RawResult. I am not sure how to turn that into an arraycollection etc so i can make use of it in flex, or if there is a better way of accessing the data, generally speaking.
var friendsDoc : XMLDocument = new XMLDocument(e.data.rawResult);
var decoder:SimpleXMLDecoder = new SimpleXMLDecoder(true);[code]....
View 1 Replies
Mar 24, 2010
I've got a website where I want people to be able to upload their own SWFs which are then displayed on the page - mainly for timed image displays etc...I'm concerned about javascript security as flash can call JS functions, theoretically if you knew which JS commands to call (e.g. some AJAX stuff) then external people could do some real damage.So my question is, is there anyway I can disable calling javascript from within flash? Possibly something in the embed object paramaters tags?
View 2 Replies
Jan 31, 2011
We have a flash game embedded in a web page (using SWFObject v2.2) and there are some links on the page that call into the flash in the following manner:
window.document["flashObjectId"].flashMethod();
This has worked great on all browsers we have tried including IE7 and 8, however on IE9 it generates the following error: "SCRIPT438: Object doesn't support this property or method".
It does work in compatibility mode so I tried adding a meta tag to tell IE9 to use compatibility mode by default, however that didn't work because our game runs in an IFrame within Facebook.
I have tried referencing the flash object every way I could think of in the Javascript but I always get that same error message in IE9.
View 3 Replies
Feb 9, 2009
I have a button in an AS 2.0 fla that calls a javascript function like an anchor so the html goes to a set y position of 750button actions are in a frame
jobsLink_mc.onPress = function () {
//ExternalInterface.call("scrollPageY");
///getURL("javascript:scrollPageY();")
getURL("javascript: scrolling()")
}
Now the javascript in the html of the page is
<script language="javascript">
function scrolling(){
document.body.scrollTop = 750;
}
</script>
I originally copied the code from a page a designer never finished but the function works. [URL]click the blue button JOBS / INTERNSHIPS you will see the flash button calls the java function and the page is viewed at Y 750 Now I have the same page elements in a different fla that calls the same function and it doesn't work.
[URL]
View 8 Replies
Feb 21, 2007
Is there a way to tell Flash to ignore getURL javascript calls when testing? It's highly annoying to hit control + enter and then have a damn browser window pop-up every single time.I'm woring on a site that has javascript calls to Google Analytics to track nearly every action. This is not by my choice but by the choice of a client. Typically the tracking gets added last but in this case, that was for phase I launch of the site and now I'm onto phase II.I could go through & comment out all the getURL javascript calls until the sites ready but I'm hoping theres another way.
View 3 Replies
Dec 9, 2008
Ideally what I was initially looking for is an implementation of the HTML5 Media Capture API with a polyfill rolling back to Flash, however, my research has concluded that the API is in its infancy and is yet to be taken up by any of the major vendors, and in addition to that, Flash means for doing what I need seem scarce.I need to be able to take webcam input from a camera, show a live preview, record, and play back that recording, nothing more, no upload to server necessary, all local
View 1 Replies
Nov 24, 2011
Ideally what I was initially looking for is an implementation of the HTML5 Media Capture API with a polyfill rolling back to Flash, however, my research has concluded that the API is in its infancy and is yet to be taken up by any of the major vendors, and in addition to that, Flash means for doing what I need seem scarce.
I need to be able to take webcam input from a camera, show a live preview, record, and play back that recording, nothing more, no upload to server necessary, all local.
View 1 Replies
Dec 18, 2009
I am trying to track the exit clicks of the users in the adds in my page.
Can I somehow capture with Javascript the click event of a user in a external Flash add I have inserted in my page?
I have been searching and trying by myself, but it seems like the flash object inside of my page is a black box, where I could not access anyway.
View 1 Replies
Jan 5, 2010
I need to capture the event raised when a flash video ends. If possible, I'd like to distinguish this from a user clicking the stop button.
One thing to be made perfectly clear:
I DON'T HAVE CONTROL OVER THE PRESENTATIONS OR THE SWF FILES.
What I'm looking for is simple (I thought) js automation of the client player object, not more complex interactivity with the presentation itself. I thought this would be really simple stuff, but a dozen Google and Bing searches later, I can't find anything about it.
View 2 Replies
Jul 26, 2010
I am developing an Adobe AIR application which uses both native windows and floating panels. Is is possible to enable the creation of a floating window instead of a native window when a JavaScript window.open() function is called?
It is required that all of the floating windows are contained within one native window, therefore the creation of more native windows is not suitable.
I have used a Custom HTMLHost class in order to enable the creation of a native window but I can't work out a way of creating a MDI window instead. I am using the flexMDI framework for my floating panel interface.
View 1 Replies
Jul 21, 2011
I want to capture flash events in webpage using javascript. By flash events I mean like, clicking a Button, mouseover, entering text in textbox in flash content (websites). I see adobe flash uses Action script code to get the events in eventlisteners. How can I use the same API in javascript?
View 4 Replies
Apr 8, 2012
For example, check out [URL] They enable their users to capture videos of themselves and then create animated gifs from them.
Just so this isn't construed as spam, I do not work for Gifyo. It's just an example.
Can this be done now with HTML5? Should I maybe us Javascript? Flash?
View 1 Replies
Dec 21, 2011
I am trying to capture the microphone and send the recording to my server.. I tried this method here but it records only a big WAV and the upload can be slow sometimes. Is there a way to capture the voice and compress it on the client side? Best method would be to send the recording while recording, but I have no Idea if this is possible. (It works for YouTube Live Webcam recording, it must work for Audio only too..)
View 1 Replies
Jul 18, 2011
What I want to do is have control over the streams so I can send them wherever I want, have it interface w/a mic and cam, and the ability to capture and record them. At this point I don't have any specific specs or limitations. It will be used in a commercial project so the license must allow for that. Free and OSS is preferably, but commercial and proprietary is not out of the question if it's worth it.
I don't see html5 as a viable solution at this point so I'm assuming it's going to rely on flash which is fine, but I do not know actionscript. I'm not opposed to learning it, and assume I could pick it up fine within a week, but keep that in mind. If I have to build something myself from the actionscript libraries (I assume they provide enough functionality) I can do so, but I'm hoping for a quicker solution than that.
View 2 Replies
Feb 26, 2011
I'm looking for a flash script/library to capture video and audio from a webcam and then somehow get a saved flv to my encoding server. I'm not looking for something that will host the videos for me. I just need something simple to capture and then upload. I really want this to be open source and free.
I've done a fair amount of searching and it seems that most of what i can find is either a full blown service with hosting, or the red 5 suite. I've been trying for a day to get something going on with Red5, but honestly I haven't done any flash or java development in over 6 years and this seems way too complicated when all i really want is a flash object i can stick on a webpage.
View 2 Replies
Sep 9, 2011
I have a cms where my client loads banner ads from their clients. They don't know the dimensions or don't want to enter them when they upload the banners. Is it possible to capture the dimensions to set the object attributes as we grab the movies from the db to display in the page?I read that the movie dimensions are available in the loaderinfo object, but this is a AS3 object right? Are AS3 objects available outside the flash movie? Can I access the loaderobject via javascript?The Flash movies we're trying to load are not ours, we don't have access to the flas or anything like that so we can't edit anything to do with the movies themselves.
View 2 Replies
Jan 25, 2009
I have an interface that contains audio controls in the Library (class: AudioControls)When a movie is loaded into the interface, and it happens to contain a sound (class: Audio_1), this loaded movie calls an interface function to show the audio controls:
Code:
if (Interface._ui != null) {
Interface._ui.playCurrentAudio();
}
The problem is, the playCurrentAudio() func in the interface contains some code that refers to nested MCs:
Code:
public function showAudioControls():void {
audioControls.x = 710;
audioControls.y = 583;
//
[code]....
That would be the speaker, rewind_btn, playPause_btn, etc. Referring to the parent clip, "audioControls", is no problem of course. But I get an error when I publish the loaded movie:
1119: Access of possibly undefined property speaker through a reference with static type AudioControls.
1119: Access of possibly undefined property rewind_btn through a reference with static type AudioControls.
1119: Access of possibly undefined property playPause_btn through a reference with static type AudioControls.
View 1 Replies
Jun 1, 2009
I'm trying to determine the practical difference between using the com.facebook.session.WebSession and com.facebook.session.JSSession. The documentation ([URL]) has more around WebSession - but the example I have which is closest to what solution I'm trying to implement uses JSSession and it looks like I could avoid all of the JavaScript pass-through & ExternalInterface calls I'm making. It appears that the benefit of using this new ActionScript Facebook API is to avoid having to make all of the Facebook calls via JavaScript.
View 5 Replies
May 26, 2009
I'm using a custom right click context menu for a flash app (overriding the default adobe menu). For this Uza's right click solution [URL] works well.
However, flash player plugin (for Firefox/Chrome etc) has a bug which breaks usage of international characters when its using WMode for the html embed. WMode="widnow" works.
[URL]
The issue can be seen better here -
[URL]
I need to capture the right click event fired from Flash player plugin to the web browser container without using WMode on the html embed tag (ie. WMode="window")
View 1 Replies
Mar 20, 2012
I have javascript that loads external swf, appending tags "object" and "embed" when page has been loaded. I need to handle event when swf is completely load.
View 1 Replies
Nov 17, 2009
is there a way to write a program in php or javascript that can load a flash file and interact with it? (click on buttons and such)
View 4 Replies
Dec 24, 2011
I'm using an ASP.NET server side control for playing mp3, of course I can use javascript or flash controls for doing so, but my problem is that I want the music to be played only once (at site start up), and its playing should continue when user displays new pages, I've used this control in master page, I don't want the music to be restarted whenever a new page is loaded?
View 1 Replies
Feb 2, 2011
Is it possible to use JavaScript to detect whether a .swf file has loaded completely within a web page?Assume that the .swf file is pulled from a 3rd-party website and we don't have access to its source code.
View 2 Replies
Nov 12, 2011
I know that most of the media in web pages are temporarily stored to a temp folder or browser cache. Some are directly embedded in web pages so that we can see the source and can save them. But how to save images loaded using any other method? You can see what I am talking about here. Is there any solution to save images from this site's gallery?
View 3 Replies
Sep 13, 2010
Like the title say's, is it possible to send data to my flash movie after it has been loaded? More specific: I have a flash-movie with an image in it, and from the outside I would like to be able to alter it by sending fe. '?color=FF00FF' to the movie
View 2 Replies
Feb 8, 2011
I have a media player, which rotates images for the artist it plays. I load the images dynamically into the flash. The flash downloads the same images from the server over and over, how can i cache the images, so flash grabs them from a local cache and not from the server?
View 2 Replies
Sep 6, 2010
I tried to render html page which contains flash content. But it not responding. Loads endless. Text and image contents are OK. Here is my code.
self.response.out.write(template.render('ieerror.html', dict()))
html file contains:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />[code].....
View 1 Replies
Aug 20, 2010
I have a Flash movie that uses Actionscript 2.0 to trigger animations. The swf and flv files are separate though - the flv is called by the swf. There are cues in the flv that fire Actionscript events. How can I get the whole thing to export? I can convert the flv to an avi but I need the animations.
View 1 Replies
Sep 26, 2011
I'm debugging some code and see a loop where an event is dispatched and a remote call is made for every record.Everything was working fine until there were several hundred records (700) to be a exact. Is that going to make the flash player chug? Should I move to a queued system? How many records is too many? [code]
View 1 Replies