ActionScript 2.0 :: Retrieving The File Path?
Mar 10, 2008
I am making flash mp3 player. I am using FileReference to browse for files. I won't get the file path and later realized that it is a security concern. But I tried using HTML.
I used ExternalInterface to trigger flash function from HTML which opens file selection box using FileReference.browse() option.So, as the flash file is in the HTML form, can i track the file path in HTML and send it to flash.
View 1 Replies
Similar Posts:
Jan 11, 2011
I have this Load Manager Package class file now for a while and I would like to make changes to it e.g. 1st step.How to read the Xml/Text file. The first part is the original code.[code]The second part is in a way how I would like to do the same as above, but loading/reading it from the 'applicationStorageDirectory'. I have left two lines in there which are not used just for testing things. The App works as is eliminating all Errors, but of course with nothing showing of the text file.[code]
View 2 Replies
Nov 1, 2008
here is the deal. I am retrieving some text from an xml file in AS3.0 and i'm having some problems.
for exemple(below) :
While showing the first 3 line... I ain't able to show the last lines...
View 2 Replies
Jun 12, 2007
Edit: By value i mean a number that is in my xml file.This is probably a very simple problem, but i've been working with this problem a few days now. I really suck at Actionscript, thats probably why.Well, I want to retrieve a value from a xml file and put it into a variable outside the onLoad function. Somehow i can trace movieIds inside the onLoad function but not outside it.Here is the code:
var playlist_xml = new XML();
playlist_xml.ignoreWhite = true;
playlist_xml.onLoad = function(success) {
[code]......
View 7 Replies
Jul 27, 2010
I have the following code on the main timeline. I have soundLoad_mc assigned to the SoundChgUrl class.soundLoad_mc.mp3URL = "climbing.mp3";soundLoad_mc.swfName = "journey.swf";The code below is from SoundChgUrl. The import to mp3URL works. The one to swfName does not - it throws "1119: Access of possibly undefined property swfName through a reference with static type classes:SoundChgUrl." This doesn't make sense to me.
package classes{ import flash.display.MovieClip; import flash.net.URLRequest; import flash.net.navigateToURL; import flash.events.Event; import flash.media.Sound; import
[code].....
View 2 Replies
Nov 9, 2008
I'm trying to read date variables from an external text file. I'm using the LoadVars method and it is working fine for regular string variables. I'm running into trouble trying to convert some of those strings into date variables so I can compare the current date to the targetDateX variable from the text file. I'm working on a countdown timer for a list of different times/dates. It will display the time left until the first event, then after that event the time left until the second event. I'm running the code in a for loop and everything is working except being able to convert the string with format (yyyy,mm,dd,hh,mm) into a date variable- I've attached a sample of where I'm having trouble.
View 1 Replies
Mar 7, 2009
I want to know the 'file path' when an user selects a file from 'any location' on his hard disk. I like to know is it possible to fetch the entire file URL instead of the file name alone?
Code:
var fileRef= new FileReference();
fileRef.addListener(mylistener);
mylistener.onOpen = function(file){
[Code]....
View 7 Replies
Mar 29, 2010
I am working with Flex, Flash, Action Script and I want to browse the local machine file system using Operating System's file browse window and select a file then i want to get the full path of the selected file. How can I do this?
View 3 Replies
Sep 14, 2009
I have managed to get it to open a file browser but all I can seem to get it to do is give me the NAME of the selected file *eg. selectedFile.name* I also need the path of the file as in C:examplefile.mp3.
The program I'm making plays an MP3 of your choice at a certain time, like an alarm clock. But I got tired of entering the file path of the MP3 EACH time so I wanted to have a browse feature.
View 1 Replies
Nov 17, 2010
I'm in flash cs3 project. I need to create a pdf file from an image path included into an xml file or if easy also in a written path as the code below:[code]
View 0 Replies
Jul 18, 2010
So I've created a script where a mc is clicked on and the player can draw a path using the mouse. I'm trying to figure out how I can get the mc to follow the path drawn out by the player's mouse and when the player clicks again, it erases all of the path.my code is below
Code:
import flash.display.Sprite;
import flash.events.MouseEvent;[code].....
View 14 Replies
Aug 23, 2008
How can I get the full file path of a file? I have this so far:
ActionScript Code:
var fileRefList:FileReferenceList = new FileReferenceList();
fileRefList.addEventListener(Event.SELECT, selectHandler);
browse.addEventListener(MouseEvent.CLICK, brwoser);
[Code]....
I can only get the file name and that pretty useless for an upload to a server. I will be using php to ftp it to my server.
View 9 Replies
Apr 10, 2011
I want to get the path of the file (in which the script is run), with out the file name.
how to do that?
at present i have the following code:
Code:
var filename1=flash.documents[0].name;
fl.trace("this file name >>> "+filename1);
var filePath = flash.documents[0].path; // getting doc path
fl.trace("File path "+filePath);
and i get the following in output window
HTML Code:
this file name >>> testing2.fla
File path E:Flash JSFL est2 esting2.fla
View 2 Replies
Dec 19, 2011
I have an actionscript file,it has a package name,it locate C:demo directory,like follows:
package demo{
import flash.display.*;
public class ABC extends Sprite{[code]............
Then I compile above code like following command,but it raise following error:
C:>mxmlc demoABC.as
Loading configuration file C:sdkframeworksflex-config.xml
C:demoABC.as: Error: A file found in a source-path must have the same package structure '', as the definition's package, 'demo'.Where is wrong above command?
View 1 Replies
Nov 11, 2010
Not sure if this is right?
// Setup our XML loader and tell it the file path to our XML file.// Also, add an event listener to call the loadComplete() function// when the loading of our XML file is complete.
var xmlURLLoader:URLLoader = new URLLoader();var xmlURLRequest:URLRequest = new URLRequest("loadImages.xml");xmlURLLoader.load(xmlURLRequest);
xmlURLLoader.addEventListener(Event.COMPLETE, loadComplete); function loadComplete(e:Event):void{ // Build new instance of XML object (imageList) and copy into // it the data from e.target which is the xml_loader object (which // contains the data loaded from our XML file). var imageList:XML = new XML(xmlURLLoader.data);
[Code]...
View 14 Replies
May 12, 2010
I'm not a flash dev, but I'm turning to it to try and meet a requirement. I'm to allow a user to select a file on their computer, then pass it to my web application. I know it's not possible to do this using Javascript, hence wanting to use flash.
View 2 Replies
Feb 27, 2006
how am I going to get the path of a file that I've selected with a FileReference.browse()? I can get the name and stuff, but how can I get the whole path?
View 3 Replies
Feb 2, 2010
I am trying to import an image path from a xml file. I can trace out the correct file name but I can't seem to load the file into the holder.I get this error:
Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.
I presume there's something else I need to add to the XML syntax.
Code:
// HOLDER:
var LoaderImagesMC:MovieClip = new MovieClip();
// LOADER:
[code]...
View 4 Replies
Aug 17, 2009
I would like to get the absolute path of my swf file from within Actionscript.[code]...
View 1 Replies
Mar 18, 2011
I am coding an AIR application.
I've got directly a path of a swf file (because it was stored in a xml file). Do yo know if it is possible to get the ByteArray from this file ?
I know that FileReference do that very well, but this class need a select event. But it isn't my case because I've allready got my path.
View 2 Replies
May 19, 2011
I'm using UILoaders to load different .swf files into the main .swf and am having a problem when I try to load a specific .swf file after a series of steps.I wanted to know if there was a way to see which is the current path that the application is in so that I can know if my relative paths are working or if I have to change them.I want to do something in the likes of this.path, or anything that works that way.
View 1 Replies
Mar 24, 2010
I'm trying to get a swf inside a swf to load xml data and I don't fully understand relative paths.I want to include all the necessary info.I have a main swf in my index.html page and a gallery.swf loaded into a container in the main swf, and I can't get the gallery.swf to load the xml data. See pic. I'm not sure if the path to XML file is wrong OR the paths to the image in the XML file are wrong.Here is the structure in the root:
root/index.html (contains main.swf)
root/flash/gallery.swf[code]....
I know the gallery swf IS loading into the main swf because for now I'm using the absolute path and I have typed "test" on the gallery stage and it shows up. (Once I get a grip on paths, I'll change the absolute path to a relative path, but for now, I need to reduce my variables for troubleshooting).I've think I've tried every path permutation for the load XML path inside the gallery swf:
ActionScript Code:
myXML.load("scripts/xml/gallery.xml");
myXML.load("./scripts/xml/gallery.xml");[code]....
I've also tried every permutation for the paths to the images, but unfortunately BOTH need to be right for the pics to show up!
Code:
<image image_small="gallery/thumbs/kirk_ross_01.jpg"
<image image_small="./gallery/thumbs/kirk_ross_01.jpg"[code].......
View 6 Replies
Jan 31, 2011
I have a swf that is in a different directory then the index. so I make sure that the xml has the proper relative path to the location of the index. which works fine for all the images that I load in.. simple enough right?but for some reason the NetStream seems to want to use the base url location as the location of the swf instead of the index.. to apply the relative url too..I have never seen this behavior before and was wondering if this is how its supposed to be..I already double checked my xml to make sure it was not doubling up the folder name..but basically the xml is like so..
<video src="foldername/videos/file.flv" />
but when i view it online. the browser is looking for the file here..
domain.com/content/foldername/foldername/videos/file.flv
[code].....
View 4 Replies
Mar 11, 2011
I have a code like this...
Code:
var _fileSelect:String = "";
OpenFile.onRelease = function(){
var fileRef:FileReference = new FileReference();
[Code]......
View 0 Replies
Jul 21, 2011
I plan to run my App off a thumb drive, and I need to be able to find the full filepath of my Flash app at run time, so I can then point to an xml folder on the hard drive. I need it to work on Windows or Mac, so it needs to find the full path of the running file, then append the "xml" folder onto the end.
View 10 Replies
Dec 4, 2007
Is there any way to get the file path of an object that is selected through the browse() method in the FileReference class. I don't think it can be done with a FileReference object, but is there another class that allows this, or any possible way to do this using XML?
View 4 Replies
Nov 21, 2008
I have an xml file that includes image paths.I'd like to read that image path from the xml and display theimage (a jpg or gif) on the stage.However, when I trace image_path from my xml file, the resultseems to knock off the "http:" part of the node.Also, when I load the image, the loader ends up being null(maybe this is because I didn't set up an event handler for it).
View 1 Replies
Nov 21, 2008
I have an xml file that includes image paths.
I'd like to read that image path from the xml and display the image (a jpg or gif) on the stage.
However, when I trace image_path from my xml file, the result seems to knock off the "http:" part of the node.
Also, when I load the image, the loader ends up being null (maybe this is because I didn't set up an event handler for it).
View 1 Replies
Feb 3, 2010
I am trying to build a .xml image scroller using the scroll pane component in CS4.I choose Actionscript3. Drag the component to the stage. Give it an instance name.Then I look for the Parameters that used to be in the properties panel in CS3. Not there anymore.I find that the Components Inspector has Parameters in there now.OK.I need to use ContentPath to tell the component where the .xml file is so it can find the images for the scroller.Can't find 'ContentPath'.How can I point the component to a .xml file?Is there a way of getting Parameters back in with properties - it was so much easier.
View 5 Replies
Apr 20, 2010
The package does not match the file path
View 4 Replies