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).
Im working on this project where I get a stream and eventually a bitmap from a webcam. Right now I'm kind of stuck trying to crop a subset from theis bitmap along a path of x,y coordinates. The path will always contain four corners, but these are not necessarily 90 degrees, so It is usually a somewhat skewed square. what classes to use for a custom crop ( not really keen to make one fresh)
The solution should be straight forward but I cannot find it, my problem it's that I'm reading a xml, and one of the properties inside the xml it's a Bitmap path(string), when I`m reading this xml I would like to convert this string to a Bitmap Obj so I can use through my MXMLs.
i have a child mc with a loadVars event that gets some text from a file and loads it into a text box.the parent mc is called about_uswhat i want to do is tell loadVars to look for a file of the same name as the parent clip (instead of hard-coding the name - so i can reuse it in other clips in the same project)this is what i have at the moment:// load datamyData.load("myFile.txt");
I'm trying to trace the path of an object by using setPixel on the object's position every frame in a BitmapData/Bitmap pairing. These pixels aren't showing up normally and I suspect I have a fundamental misunderstanding of the BitmapData class. Here's what I'm doing:
public var contrailBase:BitmapData; public var contrail:Bitmap; private var contrailColor:uint;[code].....
Using this code, the red pixels don't show up. If I initialize contrailBase to 0xFF000000 instead then I get a black screen on which the red pixels DO draw, but I need the bitmap to be transparent except for the contrail. What am I doing wrong?
So basically i have a bunch of movie clips which have instance names that i am pushing to an array and then that array is printed to a dynamic text field that displays the list of the movie clips. The issue is, i want this list to look presentable and since instance names cant take spaces only underscores then it looks so un-presentable
ActionScript Code: import flash.text.TextField; //Array to hold the target instances, the drop instances,
I have a movieclip that calls an array, but I want that array to be output on multiple lines in the movie. How do I break up an array in such a way that it is output with the equivalent of line breaks?
[Code].....
When the movieclip pulls in the chunks of that array it sticks them all on one line. Is it possible to include some element in the code above to split the elements of the array onto multiple lines when it's output? Is there an equivalent to perl's "/n" which prints a line break, for example? I'd prefer that option than having to create multiple arrays and reengineer the entire function.
I have a movieclip that calls an array, but I want that array to be output on multiple lines in the movie. How do I break up an array in such a way that it is output with the equivalent of line breaks?
for example, if an array is defined like this: [AS] phrase = new Array(); thewords="this is line 1 text, this is line 2 text, but it's all going to be on the same line"; phrase=thewords.split(','); [/AS]
When the movieclip pulls in the chunks of that array it sticks them all on one line. Is it possible to include some element in the code above to split the elements of the array onto multiple lines when it's output? Is there an equivalent to perl's "/n" which prints a line break, for example? I'd prefer that option than having to create multiple arrays and reengineer the entire function. Thanks.
here's what I have - a custom video player that pulls everything from an XML doc. In that XML doc, I have three sections that contain start, middle, and end times (in seconds) for the video. The goal is to track how many times the start, mid point, and end of the video are reached.
This all works, however I'm encountering a strange action. When I play the movie, I get output that the start point has been hit, then I get three (3) duplicate outputs of the mid point getting triggered, and finally six (6) reports of the end point hit.Strange. The numbers change slightly, (1,3,6 and 2,4,10, and 1,4,8) times for each of the start/mid/end triggers.
Here's the code that I'm using:
("prefs.prefOmnitureStart", "prefs.prefOmnitureMiddle", and "prefs.prefOmnitureEnd" are the numbers in seconds that are pulled from the xml. In my example, they're 2.0, 6.0, and 10.0)
Code:
myVideo.addEventListener(MetadataEvent.CUE_POINT, cp_listener); function cp_listener(eventObject:MetadataEvent):void { myVideo.addASCuePoint(prefs.prefOmnitureStart, "sendOmnitureStart");
The trace function in this file doesn't output all of the keycodes on my keyboard. Some letters generate a keycode and others don't. For instance, "u" outputs 85 but "i" outputs nothing.
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]....
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?
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.
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]
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
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?
// 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);
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.
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?
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:
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.
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:
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:
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