Professional :: Restricting Javascript Calls From Flash?

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


Similar Posts:


Javascript :: External Interface Calls To Flash Not Working In IE9?

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

Flash :: Facebook Connect And Actionscript - Make All Of The Facebook API Calls Via JavaScript

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

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

ActionScript 2.0 :: Button That Calls A Javascript Function Like An Anchor?

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

ActionScript 2.0 :: Disable GetURL Javascript Calls When Publishing?

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

Professional :: Restricting Decimal Point Positioning - Using Whole Pixel Numbers?

Mar 2, 2010

I've frequently come across the issue when placing a movieclip or bitmap, the resting position of said object will land on a decimal value, not a nice, full pixel value. For instance, I drag a movie clip into a scene and it lands on a position of: X: 27.2, Y: 56.9, when I'd like it to be X: 27, Y: 57.
 
Now, this wouldn't bother me as much if I were dealing only in vector shapes. I currently work as a developer in the videogame industry and often times, for optimization purposes, I need to use both bitmaps and vectors. Plus, as a UI designer, text is very important to use throughout a game's UI. If you notice, when a font gets placed in an in-between position related to pixels, the text becomes blurry looking in appearance (graphical elements around the text can also appear blurry when in between pixel values as well). This can make UI pages or HUDs look sloppy and unprofessional.
 
I've tried enabling snapping (including enabling the grid, setting the grid to 1x1 pixel, then enabling both pixel snapping and grid snapping), but nothing seems to help in getting objects to place on whole pixels. Yes, I can manually change pixel values to whole numbers (which I'm currently doing). But when you have to manually position 100 keys on a keyboard, it gets old pretty quick!

View 5 Replies

Html :: Handling JavaScript Calls To Window.open()- Not Using Native Windows - Adobe AIR

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

Professional :: Export Swf That Calls A Flv To Avi?

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

Professional :: Static Calls After Swf Unload?

Jan 25, 2011

I have a loader class that has a container and loads in swfs using Loader class. Within the loaded swf on the last frame of some nested clip, I have a call to a static function within some "Connector.as" class. Now what happens is when I try to unload the swf ( by removing all listeners, calling loader.stopAndUnload(), and setting all references of loader to null) before the nested clip calls the static funciton, the swf gets unloaded and garbage collected (all enterframe events etc. are removed because they no longer run) however even though there is no reference to the swf the nested clip still plays in the background and dispatches the call to the static function when the frame is reached

View 2 Replies

Flash :: Restricting SWF File Visibility?

Mar 7, 2010

I have a situation where my main SWF file loads many external SWF files. However, those external SWF files are just sitting in the public folder of the web server. Is it possible to restrict the SWF visibility to only my main SWF file (the one that loads the external SWFs). In the current state, any user who knows where to look can just type in the URL and get to the SWFs, not to mention rogue bots that don't follow robots.txt.The reason for this is very simple. Users user a username/password to log into the main Flash application and the main Flash application in turn loads the SWF files and ONLY then they are available to the user. Also, depending on who the logged in user is, some SWF files are restricted and not loaded.

View 2 Replies

Professional :: When Using IE7 For Parallel Https Calls Across Two Servers

Jan 6, 2012

Weeks back I faced a wierd issue in the behaviour of flashplayer running on IE7 which is invoking parallel https calls. I have two SSL enabled servers one is listening on port 443 and the other is listening on port 8443 but both running in the same domain. I developed a flex client (using httpservice class) which sends parallel https requests to these two servers. When the number of parallel requests increases say more than 5 requests to each server, the fault handler was encountered with the error message:[code]After breaking my head for a long days, I got one solution which would work. This issue is happening only if we are sending https requests to different ports in the same domain. So rather than moving one among the two servers to a new domain, I got a new DNS name for the same destination. So presently I got two DNS names pointing to the same machine in which both the servers are mounted.Now that I am using a separate DNS name for the server listening on port 8443 and the old DNS name is used to hit the server listening on 443.

View 1 Replies

Professional :: Web Service - Method Calls Show Params, But Not Results (which Return Empty)?

Feb 21, 2011

Using the web services panel, I've connected to a web service, but all the method calls will only show the param structures/types - not the result structures/types.  To the best of my knowledge, I'm sending the right parameters, in the right structure, but always I get an empty response.The web services panel:

Debugger results (with breakpoint placed just after a response is received):
 
Where might the problem be?

View 1 Replies

Professional :: Add JavaScript To Flash Pro?

Mar 26, 2011

I have a GoDaddy certification seal that is JavaScript. Anybody have any thoughts as how to incorporate into my Flash website?

View 1 Replies

Professional :: Javascript To Flash Using The Externalinterfac?

Apr 13, 2010

At the moment I have a GIF image of a world map with continents hyperlinked. At the moment clicking anywhere on the map overlays a flash map of the world where the user can then choose their location. The flash applet is already in the page, with in a table, that is set to display:none. Clicking the map simply changes it to block.
 
