Using flash file name reference

Hi all!
I want to use file's own name in the actionscript written in
flash. For example! I made a file namely myfile.fla, it will
compile to myfile.swf, I want to use this name dynamically in
actionscript written in the flash. Can anyone help me in this
regard? Though its a very childish question!

Hi kamboh,
It does not matter that question is hard or easy. Its better
to ask i think. anyway you can have your file name as follows:
var sFileName = this._url;
var extractedFileName = sFileName.split("/");
//reassign
var sFileNameWithExtension =
extractedFileName[extractedFileName.length-1];
var sFileName =
extractedFileName[extractedFileName.length-1].split(".")[0];
trace("sFileNameWithExtension " + sFileNameWithExtension)
trace("sFileName " + sFileName)
Enjoy! :-)

Similar Messages

  • Search using partial file name?

    I know this issue has been addressed before, but I haven't found a satisfactory answer.
    I use the Search field in the toolbar to search for files on my external drive. That external drive contains a file named "housefly.psd." When I search for "house" using the File Name filter and with columns set to Kind, all the Photoshop files that begin with "house" appear at the top of the window, including the file I'm searching for.
    But if I search for "fly," the "housefly.psd" file doesn't appear in the list at all, although files containing the word "fly" with a space before the word show up in the list (e.g. - "big fly.psd").
    Users aren't always going to remember the initial characters in a file name they want to find. So how do I find the file if I only remember some of the internal characters?
    Thanks,
    Andy
    iMac, OS 10.6.8

    Andy Tubbesing wrote:
    if I search for "fly," the "housefly.psd" file doesn't appear in the list at all, although files containing the word "fly" with a space before the word show up in the list (e.g. - "big fly.psd").
    Yeah, isn't Spotlight great?! Give this example to all the experts who gush about Spotlight.
    What you see is how Spotlight was designed to work -- at least for hoi polloi like us. The query looks for words, not strings. "Fly" is one word, "big fly" is two words, but "housefly" is one word. It contains the string "fly", but not the word "fly". Now, if you had had the foresight and forethought to name your file "HouseFly", then probably Spotlight would have found it, "Fly", unlike "fly" being, by the rules of the Apple wallahs, a word, not a string. Is that all? No, of course not, that would have been too simple. Spotlight also has hidden somewhere a private list of exceptions. So "books" in "Audiobooks" is always a word, no matter how capitalised; but in "Cookbooks" it's just a mere string, and hence not worthy of notice.
    How do you get around this (without using Terminal)?
    (1) One way is to construct a query, as already suggested, with the Filename and Contains. But, beware! if you're searching in Finder, and you've already entered a string in the Spotlight search field on the toolbar, the query constructed thus will be restricted to the hits of the query already in the search field. So, if you've enter "fly" in the window toolbar search field, and then construct a Filename Contains "fly" query, you'll find nothing, because any subset of the ∅ (empty set) is also empty. This restriction applies to any query thus constructed.
    (2) If you are a real, hair-chested, red-blooded Mac user, you don't use namby-pamby Filename queries. You go straight for the jugular. In the pop-up menu, instead of "Filename", choose "Other...". Then scroll through the interminable list to "Raw Query" and enable it. Then type in the Raw Query search box
    kMDItemFSName == *fly*
    Note 1: "*fly*", not "*fly", because the Item's File System Name is "housefly.psd".
    Note 2: You can use the keyword "name" in the window toolbar Spotlight search field, thus
    name:housefly
    However, this one doesn't take wildcards.
    (3) If you happen to be just a normal person, who uses a computer to be productive and not to exercise one's fingers by typing lengthy and abstruse keywords (or as a Rorschach test to have fun divining the inscrutable minds of Apple engineers), then my suggestion is to give Spotlight the widest possible berth and use something else. I suggest Find File by John R Chang, Find Any File by Thomas Tempelmann, and EasyFind by Christian Grünenberg.

  • How do I get files from multiple DVDs that are using thesame file names?

    How do I get files from multiple DVDs that are using thesame file names? Message says "file already exists in catalog"
    Message was edited by: marcr56

    marcr56
    I am viewing your question from different perspective, that is, the issue that you face when you are ripping VOBs from a second DVD-VIDEO on DVD disc using Premiere Elements,
    It is best to give the Premiere Elements version and computer operating system that it is running on. In the absence of that, I will generalize.
    Assuming that you are using
    Premiere Elements 12
    Add Media
    "DVD Camera or Computer Drive"
    Video Importer
    Typically the Video Importer Save In: is C:\Users\Owner\Videos
    Each of your DVD discs is going to have the same names for the ripped VOBs (VTS_01_1.VOB and so on depending on the duration of the movie). Consequently, after the ripping of the first DVD's VOBs and their save to Videos, you will end up with that "files already existing..." block for the ripping of the VOBs from the second DVD.
    The answer is, for each DVD disc VOB ripping, to plan ahead and create and set for different folders in Videos in the Save In field of the Video Importer.
    Please review and then let us know if that works for you. Please do not hesitate to ask if you need clarification on anything that I have written.
    Thank you.
    ATR.

  • Automatically using a file name as a caption in Adobe Photoshop Elements 8

    Hello!
    I am trying to import a group of photos that have file names which describe the photo. Is there a way for PSE to automatically caption imported images using the file name as a caption?

    Buy PSE9 or wait another month or two and buy PSE10 when it comes out.

  • Creating Map IDs using HTM File Name

    Is it possible to create Map IDs using the File name of the HTM, instead of its Topic Title?

    While Generating Map IDs, we get an ID along with a Map # for each HTM in the CSH.
    For Example, I have a HTM in my CSH with the following Details:
    Topic Title - Access Masks
    File Name - admpr00001.htm
    Now when I create a Map ID for this page. I can customise the Map ID by setting any/all of the three options: - 'Prefix Map IDs with', 'Make Uppercase' and 'Start Numbering with'. But the Map ID is generated only based on the Topic Title.
    Like - ebACCESS_MASKS 1000   where, eb is the set prefix.
    Is it possible for me to create a MAP ID using the File Name. In this case, as ebadmpr00001 1000?
    Hope I am clear .

  • Custom metadata fields used in file name?

    Hi,
    Is it possible to add to the list of meta data fields that are used as tokens for file names?
    I've been using Rob Cole's excellent custom meta data in the library module and now I want to use these fields to name the file during export...
    While at it, is it possible to add the same custom meta data fields to the info view overlay in develop mode?
    Cheers,
    Bonny

    1.  Its possible an export filter (post-process action) could be defined that supports the custom metadata for export filenaming (Lightroom itself does not have any other hooks I'm aware of) - dunno if anyone's done that, yet.
    2.  I think not (see PM).
    Rob

  • Can I script the changing of creation date, using the file name?

    Normally people are doing this in reverse, but let me paint the picture.
    I pulled 204 video files from an old HDD based JVC camera.  JVC records in .MOD format which iPhoto won't import.  I imported them into iMovie just fine, and iMovie even set the file name to clip-2007-11-04 04;42;29.mov which is great, but it now has a new creation date of whatever date I imported it.  Which then causes problem when I want the videos stored in iPhoto and sorted appropriately by creation date.
    I've used the application "A Better Finder Attributes 5" to individually edit the creation and modify, but I'm sure I don't want to do this 203 more times, as you can't just type in the date and time, you have to type in each part of the date/time, or select it on a calendar.
    I've used the application "Name Changer" to batch convert the file names to the format YYYYMMDDhhmm which would be helpful if I were going to use the terminal command touch -t, but again I don't want to have to type it in 203 more times, plus drag and drop the file into finder to populate the location.
    Now, if I were more handy with automator, or maybe some (any) scripting language this would be easy peasy.  I'd batch rename all the files to the YYYYMMDDhhmm.mov and then have a script that just took the file name, passed that to touch -t along with the file location, and a few seconds later, they would all be done!
    Anybody have any suggestions to how I can do this, and tips to what commands to use or ANY advice?  I'm more than happy to RTFM, but I have no idea which manual to read!
    Thanks

    If your file names are precisely as you have written, this script will do what you want.
    Copy the script into an AppleScript Editor document, select one or more files in a Finder window, return to the AS Editor and press Run.  Note: you will need to provide your password when the script runs.
    Make sure you have a backup of any files you are working on (try using duplicates first, perhaps). The script has no error handling.
    tell application "Finder"
              set FileList to selection
              repeat with theFile in FileList
                        set fileName to name of theFile
                        set filePath to quoted form of (POSIX path of (theFile as alias))
                        set crYear to text 6 thru 9 of fileName
                        set crMonth to text 11 thru 12 of fileName
                        set crDay to text 14 thru 15 of fileName
                        set crHour to text 17 thru 18 of fileName
                        set crMins to text 20 thru 21 of fileName
                        set crDate to crYear & crMonth & crDay & crHour & crMins
                        set shellString to "touch -t " & crDate & " " & filePath
      do shell script shellString with administrator privileges
              end repeat
    end tell

  • Save each page of a multi-page document as a separate file using spawned file names with javascript

    Hello
    We are currently changing our hard-copy personnel files and converting them to pdf files.  We have scanned the entire file into one multi-page document.
    I am wanting to save each page (or groups of pages) as separate files.
    In order to facilitate this, I have duplicated field names--such as FirstName, LastName, EmpNo on each page.  This information should be static for the entire file.
    However--I also need information that will change for each individual "page" or document--such as TypeOfDoc, Date, etc.  I have used the Spawn fields using the overlay method on each of the pages in the document.  Then I went in and filled in the information for each page of the document--such as TypeOfDoc, DateOfDoc.
    Now I want to save each page of the document as a separate file using the field names as the file name.
    I first created an action that would split all the pages into separate files and save them into a folder.
    Then I want to save each file as a specific file name based on the information in the fields.
    My problem is obtaining the name of the spawned field name.  The rest of the field names I am not having a problem with.
    This is what I have so far to name the file.
    // Get the field value
    var oPage = this.pageNum;
    var fn = getField("P" + oPage + ".TEMPLATE.DateOfDoc").valueAsString + getField("FirstName").valueAsString + "-" + getField("LastName").valueAsString;
    // Specify the folder
    var fldr = "/n/Personnel/ScannedDocuments/NAMEDPAAS/";
    // Determine the full path
    var fp = fldr + fn +".pdf";
    // Save the file
    myTrustedSpecialTaskFunc(this, fp);
    This code is also accompanied with folder level scripts.
    My problem is obtaining the name of the spawned fields using javascript.  Each document has several pages--so I would like to obtain the field name through script.
    I receive the following error.
    TypeError: getField("P" + oPage + ".TEMPLATE.DATE") is null
    I think this is due to the fact that I have extracted all the pages as individual files.
    If I were to do the above, but not extract the pages first--I do not know how to just save one page at a time.
    Please help.  This is a massive project, and if we have to save each file individually, it will take a lot of time.
    I am a beginner, so any assistance is appreciated.
    Thank you

    I am not understanding exactly where to put the curly brackets.  I have tried two different ways, and still get the same error.
    This is one way
    var oPage = this.pageNum;
    // Specify the folder
    var fldr = "/n/Personnel/ScannedDocuments/NAMEDPAAS/";
    // Determine the full path
    var fp = fldr + fn +".pdf";
    for (var i = 0; i < this.numPages; i++) 
    var fn = getField("P" + oPage + ".template.DateOfDoc").valueAsString + getField("FirstName").valueAsString + "-" + getField("LastName").valueAsString;
    {this.extractPages({  
    nStart: i,  
    cPath : fldr + fn + ".pdf"
    The other is this
    var oPage = this.pageNum;
    // Specify the folder
    var fldr = "/n/Personnel/ScannedDocuments/NAMEDPAAS/";
    // Determine the full path
    var fp = fldr + fn +".pdf";
    for (var i = 0; i < this.numPages; i++) 
    var fn = getField("P" + oPage + ".template.DateOfDoc").valueAsString + getField("FirstName").valueAsString + "-" + getField("LastName").valueAsString;
    this.extractPages({  
    nStart: i,  
    cPath : fldr + fn + ".pdf"
    Thank you for your help.

  • How to get data by using only file name in XI

    Dear All.
           I have 2 senarios . How can I configure it in the Configuration?
    1. get data from file name (xxx.txt) --> HTTP
    2. convert data into text file            --> File
    Thak you in advance.
    Au

    dnt think so?, using a webpage to send the file to XI, you will sending data again to XI as a file, pls tell what is the puropose of using the webpage to copy file?
    is this webpage only used to move the file from one loaction to other from which the XI can acess?
    to which location this file is placed? if XI reads this file from somelocation then you do as relied in above use filesender adapter and do FCC then.....

  • Ipad only uses one file name when uploading images via email

    We have an image tool that uploads images to a template website. The problem is the file names for these images must be unique any duplicate file names will be rejected. Some of our users want to be able to upload from the field but Ipad only assigns the file name "photo.JPG" to jpegs. It doesn't seem to include the sequential extension that actually does exist for the image on the file name when uploading. Is there a way to get ipad to do so, or is this something that Apple maybe want to consider looking into. I can easily see the average Joe emailing themselves images and hitting save only to replace and lose an older image because let's face it, not all users are on MACs and PC's do not allow multiple files to have the same file name in the same folder.

    Hi,
    Based on the description, you could send email to external addresses without the Twin Oaks software. However, with the Twin Oaks software, you couldn't send successfully.
    For this issue, I recommend you enable message tracking and check whether you could retrieve message tracking log entires when you send emails to external addresses through the Twin Oaks software.
    If you couldn't retrieve message these tracking log entires when you send emails to external addresses through the Twin Oaks software, it means that the Exchange server is OK and the crux of the problem is the Twin Oaks software.
    Here is an article about message tracking log for your reference.
    Get-MessageTrackingLog
    http://technet.microsoft.com/en-us/library/aa997573(v=exchg.141).aspx
    Best regards,
    Belinda
    Belinda Ma
    TechNet Community Support

  • Import tables using same file name for all tables

    hi,
    We are using oracle 11.2.0.3.0, we have taken export of multiple tables in schema, unfortunately in exp command we have mention same file name for all the tables, now it has created one file for all export but the size of that file shows that all the tables included in it , when we try to import the tables only last table mention in export command is imported for other tables it hangs, example of code show below.
    Is there any way to import the remaining tables.
    exp system file =exp05042013.dmp tables=gr.table1
    exp system file =exp05042013.dmp tables=gr.table2
    exp system file =exp05042013.dmp tables=gr.table3

    Hi,
    You can use as :
    exp username@database tables=table1,table2 file=tabledata.dmpDid you have any RMAN full backup?
    Why you are not recover crash database?
    Mahir

  • Using Flash files

    I made an animation in Flash and want to import it into DVD SP. I tried to make a QT movie and exporting it into DVD SP but it came out looking interlaced and muddy. Is there a proper way to do this?
    thanks,
    c.

    What version of Flash are you using? did you import a qt into your flash porject or create graphics in flash? I believe version 7 and earlier uses a sorenson codec that's not great especially with disolves and soft backgrounds. also what is the resolution of your flash file?
    third, consider this. if you imported a qt into your flash, exported the flash to qt, converted it to a mpeg2 for dvdsp andthen burnt it, that a lot of compressions---the quality of you mpeg2 rely's significantly on the quality of your origional material. --the less the bit rate you start with, the less information compressor has to re compress it-it will degrade quickly with low qualty origional material.
    Final note -- you mentioned interlaced-looking video---my guess is it is the sorenson compression that does the most damage to quality.
    Hope this helps!
    Jason

  • Using Flash files in Keynote

    Ive started working with keynote and want to add some flash files to the presentation. I read that keynote supports importing of flash files.. but new to flash..and how it all works.
    I found a website.. istockphoto.com that you can download some cool flash animations etc... it says that i must have macromedia flash or compatible program to edit the file.. i dont want to edit.. just want to use the royalty free flash file animation in my keynote presentation. When i download it. it appears as a blank sheet icon on my desktop with a flash extention, and if i try to drag it to my keynote presentation.. there is nothing.. does nothing...
    Frustrated since there are some cool flash file animations to download that would be great in a presnetation.. but im clueless on what im doing if im doing it rigth.. have the right software etc. and all i want to do is download the file and use it.. as is.. not editing etc.
    any suggestions??? help!!!!!

    Your problem isn't with Keynote, it's with QuickTime. Keynote only supports media that QuickTime supports. If it doesn't play in the QuickTime player, it won't play in Keynote...but here's the part you won't like...QuickTime only supports Flash 5 or older, so my guess is that those files you have use a newer version.

  • How to use flash file in webdynpro

    Dear all mentors,
    I am developing a project for travel management, and wanted that header of webdnypro page will have flash file like wise we develope project in PHP where header of website is of flash flie, same thing i wanted in webdynpro, i am bigner for webdynpro, help me out plz?
    Regards.
    Gyanendra.
    Moderator message: please have a look in the dedicated "Web Dynpro ABAP" forum.
    Edited by: Thomas Zloch on Jan 13, 2011 5:58 PM

    Hi,
    Check this,
    /message/205009#205009 [original link is broken]
    Write that subcribe in the doinit method and handle the event in the action handler
    Check also this
    webdyn iviews and portal eventing:WebDynpro iViews and Portal Eventing
    /message/554249#554249 [original link is broken]
    Communication between 2 IViews on 2 different Pages
    Regards,
    Vijayakhanna Raman
    Message was edited by: Vijayakhanna Raman

  • How to overwrite source files, or use source file names?

    Hi all
    I would like AME (5.5.1.12, under Windows 7) to overwrite the source files that it is encoding, or if that's not possible, save the exported files to a different folder with the same file names as the sources.
    However I can see no way to do this without manually specifying a file name for every file. I need to process 400 files so this is not practical.
    Currently AME automatically adds a "-1" suffix to the exported file name, whether it's saved in the same folder as the source or a different folder.
    Can anyone advise, please?

    Hi Jim,
    Thanks for the reply. However, overwriting source files during a batch process is a common feature in audio/video software. It's possible in Audition, for instance, as well as in third-party programs such as Sound Forge, Wavelab and Samplitude.
    Presumably in these cases the software writes to a temporary file, either in RAM or on the hard drive, before deleting the original and replacing it with the new one.
    I'm surprised to hear that AME can't do this for conversions that stay within the same file format (such as the bit depth of a wave file).

Maybe you are looking for

  • Need to determine plant and storaeg location for item in delivery

    Hello All, I have an inbound IDOC which changes the quantity of items in a delivery and also adds new items if necessary. I need to do a auto PGI also if required. Am using BDC to update the delivery. Now the problem is when I add a new item to the d

  • Why is my macbook slow?

    Why is my macbook running so slow?  I ran a EtreCheck, but not sure what it means or how to read it.  Can anyone help me? EtreCheck version: 2.1.8 (121) Report generated March 19, 2015 at 10:23:38 AM EDT Download EtreCheck from http://etresoft.com/et

  • What is my serial number. the original version?

    what is my serial number?  The original version? the most recent upgrade?  for photoshop.

  • External HD won't mount -Mercury Elite

    Hi - I have a unibody 15" MBPro. It has only one Firewire800 port on it and I'm inquiring at this forum to hear about anyone else having problems with that port not working with a particular device. Over the years I have collected 7 external drives -

  • Problem in sap business connector installation

    Hi, I have gone through installation guide ,but in it nothing was mentioned about c:\sapbc47\server\bin\runserver.bat file.Please help me to solve this problem.