Can I have unique function and variable names with createjs when publsihing from Flash?

Hey everyone!
I have recently started using the Toolkit for CreateJS exporter for turning small button icon animations, made in Flash, into content for HTML5. I have created 3 seperate icon '.fla' files that animate when rolled over.
With this example tag added into my html5 document, the animation works fine:
<canvas id="about_btn" width="85" height="70" style="background-color:#FFF"></canvas>
However, once I have added more than one canvas tags, only one icon would appear on screen:
<canvas id="about_btn" width="85" height="70" style="background-color:#FFF"></canvas>
<canvas id="news_btn" width="85" height="70" style="background-color:#FFF"></canvas>
<canvas id="contact_btn" width="85" height="70" style="background-color:#FFF"></canvas>
I found out that the JavaScript files that were generated with each '.fla' file were conflicting because they were all using the same variable and function names (ex. stage, canvas, init(), etc.). Is there a way for me to publish the JavaScript from Flash with document specific variable and function names? (ex. about_stage, about_canvas, about_init())
A work around methood that I can currently using is putting each <canvas> tag into it's own iFrame.
Thanks again for the help!
-DJ

The JS asset libraries should not conflict with each other, unless there are symbols with the same names. Even then, you can change the Symbols namespace for each FLA to prevent collisions.
It sounds like you're trying to copy/paste the code out of the preview HTML. It's not really designed for this, and it will lead to name collisions. You'll either want to rewrite this logic in your own HTML (using the preview code as a reference), or rename the variables as appropriate after you copy/paste.
Best,
Grant.

Similar Messages

  • Can I have the google and yahoo toolbars with firefox 8?

    I want to know before upgrading to fire fox 8 if I cabn have my yahoo and google tool bars . If I can. Then I will upgrade to stop getting your pop ups asking me to.

    Google are no more making toolbar but Yahoo toolbar works fine on Firefox 8
    * toolbar.yahoo.com
    * getfirefox.com

  • How can I have an instance of mx.controls.List in a SWF from Flash?

    How can I have an instance of mx.controls.List component in a Flash, and import its SWF into a Flex application so it can controll it?  Is it possible to do this either at author-time or runtime?
    I see plenty of examples of how you can import a SWC into Flex, but how can I have my Flash interface, with Flex components already in place to be consumed by Flex?
    Thanks

    Hallo, here is more code for my problem:
    class Login {
       Devisen dev=new Devisen();
    class Devisen {
       JTextField field2;
       if (!Check.check_field2()) return; // if value not okay than return
    class Check {
       public static void check_field2()
         HOW TO GET THE CONTENT OF field2 HERE ?
    One solution ist to give the instance to the static function, with the keyword "this"
    if (!Check.check_field2(this)) return;and get the instance
    public static void check_field2(Devisen dev)BUT is that a problem for memory to give every method an instance of the class ? I have 50 fields to control and I dont want do give every check_method an instance of Devisen, if this is a problem for performance.
    Or do I only give the place where the existing instance is.
    Hmm...?
    Thank you Wolfgang

  • I cannot save (to desktop) or send (to another computer), a certain important document from the web.  Can I have a back and forth discussion with someone about my issues?

    Technically, I'm just trying to print my online pay stub, and am having an impossible time with the options given to me!!  
    Since my printer isn't working, I'd like to save document to my desktop ("save as" is the only option given to me) and send it as an attachment to a friend's computer and working printer.  I'm given 2 options for the format when trying to "save as", neither work, because when I open the saved icon on my desk top, sometimes there is an empty page that states something like, there is no webpage here, or there is nothing there at all!
    Now, I am currently trying to send the document directly (via email, an option given under "file") the pay stub from my employer (who uses ADP online payroll services), to that computer and working printer ....and I'm receiving a window (with apple mail logo on it) that begins with  "To view this page, you must log in to this area on agateway.adp.com:443:"  and asks for "name" and "password".  I've put in both ADP's information, and what I believe (could be very wrong) to be apple mail's information, and either/neither/nothing seems to work!
    [back story] About 5 years ago, I attempted to set-up apple mail (4.5) on my MacBook (OS X 10.6.8), didn't appreciate the process and abandoned my efforts.  Since then I've always used different email applications (yahoo, go daddy, and currently, gmail).  I've been successfully able to avoid apple mail up until this point.
    Can anyone help me save or send this document?
    Please someone ....help me!

    JRP IV wrote:
    I'm just trying to print my online pay stub
    Since my printer isn't working, I'd like to save document to my desktop ("save as" is the only option given to me) and send it as an attachment to a friend's computer and working printer.
    What browser are you using?
    Are you trying to print or to save the doc? Whether you have a working printer or not is really immaterial. If you're trying to print, then File > Print > PDF > Save as PDF…. If the resulting PDF is small enough (<5MB, though my preference is <1MB), e-mail it to your pal. If it's too big, transfer it using a chat programme or a file service (MediaFire, RapidShare, etc).
    Now, I am currently trying to send the document directly (via email, an option given under "file") the pay stub from my employer (who uses ADP online payroll services), to that computer and working printer ....and I'm receiving a window (with apple mail logo on it) that begins with  "To view this page, you must log in to this area on agateway.adp.com:443:"  and asks for "name" and "password".  I've put in both ADP's information, and what I believe (could be very wrong) to be apple mail's information, and either/neither/nothing seems to work!
    I don't understand any of this. You need to explain better—or perhaps just post a screen shot (blank any private or confidential info on it prior to posting).

  • HT201303 How can I have my iPhone and my iPad with the same Apple ID?

    I recently bought an iPad and I want to have it on the same Apple ID that I currently have on my iPhone 5. I want to be able to play my current game (Boombeach), which I started on my iPhone5, on my new iPad. Can anyone help with these problems?

    Backup your iPhone 5 to iCloud or iTune and restore backup to iPad.

  • "You can only rename functions and variables"

    G’day
    I have this:
    <!--- this comment breaks it --->
    <cfloop from="1" to="5" index="idx">
    <cfoutput>#idx#<br /></cfoutput>
    </cfloop>     
    If I select "idx" and go right click > refactor > rename, I get a popup saying "You can only rename functions and variables."
    If I take the comment out... works fine.
    Weird.
    Adam

    i have a problem to opening my firfox home page . help me please

  • How can I hide the password and user name in url???

    Hi experts,
    I'm creating a login page and know I have a problem.
    The Username and password are verified in a Java class, after checking the user and password, the user should be linked to the portal.
    So far everything has worked well.
    But when I call the lin like this
    res.sendRedirect ("/ irj / portal j_user =" + UserN + "& j_password =" + passw);
    then the user name and Pwasswort appears in the url.
    Can someone tell me how can I hide the password and user name???
    It will be very helpful.
    Thank you
    Edited by: Cilvaring on Aug 5, 2011 12:00 PM

    If there is no specific reason that you have to use sendredirect...thne you can try request.forward.....
    RequestDispatcher rd = request.getRequestDispatcher("pathToResource");
      rd.forward(request, response);

  • Can't have aggregate function in WHERE clause clause

    Dear all,
    I've created object in BO XI 3.1 Designer with following criterias:
    http://img4.imageshack.us/img4/833/20111201124314.th.jpg
    It is a simple number - 1,2,3,4,5.
    Now I need to use this object as a criteria for WHERE function in another object.
    http://img607.imageshack.us/img607/1543/20111201124717.th.jpg
    I receive an error "Can't have aggregate function in WHERE clause <clause>"
    How can I overcome this?
    P.S. I'm sorry in advance if such topic already exist - I didn't found one.
    Edited by: Ashot Antonyan on Dec 1, 2011 9:50 AM
    Edited by: Ashot Antonyan on Dec 1, 2011 9:51 AM

    Hi,
    You will have to use Sub query to achieve this. Give more details on what is available and what you need then i could help you out with the complete solution.
    Thanks,
    Ravichandra K

  • Do I have to buy Acrobat before I can get Adobe Reader?  I have an ID and password for Adobe, but when I try to download Adobe Reader it asks me for a password I don't have.

    Do I have to buy Acrobat before I can get Adobe Reader?  I have an ID and password for Adobe, but when I try to download Adobe Reader it asks me for a password I don't have.

    vivianp45768349 wrote:
    I don't have a system.  It's my personal computer.
    You do. Your system is either Windows or Mac (or maybe a couple of other less popular choices) and a version of one or the other.
    When you set up your machine, you were asked for an administrator user name and password. You need both of these to install software.

  • Would you please some one can provide me Reporting function and Techn specs

    Hi BI guru's
    Would you please some one can provide me Reporting function and Techn specs.I have got new requirement for the reports.
    Hence i need to prepare Functiona and technical spec for them.
    I don't have any documents related to it.
    Please some one can help me  and mail it to [email protected]
    Edited by: krish aryan on Jul 30, 2008 3:00 AM

    Hi,
    You need the template for techical specs? Your question is not clear. If you are asking for templates, I don't think they can be shared in a common forum like this.
    We can give you an idea as to how it can be prepared, but I guess you will already have templates for your documentation in your company portal.
    Regards
    Sudeepti

  • How to know the nos. and variable name from Jframe ?

    Hello Everyone,
    I have just started java programming. I have one form (using jframe) and there are nos. of components like text field, radio buttons, list box, buttons etc.).
    I want to know nos. and type of components (text field, radio buttons, button etc..) and variable name of these components ?
    Is there any way class / method or technique for the same ?
    With Thanks !
    Prashant Shukla

    Since if you are dealing strictly swing here, and no mixed in awt, all you have is JComponents, then where's the problem ... why do you even need to know which JComponent it is?
    This what you have?
    class StuffWithListeners  extends JFrame  implements ActionListener, KeyListener {
      StuffWithListeners() {
        jb = new JButton("GO");
        ta = new JTextArea(10,20);
        jb.addActionListener(this);
        ta.addKeyListener(this);
      public void actionPerformed(ActionEvent ae) {
      public void KeyPressed(KeyEvent ke) {
    }Edited by: abillconsl on Dec 14, 2007 5:23 PM
    null

  • I lost all of my artist names and album names for my iTunes library. They are all now on one album. How can I get the album and artist names back?

    I lost all of my artist names and album names for my iTunes library. They are all now on one album. How can I get the album and artist names back?

    I have a script called ExportImport for this task, but it only runs in Windows.
    In principle something similar should be possible in AppleScript, but I don't currently have access to a Mac to write it myself.
    tt2

  • Can I have both IPS and Content security on ASA5510?

    Hi expert
    We want to have a ASA5510 with both IPS function and Content Security feature, while I checked on Cisco website, looks like ASA5510 or 5520 only have one SSM slot, so I can only use either AIP module or CSC module, does it mean I can not get both features at the same time.
    Right now I want to have IPS function and anti-spam, anti-virus, antiphishing, content filtering, URL blocking such feature, so what do I need to buy to have all of these function in one device?
    Thanks

    Dear Echo Chan .
               You can go with CSC module for your requirement , most of your requirement could be satisified by CSC module except IPS functionality
    http://www.cisco.com/en/US/prod/collateral/vpndevc/ps6032/ps6094/ps6120/prod_qas0900aecd8040397e_ps9774_Products_Q_and_A_Item.html
    The Cisco ASA 5500 Series CSC-SSM is an add-on services module for Cisco ASA 5500 Series appliances. It delivers industry-leading threat protection and content control at the Internet edge, providing comprehensive antivirus, anti-spyware, file blocking, anti-spam, anti-phishing, URL blocking and filtering, and content filtering services.
    HTH
    Thks
    Santhosh Sarav

  • HT1107 I have registered 2 domain names . can I have more then one domain name on mobile me or icloud?

    I have registered 2 domain names . can I have more then one domain name on mobile me or icloud?

    MobileMe ends here at the end of the month so you will need to look into hosting your website/websites with another webhosting service.
    I personally use IX Webhosting for a couple of reasons:
    Fast reliable personal tech support by phone, instant chat, & email
    They allow unlimited domains "www.yoursite.com", unlimited email accounts, unlimited bandwidth
    And, price they are very reasonable plans start @ $3.95 USD a month
    http://jeffnitschke.com/IXWebHosting.html

  • TS3376 plz help me apple. im from viet nam, my english so bad, but today i have bought a ipad mini 2 with serial DL*******CM5 from a thrief, he lie me and i give him all money i have, when i go home, i reset all setting, apple need ID, now, i cry so much,

    plz help me apple. im from viet nam, my english so bad, but today i have bought a ipad mini 2 with serial DL********CM5 from a thrief, he lie me and i give him all money i have, when i go home, i reset all setting, apple need ID, now, i cry so much, i know he lie me, this is all my money i have, plz, don't icloud my ipad, this is all my money apple, plz help me, i hope apple will help my money back, i hope, plz reply me   plz
    <Personal Information Edited by Host>

    Sorry but no one can help you with this.  Contact the police.

Maybe you are looking for

  • How can we prevent JTabbedPanes from transferring focus to components outside of the tabs during tab traversal?

    Hi, I noticed a strange focus traversal behavior of JTabbedPane. During tab traversal (when the user's intention is just to switch between tabs), the focus is transferred to a component outside of the tabs (if there is a component after/below the JTa

  • Time Machine is not working for me

    There is no way that Time Machine is working right for me. Backups are taking a split second and are reporting crazy small amounts. Example, I have added to my Mac 1 gig of movies and 1 gig of images. I backed up today and Time Machine reported 28k o

  • Playing input stream audio in j2me

    want to make a text-to-speech synthesizer for mobile phones. for that i am using FreeTTS (text-to-speech synthesizer written in java) so i have made a client-server model where i have a midp client which is sending text to the FreeTTS acting as a ser

  • Restricting employee to avail the casual leave in a quarter

    Hi Experts, I would like to know where is the setting in Time Management for restricting the no. of days to be availed in quarter for a casual leave i.e. employee should not avail more than 3 casual leaves in a quarter. Regards Santosh Rajam

  • Album and Music library are blank

    Their are songs and pictures in the phone. They can be accessed via the file manager. The album and Music library show that there is no content. Help.