Flex :: Custom Event - Cross Domain Objects

Sep 14, 2011

I have an object being passed between flash and flex using the a custom event. I am importing a library in flex containing a copy of the object's class. The classes are identical. But when I attempt to access the object in flex I get this error:
TypeError: Error #1034: Type Coercion failed: cannot convert com.cackleberries.data.api::ApiObject$ to com.cackleberries.data.api.ApiObject.

This function is passed into flash as a callback from AIR / flex
public function airEventHandler(type:String, data:Object):void {
switch(type) {
case "air_api_call":
if(data) {
if(data.hasOwnProperty("apiObject"))
[Code] .....

I am getting the error when I pass the apiobject to serverApi.makeApiCall. That function takes a ApiObject as its parameter. Initially, the data object is created with with the apiObject key with a ApiObject as the value (done in flash).

View 1 Replies


Similar Posts:


ActionScript 2.0 :: Cross Domain SendAndLoad Via Cross Domain Script

Nov 5, 2010

My swf works fine when previewed locally but because of flash cross domain issues (link below) doesnt work live. [URL] Ive used a 'crossbrowser.php file to .load in xml but am not having success with the sendAndLoad command. [URL]

View 3 Replies

ActionScript 3.0 :: Post The Code For A Working Cross-domain Securityfile That Allows Access Only From The Same Domain?

Jun 1, 2010

post the code for a working cross-domain securityfile that allows access only from the same domain as all the flashfiles and xml files are in?used to be easy in as2 but i think i dont know what i need to know about it in as3..

View 3 Replies

Flex :: Using Proxy To Over Come Cross Domain Restriction?

Nov 7, 2010

After reading James Ward's post I'm considering using a proxy rather than a crossdomain.xml file. I have a java app, which includes a flex applet, on one tomcat instance and a java web service on another tomcat instance. Does it make sense to have a single (Apache httpd) proxy handle requests for both the app and the web service, thus eliminating the cross domain restriction?how to deal with the cross domain issue are welcome.

View 2 Replies

Flex :: Cross Domain - Error On Using HTTP Service

Dec 17, 2010

I'm trying a simple tutorial of retrieving RSS feeds from yahoo and keep getting this error: RPC Fault faultString="Security error accessing url" faultCode="Channel.Security.Error" faultDetail="Destination: DefaultHTTP" I've seen some articles that say I need a crossdomain.xml file, but I don't really know how to set this file up and how to use it from the Flex SDK compiler (mxmlc).

View 1 Replies

Bypass The Cross-domain.xml Requirement For An Adobe AIR Application Built With Flex?

Apr 23, 2010

Is it possible for an Adobe AIR application to connect to a remove webservice that does not expose a cross-domain.xml file? If so, how do you configure the security sandbox within Air to allow this?

I have attempted a socket connection and received the following error:

[Code]...

View 1 Replies

Actionscript 3 :: Flex 4 Disptaching Custom Event From Custom Component (why Flex Converting Custom Event To Mouseevent)?

Mar 2, 2012

This is NOT duplicate of my earlier post (its is slightly different)But this is similar issue with similar error but its not the same error The error I am getting now is below while dispatching the custom event from my custom component

TypeError: Error #1034: Type Coercion failed: cannot convert events::MapEvent@a74ab51 to flash.events.MouseEvent.
dispatchEvent(new MapEvent(MapEvent.CLICKED_ON_MAP));

Note: The error in my earlier post is giving below error message

Type Coercion failed: cannot convert flash.events::Event@81ecb79 to com.events.ShopEvent

The difference here are two things, the earlier error is while converting flash event to custom event and now this one is while converting custom event to flash event and secondly, I have no clue why it is trying to convert to the mouseevent where I am just dispatching my custom event with proper listeners.

This is my custome event

package events
{
import flash.events.Event;
import ui.map.MapElement;

[code]...

View 1 Replies

IDE :: Cross Domain Policy?

Jun 16, 2008

any one have a snip of code to allow the flash player to acess a cross domain policy file. i have one but its for as2 i tried it in as3 and it throws me errors.

View 4 Replies

ActionScript 3.0 :: Cross Domain XML Not Loading

Aug 4, 2010

I created an XML gallery in as3 that will be loading images from a different domain.

I have a .swf (swf1) on serverA that loads an XML from serverB. The XML on serverB points to the image locations located on serverB (I need to host the images on serverB because server A doesn't have enough room).

The images load fine from swf1 locally in Flash, but when I publish swf1 to serverA, the images do not load. My guess is that the XML on serverB is not being loaded correctly because I can see that swf1 on the webpage.

Here is how my XML is set up:

<?xml version="1.0" encoding="UTF-8" ?>
<images>
<image src="http://serverB/media/images/image.jpg" title="This is image 1"/>
</images>

[Code].....

View 2 Replies

ActionScript 1/2 :: Cross Domain XML Not Working?

Apr 10, 2009

I recently obtained two different domains that point to a subdirectory of another domain server. The swf file I created does not show up when I use the domains that are pointing to the subdirectory of the original domain.I placed an xml file into the root directory that contains the following code:

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">[code]....

Nothing shows up. Is there something else I need to do make this work? I created the swf file using CS3.

View 5 Replies

Professional :: Bypass The Cross Domain Xml?

May 1, 2011

What my swf (on mysite1.com) need to do, is that POSTing some php values from mysite1.com (paid hosting) to a file on mysite2.com (free hosting) and get the 100% of the html response. I've started this project in AS2 but I couldn't find a function that get the source of a website, so I recreate the project in AS3 with URLRequest and URLLoader. Everything went fine, I've finished the project, uploaded the file, and there comes the cross domain problem. I can't upload/modify any file on mysite2.com because I can only add pages/posts (like a blog).  I've read at least 20 forums about this, but can't find the solution.

I know (from the manual) that in later versions of flash and/or AS, the swf file asked the user for permission (like now for the webcam). Is there a way to do this in as3 or any way to bypass the need of the crossdomain xml file? If no, what is that older flash version that can do this permission request or that don't need that xml, (but still can post to php files and get the whole response).
 
I'm really upset, because I worked a lot of hour on this, and I was so happy that I could finish it, but I didn't know that there is such a big difference in security between local and online swf files.

View 4 Replies

Cross-domain File Access?

Nov 4, 2010

it's just not working for me I made a crossdomain.xml file that looks like this:

Code:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="*" />
</cross-domain-policy>

i put that in the folder with the php file i want to access[URL]..

View 1 Replies

Actionscript 3 :: Cross Domain In Flash

Dec 6, 2010

I have two swf files hosted on different domains [URL] and [URL]. a.swf is loading b.swf and trying to cast it to some interface. When both of these swf files are under the same domain everything works fine. But when they are under different domains I'm getting null after casting b.swf to the implemented interface IComponent. Both of these swfs are compiled with use-network=true and with the same IComponent.as.

[Code]...

View 5 Replies

ActionScript 2.0 :: Cross Domain XML Sockets?

Aug 11, 2009

I am currently building an XML Socket Server that I am running locally on my computer. My flash client I build as an executable that runs on your computer and connects to mine via port 9000. I want however, to be able to run the flash client as a .swf in a web page on my website. I have a security policy but I don't know if I am using it right. My server is extremely basic still, it has no admin controls or even authentication or anything, right now it just spits back what it is given essentially, while I test out things and stuff. I just don't know how to handle any cross browser stuff.

********************************************All my code works as is if the flash file is compiled as a .exe from any computer. I have tested that. It just doesn't work as a .swf in a web browser.********************************************The file currently is set to just have the user type in their name and then when they move their mouse, it shows up on all other clients with their names next it it. Basically testing a real time activity updates.Here is my code and other files:My config.xml file:

HTML Code:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<config>

[code]......

View 4 Replies

ActionScript 2.0 :: XML Cross-domain Loading

Dec 6, 2010

I'm making a flash-based website which would use some information from a separate domain to update its contents. The XML file (document.xml) rests under one domain (let's call it updater2.net), while the core site rests under another (e.g., coredommain.net). I looked at some literature and I picked the simpliest method utilizing this small .php file (called loadXML.php here) and the A/S excerpt:

[Code].....

View 4 Replies

ActionScript 3.0 :: Cross Domain Policy?

Dec 12, 2010

does the cross domain policy has to be in the root of the website or can it be in any subdirectoy from which we wish to load images form another domain?

View 0 Replies

ActionScript 3.0 :: Bypass The Cross Domain Xml?

May 1, 2011

What my swf (on [URL]) need to do, is that POSTing some php values from [URL] (paid hosting) to a file on [URL] (free hosting) and get the 100% of the html response. I've started this project in AS2 but I couldn't find a function that get the source of a website, so I recreate the project in AS3 with URLRequest and URLLoader. Everything went fine, I've finished the project, uploaded the file, and there comes the cross domain problem. I can't upload/modify any file on [URL] because I can only add pages/posts (like a blog). I've read at least 20 forums about this, but can't find the solution.

I know (from the manual) that in later versions of flash and/or AS, the swf file asked the user for permission (like now for the webcam). Is there a way to do this in as3 or any way to bypass the need of the crossdomain xml file? If no, what is that older flash version that can do this permission request or that don't need that xml, (but still can post to php files and get the whole response).

The other problem is that I cant use a php file on [URL] like a proxy between the sites, because this thing I want to access on mysite2 is IP address dependent, so each different user of the flash file has to be "tracked" different. (like a visitor counter - if each user of the swf access mysite2 through a php on th first site, they are tracked as 1 user (because they are tracked with mysite1 IP address))

View 0 Replies

ActionScript 2.0 :: Cross Domain Loading Of FLV's?

Oct 31, 2008

Alright, I was told that I need some sort of file on the domain hosting an FLV in order to load it from another domain. Is this true? If so, step by step, how would I go about loading this FLV if I were to say.... put it on newgrounds, and host the video myself. I've posted on the newgrounds forums, but that place is a joke.

View 1 Replies

Professional :: Cross Domain Retrieval Of Xml Data?

Jan 12, 2010

Question: How do I create the ability to load a xml file from another domain?
 
For example, I am creating an embeddable video player that will play on the domain which the xml file resides and also embedded on other sites. I am to the point where the video player completely works on the domain that the xml file resides and when I embed it on another domain, the .flv plays but the xml data will not pull.
 
FYI, I have complete access to the domain where the xml file resides.
 
Here are some snippets of security settings that I have been trying to get to work:
 
Code from Player:
System.security.loadPolicyFile(domain + "data/crossdomain.xml");
Code from "data/crossdomain.xml":
<?xml version="1.0"?>

[Code].....

View 2 Replies

Professional :: Cross-domain-policy Is Not Working?

May 18, 2010

I'm getting an error:

Error #2048: Security sandbox violation: http://www.m.com/p/bin-debug/main.swf cannot load data from http://rateservice.m.com/rateservice.svc/.

My cross domain file at http:[url]....

<?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="*.m.com"/></cross-domain-policy> 

using m as alias . how I'm gonna fix this as it should work. I done a firbug test and the cross domain is being found by lash in firebug

View 16 Replies

Flash Cross Domain Policy For Apache

Dec 23, 2009

I was looking around but couldn't find it where can I add the cross domain policy of Adobe in Apache server. Because without it, its not letting me access my XML on another server.

View 1 Replies

Cross Domain Requests : Javascript Vs Flash?

Jan 25, 2010

As you might know, browser's security model does not allow a script loaded in a page from http:[url]... to make cross-domain requests (no AJAX calls to any other domain other than url...).The Javascript file itself could have been served from a different domain altogether (url....) and that is irrelevant. This is the Same-Origin Policy.

Flash also has something similar? But does Flash treat the origin to be the HTML page where the .swf file was loaded or origin is the domain which served the .swf file?

So http:[url]... loads a .swf file from http:[url].... Now .swf can load resources only from [url].... or only [url....? I'm assuming there are no cross-domain.xml files setup on either [url]....

View 1 Replies

Java :: Cross Domain Calls From Web Browser

Jul 20, 2010

I would like to execute a cross domain http request from a website. Javascript is out, because most browser don't allow cross domain calls. Generally the solution is to use a proxy, but that isn't an option for this project. The other things I was thinking about would be to use Flash or maybe Java. Are there any other platforms that I could use?

View 4 Replies

Actionscript 3 :: Where To Put A Cross Domain Policy File

Sep 15, 2010

If I have my .swf files on "SERVER A" and they need to access my video files on "FMS SERVER B", on which server to I need to put a cross-domain policy file?

View 2 Replies

Ruby On Rails :: Using Flash And Cross Domain?

Nov 14, 2010

I'm running a rails3 project with an external asset host for all javascript, images, swfs etc. This is on a completely different domain. So know I tried to embed some SWFs using swfobject. In development (same host) everything works fine, but in production (different hosts) it doesn't start the flash (firebug shows the file is loaded but nothing appears on the page). I already put this crossdomain.xml file in the root of the asset host but it does not change anything at all.

<?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="*" />

[code]....

What can I do to make it work? The SWFs I'm using are not developed by me, so I cannot change them. Some are simple sounds, others are videos and small "apps". I don't want to have to make rails serve the swfs.

View 3 Replies

SWF - Flash Links Do Not Work Cross Domain

Apr 6, 2011

I have a flash accordion embedded using SWFObject. The SWF and related XML file are hosted on one domain. I have about 10 sites embedding this SWF from it's hosted location, both the SWF and the XML. The accordion links to various pages of my domains. The domain in which the SWF and XML file are hosted, the links work as expected. The other domains that the SWF is not hosted on, the links do not work at all. I verified it's a cross domain issue by placing the SWF and XML files locally on each domain and they worked, but this is not how I want it setup. I attempted to use crossdomain.xml and allow access from all hosts but that didn't work either.

View 1 Replies

ActionScript 2.0 :: Loading PHP File Cross-Domain

Nov 17, 2006

I have a project I am working on, but first I needed to test this. I have a SWF named "index.swf" (with a index.html), that is running on a rented server of mine. [URL].
-The SWF contains 2 layers.
-The first layer contains 2 dynamic textfields names "text1" and "text2".
-The second layer has some actionscript:

ActionScript Code:
stop();
var loadFile:LoadVars = new LoadVars();
loadFile.load [URL];
loadFile.onLoad = function(succes:Boolean){
text1.text = this.variable_me;
text2.text = succes;
}

The "test.php" is located on the second domain. This is the code written in it is:
PHP Code:
<?php echo "variable_me=works&";?>

So the SWF-file on the 1e domain has to load the php file from the second domain. But it doesn't work.
text1 displays: "undefined"
text2 displays: "false"

But if I call the php file in a regular browser (like this "[URL]") it displays:
variable_me=works&
My flash code isn't wrong, i have tested this local. My PHP file is OK.

View 5 Replies

ActionScript 3.0 :: Socket Cross Domain Policy

Jan 15, 2009

I have created a socket server on port 6666 because port 843 is in use on my mac.So when flash player request "policy-file-request" I return to it the cross domain xml, but I keep getting the security error that "cannot load data from".[code]As you see I receive the cross domain from the socket server.But I don't understand why flash player doesn't accept that?xmlsocket.connect("localhost", "6666");Does anybody have any idea why it throws that error "cannot load data from" ?

View 0 Replies

ActionScript 2.0 :: Cross Domain LoadSound Woes?

Jul 24, 2009

I'm trying to load an MP3 file from a different domain using loadSound while publishing from flash?

View 1 Replies

ActionScript 2.0 :: Cross Domain XML/image Loading?

Jan 17, 2011

I have a banner that loads in XML and an image. The banner.swf is on domain1, while the image and XML data is on domain2. I got the data.xml to load using a crossdomain.xml policy file to allow crossdomain loading of the data.xml. The only problem I have now is loading in the image. Locally it works fine, unless I don't have the swf and the image in the same directory. I guess the real question is, how do I load in an image with XML, if the swf and the image are not in the same directory. My code is underneath:

Code:
myXML = new XML();
myXML.ignoreWhite = true;
myXML.onLoad = loadXML;
myXML.load("mpu.xml");

[Code]......

View 5 Replies







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