ActionScript 2.0 :: Only Local XML Paths Work?
Oct 21, 2010Within my swf, I cannot access my xml files via an absolute path, only local paths work.
View 2 RepliesWithin my swf, I cannot access my xml files via an absolute path, only local paths work.
View 2 RepliesI have several SWFs that I need to work when loaded into another container SWF file as well as work when they are stand-alone SWF files. Because of this, in circumstances where a movieClip is being talked to from another MovieClip I am using _parent as opposed to _root. It has been working fine until now. I have one circumstance that only works with _root and will not work with _parent. _root.content_mc.anim_mc.screenShots_mc.gotoAndSto p(2); Obvously this works fine as a stand alone but not of course once loaded into the container movie.
View 5 RepliesI have a bunch of loadMovie() scripts in my flash files and everything loads fine when I open the flash files from my folder.Once I preview them online on my test server, the loadMovie() scripts no longer work. Has anyone encountered this? Does my paths need to change in order to view the flash files online?Right now, I have everything realitive to the flash file so:My main file is test.swf. that loads in fine in the website.But test.swf loads in test2.swf which is contained in a flash folder so my loadMovie script itloadMovie("flash/test2.swf", 2)
View 1 RepliesDoes anyone know if there is some kind of program that can convert the XML paths to Flash paths. Hmm...what I'm after is some little program that basically lets me open up an XML file, point on a node or attribute and the program will the flashpath to this node/attribute, where the path is something like: his.firstchild.childnode[2].attribute.jadajada
View 1 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.
i have the problem of local files of flash not working in any browser. to explain further i have html pages with headers in flash in my hard disk with links of the connecting pages. when i open such pages in any browser the links dont work. the page just stays as it is. when i click on the links only the state of the rollover changes when clicked on a link. the links when clicked dont go to the linked page. but when i upload these files to the server, they open and work perfectly in any browser.
View 8 RepliesMy AS3 makes a call to a php script and it works beautifully during testing. However, once I upload it to the web, it no longer works.
I am using absolute URL's, since my game exists in various places, such as facebook and my website. Here' s the code:
ActionScript Code:
public function checkMovements():void {
var urlLoader:URLLoader = new URLLoader();
urlLoader.addEventListener(Event.COMPLETE, checkMovements_Complete);
[Code].....
why a loadMovie("movie.swf", "_root.targetMC") would work on a local system, but when put onto a server (with EXACTLY the same file dir setup) would just lock up trying to transfer data? And I am talking about files that just contain one line of text, and nothing more. WTF?
View 2 RepliesI want to play a video, for it I decided to use a FLVPayback with a skin, and it works very well when I test it in Flash CS4, also when i called it from my server with the "network access" only preference. But when i embeded into a html... it plays the video but the skin does´t shows up.
here is my code:
package
{
import fl.video.FLVPlayback;
import flash.display.Sprite;
import flash.display.*;3
[Code].....
I have an HTML file which contains a Flash .FLV player; which then loads a given FLV video and plays it. The idea is all these files are stored locally on the PC as part of an application install, we use HTML/flash for the help/manual. On my PC it works fine but on a user's PC nothing is displayed. However if I host the exact same file-structure online and give them the URL, it works perfectly.
I am guessing this is a security issue of some sort but have no idea how to address it. The browser being used is actually a XULRunner app, i.e it's the FireFox 3 engine but not actually FF. Since my PC isa developer PC it's entirely possible I've done something in the past on another project that makes it work, rather than my PC being special in some way. For reference the HTML has the following in it - this is generated from some 3rd-party app:
[Code]...
I have an swf that needs to communicate with another. It just needs to pass 1 variable (a number) to the other. And the receiving swf will then act according to the number.
However, I noticed when I sometimes refresh the page, localConnection does not always work. When I'm clicking the sending swf, the receiving swf does not act...at all. As if nothing happened.
Is it a HTML problem? Ive selected Flash Player 7 for swfobject's parameters. Anyone have any solutions or possible alternatives to doing this?
Like I said, I just need to give the receiving swf ONE variable. And I dont want the sending one to write to a PHP file and receiving one to always load that PHP file for updates...thats not nifty enough.
I wanted to achieve some basic functionality
loadVariablesNum("http://www.mydomain.com/cgi-bin/myscript.pl?act=NewArticle","0",'POST")
My script myscript.pl is designed to return an appropriate varibale value to load into this flash movie so te remaining logic will work.
Now my problem is this WORKS in standalone flash movie but when I upload the movie to [URL] for example this does not work. I tried to put a relative path to my script, even that does not work. I want to make the movie Flash 5 compatible.
I have movieclip buttons that when you click on them take you to external url's
When I upload the files to a webserver then it works perfect. However when I try to run the files locally the movieclip buttons dont seem to work (when you click on them they dont take you to the required url).
The strange thing is that if I make one of the url's for example "C: est" then this appears to work when I test it localy but will not go to "www.google.com".
I have the fonts embedded (Yet it still prompts me saying missing fonts every time I open flash, but not the fonts that aren't resizing correctly)
I have a function that takes in a textfield, resizes the font to fit the text box, works fine on my local machine, does NOT work on other machines.
why this doesn't work? here is the function
function fontSizeChanger(dtb,myWidth)
{
dtb.embedFonts = true;
var myFormat:TextFormat = dtb.getTextFormat();
[Code].....
I am developing flash p2p chat. It works fine on my friends' computers (they can chat each other), but not on mine. The problem is that I have local network at home, and I think that Flash Player tries to make p2p requests to peers inside my local network.Can I check if user have local network in AS3 and up the level of network to the WWW?
View 1 Repliesthe flash4 published set of files, with a variety of skins tried, works well on the local drive, even when moved to a different folder structure. when index.html is opened on the remote web site, the browser (firefox3 and ie7) displays the player conrols and a rotating horizontal barber pole, green and black, but no flash video.some of the skins i've used are: SkinOverPlaySeekFullscreen.swf, nOverPlayStopSeekCaptionVol.swf and SkinUnderPlay.swf. all work locally but do not play the .flv file on the web site. no problem playing flv movies on the remote web site if the file set is created by dreamweaver.
View 8 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.
i am having a problem launching a local html file from my swf. i have a button called print that when clicked it is supposed to open the local html file and print out the content. this is the code i used on the button
on (release){
getURL("folder/folder/file.htm","_self");
}
[code].....
I have a SWF file located at the local network in the public shared folder that I do not control over trying to read the external file on the local network.
I am currently hitting instead an security violation
Error #2148: SWF file file://....mySWF.swf cannot access local resource file://...config.xml"
I've added the network path where SWF an XML file resides to "trusted locations" via Flash Player Global Settings.
The added network path is successfully displayed at the list of "trusted locations" within Global Settings Manager, but it does not look like Flash Player is able to really parse the local network path as a "trusted location"
FP 10.3.181.23, Win XP
I'm new and need to understand when we should specify paths to a movie clip, button etc and when we don't need to specify paths?
Can someone enlighten me on this?
I'm loading external jpgs into a swf movie. This works fine from the swf. The problem is when I embed it in the html. File Structure that I want:
movie.html
FolderB>
ImageFolder>image.jpg
movie.swf (path to the images is ImageFolder/image.jpg
When I run the movie.swf from within the directory, it runs fine. However, when I embed it in the movie.html it doesn't run. Question: Are paths from the swf relative to the PAGE that the swf is contained in vs the swf itself? Hope that makes sense.
I need to clarify some issues in my mind about paths to duplicates b/c while I thought I understood them well enough, I am not obtaining the desired results when working with them. In the below examples, I'm gonna leave out as much extra AS as possible and all of the main MCs are on the _root level.
[code]...
where the bombHitArea MC is only in the first frame within "bombMC" so that as soon as it hits, it advances to a label where the hit area is not present and that hitTest cannot = true, so the whole thing can only play once per hit. When the bullet dups hit the bomb dups, each bomb should explode individually, correct?
I want to have a script that goes something along like this.. I have a moveclip on the stage. and in it.. i have a variable "variable1 = true".
the movieclip would be named "clip1"..
if it were on the maintimeline..I would reference it like this..
PHP Code:
trace(_root.clip1.variable1)
and it would work.. and it'll trace me true..
however.. what i want to do is.. because the "clip1" won't always be on the maintimeline.. maybe if it were in another movieclip called "clip1234"..
i wanted to create something like this.
PHP Code:
path = "_root.clip1234";trace([path].clip1.variable1)
so.. like this.. i can easily just change the "path" variable and it'll always know where to look for the variable..
i have a main page that loads a swf of an xml photogallery onto the main stage. I used the classpath in actionscript settings to target the actionscript files and xml data. So far, everything works well. Now, a button on the stage unloads this swf and then loads a second photogallery. The problem is that when it appears, it contains the same data (images) as the first photogallery. This is because it is using the same classpath as the first gallery. My question is how can i assign each gallery its own class path. It seems that only one can be selected at a time.
View 3 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 have a main page that loads a swf of an xml photogallery onto the main stage. I used the classpath in actionscript settings to target the actionscript files and xml data. So far, everything works well.Now, a button on the stage unloads this swf and then loads a second photogallery. The problem is that when it appears, it contains the same data (images) as the first photogallery. This is because it is using the same classpath as the first gallery. My question is how can i assign each gallery its own class path. It seems that only one can be selected at a time.
View 1 RepliesI simply want to put a movie on my website. I have other flash movies on my site that work fine. I import the video for progressive view. Publish the .fla. I get a .swf and an .html. I upload the files to my website and NOTHING! I check them locally and they work fine. Then I publish them again and they no longer work locally.
Flash 8 publishes them by default to my desktop. But if I use the default paths in CS4 the files don't even publish...they are nowhere to be found even with a search of my HD. I took html code from my site that was working and just changed the .swf file name. that didn't work either.
[Code].....
I'm new to Flash and have a question. I'm creating a Helium atom for my technology class and am trying to get 2 electrons to circle the nucleus. I've successfully created a classic motion path where one electron circles the nucleus. How do I create another (duplicate) motion path for the other.
View 3 RepliesI need to know how I can parse a variable path in Flex 3 & e4X. For example, I have two XML strings where the name of one element is the only difference.
[Code]...
I am working on a project that uses PHP, AS3, and AMFPHP. The project allows users to upload and download images among other things. Since I am fairly new to PHP/FLash security I have been trying to gather as much info about making things as secure as possible. I've got some good advise about using .htaccess files, and a few other tricks.
My main question at the moment is how to hide the "path" info from and to the PHP / assets / and to and from the AMFPHP services ... Currently I have all the paths hard-coded in one .as that returns an object with the paths to any of the other classes that need/request it. I found this method to work well since I only need to change this one .AS , and it will branch out to the other classes that need it.