Is there a way to, once the applet has been put into view, autoamtically change the scene?For example the user clicks on Asia in the GIF, I would like the flash applet to launch and then automatically move to the Asia "scene".

View 1 Replies

Professional :: Handling A Javascript Variable In Flash?

Jan 6, 2010

The following bit of javascript writes and retrieves a cookie which counts a users visits to the page. Then using swfobject it both embeds main_banner.swf and passes the cookie value "visits" to it via flashvars. The trouble is in the actionscript below; the vallue has been passed (this is certain, because the .swf shows up rather than the alternative content)- but the .swf is stuck on the first frame rather than processing the cookie and sending the user to the appropriate frame label.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html [code].....

View 6 Replies

Flash :: Professional - Calling A Javascript Function

Jan 20, 2010

I'm trying to call a javascript function from within my swf and I'm having a couple of problems which are confussing me somewhat. I'm using this to call the function from flash:
ExternalInterface.call("pgcover"); I know that this is calling the function as I have set it trigger an alert action and this comes up properly. But I don't want the function to trigger an alert, this is just for testing purposes. I instead want it to change the styling on a div. I have set up a test page where I have asigned the function to a button and this works, the div display changes from block to none. When I get the swf to call the function setup to do the same thing, nothing happens.

[Code]...

View 4 Replies

Professional :: Calling A Javascript Function From Flash?

May 5, 2010

I have what I think is an easy question but I am having problems with it... Using AS2 / CS3, I am calling a javascript function from Flash, but i would like the value to be a variable and I cant figure out how to do it. the started code is below and I need direction on how to make "myVar" actually a variable.
 
var myVar = newValue_txt.text;
btnOne.onRelease = function() {     getURL("javascript:testFunction('myVar') ");
}
  
this is a stripped down version of what i am trying to do, but i think it gets the main point across.

View 3 Replies

Professional :: How To Pass Flash Variables To JavaScript

Aug 25, 2010

How can I pass variables to be used on the page the flash is embed?

View 1 Replies

Flash :: Professional - Convert String To Int In Javascript

Dec 25, 2011

I try to convert string to int in flash javascript:

[Code]....

but I got a message "int is not a function", can somebody tell me how to do this? also, what if I want convert number back to string?

View 3 Replies

Professional :: Dispatching Event From JavaScript To Flash Player?

Jul 10, 2010

Can I dispatch events from javascript to flash player? I am trying to do so by calling dispatchEvent() on flash player dom object but the event is not passing inside flash player.

View 5 Replies

Professional :: Handling Flash Video Cue Points In Javascript

Dec 13, 2010

how to get Javascript in an HTML page containing an FLV video to listen for cue points in the video? I understand how to get the cue points in, but most people only seem to want to handle the cue point events within Flash. I want to use Javascript to display a different text in a page element at each point. Does the method vary depending on what player you're using? How about when it's the standard Flash playback component? Does there need to be any special Actionscript in the SWF containing the FLV?

View 2 Replies

Professional :: Capture Events In Flash Website Using Javascript?

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

Professional :: Loading A Flash Video Player Into A JavaScript Layer?

Dec 18, 2010

I want to build a web page with a button that when clicked opens up a javascript layer and loads a flash player inside that layer.  And that layer would need a close button. 

View 4 Replies

CS3 Stringing Swfs Together In Flash Using MC Calls

May 15, 2009

I made an animation and I split it up into 3 swfs. Now I want to put them together so it plays one and then Calls the other and plays it when the first one is done and so forth.

View 1 Replies

CS3 Flash Form (calls Php) Not Working

Sep 10, 2010

For some reason my flash file is not calling a php file and sending out an email including the data entered in the flash file.

I've taken out other movie clips and graphics to make this easier on everyone.

Fla File: [URL]

PHP File (in txt format for read-ablity): [URL]

Note; As you can see I've used _root.movieclip, I've tried it with out _root and still no luck.

View 1 Replies

ActionScript 2.0 :: CS3 Restricting An IP Address To One Input?

Dec 6, 2009

Is there a way I can set a cookie or only allow an IP address to edit my XML with my SWF file only once a day?

View 1 Replies

ActionScript 2.0 :: Restricting Events To Only One MovieClip?

Oct 21, 2009

My stage size if 300x300 and I have three movie clips each of size 100x100. So there will be three movie clips on the stage. Now my problem when I Click on one movie clip, the onMouseDown event handler of all the three movie clips are being executed. Is there any way for restricting the event handling to only that particular movie clip which was clicked by the user ..?

View 2 Replies

ActionScript 2.0 :: Restricting The Mouse Follow?

Dec 8, 2002

how do I make it so that the an object only follows your mouse between certain points? I have a square with the code startDrag("", true). Then I put an if then statement saying...

if(this._x <=200){
startDrag("", false)
}

View 12 Replies

ActionScript 2.0 :: Restricting Drag To One Axis?

Mar 9, 2005

I'm using this simple code to drag a clip on stage:

on (press) {
startDrag ("");
}
on (release) {
stopDrag ();
}

how I can restrict the drag to the X axis only?

View 7 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved