AS3: Include as file please help!

Hi hope someone can help me with this.

Im trying to include a .as file, but I want the path to this file in order to have a variable.

public var folderpath:String = 'English '.

include "F:/folder" + folderpath + ' / file.as '.

is there a way to do this?

THX pavel

Understanding is a compile time, the directive does not allow actionscript (which runs after compilation) affects it.

However, you can use conditional compilation. I guess this makes sense when you have tons of files to different locations and wat to be able to switch between them.

You can set compile time constants in the publication settings-> ActionScript 3.0-> constant Config settings-> add as many as you want, in this case of the constants:

True config::English

Fake config::German

CONFIG::ENGLISH function init() { include "en/file.as"; }
CONFIG::GERMAN function init() { include "de/file.as"; }

init();

Result: ' in / file.as "gets included.

Conditional compilation allows you to define several definitions of function or class and with setting the Config constant, you get different results.

Tags: Adobe Animate

Similar Questions

  • I recently did a factory reset on my computer and saved all my files on a flash drive when I load them onto my computer, they look all as internet files explore instead of dreamweaver files, please, help?

    I recently did a factory reset on my computer and saved all my files on a flash drive when I load them onto my computer, they look all as internet files explore instead of dreamweaver files, please, help?

    They probably had the IE icon because Windows automatically associate with IE html files.

    It is of no consequence for your work in Dreamweaver, but you can change this association if you wish.

    Go to control panel > default of programs > set Associations.

  • All my icons are LNK files please help I am panic

    Basically, I recommended windows open a folder with a lnk file but when I made all my icons have been transformed into office lnk files and I couldn't open any of them please help I tried in safe mode, but the files are still the same

    This file association is more easily solved by using the system restore to roll back in time to before the beginning of the question.  There are some registry changes to correct, but I highly recommend the system restore instead.  You can open it by searching the restore in your Start menu.

    If it was useful, you can vote by clicking on the green triangle. If it solves the problem, click on propose as answer. Thank you!

  • I just bought the new Canon 50 mega pixel EOS 5DSR and Lightroom 5 isn't recoginizing than RAW files please help

    5 Lightroom is not recognizing that the RAW files from the Canon EOS 5DSR news can we some please help with this.  The files are good as they open in Adobe Bridge.  Thank you

    This camera was introduced after Lr 5 are obsolete.

    Camera Raw plugin | Supported devices

    You need Lr 6, or convert your CR2s in DNG with the DNG Coinverter program, which Lr 5 can read.

  • file please help

    Hi, I have photoshop cs5 for a few days was an error that my processor is not active... This made me to support on the web in adobe after that I went to my suggestions and I sow the scratch setting and also went to support Learn more
    I have 2 hard drives, divided into four partitions windows is C and did not then have 6 GB on it so I need more space...
    I have the scratch of H and G, but desselected the C program... I closed photosop then reopened, but then I got this error message:
    «Cannot open file because the file is locked or you have not the access necessary privileges.use the comand of properties in windows Explorer to open the file «»

    I have no idea how do and now I can open photoshop at all
    PLEASE help me if you ca
    Thank you
    Windows 7

    1. you must have full control permissions in the root folder of any disks you select to scratch them off.  Make sure that your specific user account has this level of access.

    2. you can get a prompt to allow you to change the disks scratch when Photoshop starts if you hold Ctrl-Alt immediately after starting Photoshop since its entry in the menu or shortcut.  You must be very quick and it may take several tries, but if you press the buttons in time you will get a pop-up dialog box that looks like this.  You can use it to change your selections.

    -Christmas

  • ActionScript does not not on the HTML of the file Please HELP

    Hello

    I made a Web site in flash, you can download everything here, because I need this problem fixed by Monday http://www.mediafire.com/?sharekey=e5d0b30598ff413aa0f2f20c509059d9e04e75f6e8ebb871

    The problem is, when I publish the file and run the file html, actionscript code does not work. When I run the project in flash, it works perfectly. I don't think that it is the player or anything of that kind that will not, even if I can't be sure. I tried this like 10 different computers, and neither was able to load the actionscript code. Does anyone know why the actionscript code would not work when I run the HTML of the site?

    Please help, thanks.

    you have a coding error: you cannot assign full-screen without user interaction (such as clicking on a button).

  • laptop 430 g1: do not read the DVD and displays only the files PLEASE help!

    Hey! I have a big problem.
    I bought a DVD player that should work for watching movies
    plug in properly and it should work without installation.

    When I put the DVD disc shows the only bunch of displayed files. I can't open these files, or watch them.

    I have three different programs should work to play the movie: KMPlayer, iTunes and Windows Media Player. Nothing works! Please, please, I need help!

    I had to fix it with this, I couldn't call HP support, they sent me back and forth... so I solved it myself!

    http://filehippo.com/download_klite_codec_pack/

  • When I receive e-mails with an attachment can not open, it says: Windows media player cannot access the file, Please HELP

    WHEN I RECEIVE AN EMAIL WITH AN ATTACHMENT I CAN'T OPEN IT. IT SAYS WINDOWS MEDIA PLAYER CANNOT ACCESS THE FILE.

    Help, please

    How this is related to Windows Update, John?

  • BlackBerry smartphone how to open BBM bak. file Please HELP!

    Help, please!

    I have a BB Bold 9900 and must open my backup files in urgent BBM!

    I can easily open the file history through Excel on my laptop, but I can't open the backup files, and it is these conversations that I need.

    The files appear like this for example...

    for example. BBM-(12-08-31-10-53).bak

    I also need to open the history files stored in Whatsapp, once again, I can't open these files.

    Any suggestion would be appreciated..!  Thank you!

    Hi pellosmith and welcome to the community of BlackBerry Support Forums!

    BBM and BlackBerry smartphone backup cannot be opened and read on your computer. These files are intended only to restore the BlackBerry smartphone or the application itself.

    Thank you.

  • Since yesterday I've been ask for connected my creative cloud, I clean my laptop and I lost the files please, help, that I wanted to be back

    Please I want to return my creative cloud, addressing students, which included Photoshop, Illustrator, In design, I thing is in aid of Design Software.please, I get paid and I don.t use for 2 months because I asked the communities

    and they do not at all help

    There could be a barrier of the language that makes your unclear situation and responses difficult to give.

    You want to reinstall your applications?

    Go to: http://www.adobe.com/

    Sign in with your Adobe ID

    Click on the desk top left

    Click the icon to the applications to be installed.

    Alternatively, go to: http://www.adobe.com/downloads.html

    Connect with your AdobeID.

    Click creative cloud.

    Click on the apps you want to install.

  • First cc only import audio .mov file, please help

    My friend sent me a .mov file, it has a mac, I have a PC, when I import it to the first cc, there is sound. I can see the video on VLC Player. I'm not very technical. Help, please! Any suggestions? Thank you

    If you're on a PC, you have installed QuickTime?

  • Hi im having a problem in the as3 sandbox security violation please help

    1 see this tutorial!

    http://www.thetechlabs.com/tutorials/XML/creating-a-weather-widget-with-XML-and-AS3/

    2 http://caspianseataxidrivers.centralbaku.com/

    It's my project

    when im test it in flash I have a flash work Hi see weather IT WORKS but when I put it on the server, it gives me error

    #2044 Error: Unhandled securityError:. text = Error #2048: security sandbox violation: http://caspianseataxidrivers.centralbaku.com/CSTD.swf Cannot load data from http://xoap.weather.com/weather/local/AJXX0001?cc= * & link = xoap & by = 1205344398 & key = 24e1d0074 9192bb2 & unit = m .

    to cstd_fla::MainTimeline/frame1()

    I use crossdomain.xml
    <? XML version = "1.0" encoding = "ISO-8859-1? >
    < cross-domain-policy >
    < allow-access-from domain = "caspianseataxidrivers.centralbaku.com" / > "
    < allow-access-from domain = "*. centralbaku.com" / >
    < allow-access-from domain = "xoap.weather.com" / > "
    " < allow-access-from domain =" http://XOAP.weather.com "/ > "
    < / cross-domain-policy >
    but it not WORK ANY IDEAS?
    Plese help

    Hello

    Looks like you are trying to access data from a domain (xoap.weather.com) to distance to a source (www.centralbaku.com) domain where your swf file, but you have the cross-domain policy file resides in the area of the source instead of having to your remote domain.

    that is when a client hosts content from a particular source domain and that the content makes requests directed to other his, the remote domain would need to host a cross-domain policy file that grants access to the domain of the source, which allows the customer to continue with the transaction.

    If this wont work until you get an appropriate cross domain attached to your domain (xoap.weather.com) remote

    There are other means such as the use of proxy script that can run a while.

    Thank you!

    PS: pls mark this message as answered if it helps

  • CS5 - cannot print single pages in tiled file - please help?

    When I go to print a document I have more to choose a range of pages to print in my files in mosaic.  "All" is selected and the "range" opion will not select.  I don't do anything different from what I did with the CS3 version.  Using Creative Suite with window 7.

    Help, please!

    Thank you

    Sometimes looks like they did it very hard when they actually made it easier for you.

    It's right in front of you, but because you don't expect it to be there you see.

    Screen Tile > tile range so simple!

    It numbers your tiles for you well and does not give you weird shape tiles. What do you think of this new feature?

  • Server-side include the question - please help

    I can't help side Server includes in Dreamweaver. When I use SSI to insert the header file, the document of the header appears on the page in Design view, but I can't click anything. The cursor turns into a "no sign" no matter where it is on the page. I don't see anything other than the document in the header, and I can not click out of it or any where else in design mode. When I test the entire document in a web browser, in fact, it seems to work perfectly. I see the header and other text on the page (unlike in dreamweaver, I don't see anything other than the header). Also in the Dreamweaver code view, php tags and the name of the included file are in red. This is the code for the test document:

    On Wednesday, March 7, 2007 04:02:29 + 0000 (UTC), "AngryCloud".
    wrote:

    >

    What the code looks like in header.php? Are there,
    andTags? It should not.

    Gary

  • equation of columns of values in the text file, please help

    I applied an equation to the to column values in a text file, thr is two columns; for every 10 values, I should get an output value, so a total of 5 values + 5 values for each of the two columns with values from 50.

    My vi don't wrk properly, the values are not justifiable, and I get only 5 values instead of 10 (5 for each of the 2 columns with 50 values)

    I have attached hv my vi, pls help.

    Of course, find NaN in there.  You are divided by 0.  Tip: The top 10 items are all 0.

Maybe you are looking for

  • iMovie - missing library

    Hello After that update MAC OS Sierra photo library in iMovie´Sidebar is no more see the. So I can't select all the pictures of the projects. I have fixed the photo library and after that the sidebar of iMovie displays the photo library, but without

  • I don't know what happened...

    I've unlocked my iphone and went to click on my whatsapp but it wouldn't work. I have blocked my phone and since then by clicking on the home button and the lock button, it does nothing. my phone is currently enabled, but I can't do anything. the scr

  • Mu06 notbook HP won't start

    My phone froze today so closed it and took out the battery. When I tried to restart the hp screen comes as usual, then a blue screen saying that your pc has faced a problem of windows made some error reports and will reboot my computer for me. After

  • Automatic Type define

    When you work with a call to reference, it must use a strict reference (so including the front panel objects). But the problem that I have made a strict reference. I need to choose the server VI class, navigate to the location of the VI and open the

  • LaserJet 1200 drivers

    Have a LaserJet 1200.  Tried to load the drivers with XP Pro OS and got the message that the current drivers can cause problems with XP Pro.  Tried to download the updated website of HP - without success - drivers received message 'page not available