9 Replies Latest reply on Sep 16, 2011 9:27 AM by Ned Murphy

    Adding link - please help

    beebeeruth

      Hi.

       

      Please can someone help me.  I'm working on updating a flash file and i have to add a hyperlink to a word but i'm having no luck.  can some help,  the bit of code is:

       

      but6="Renewable Energy - Solar Panels";

       

      but6bt="Installing and using renewable energy technologies like wind turbines, solar panels and biomass heaters offer an alternative to fossil fuels.  It will reduce your homes CO2 emissions and energy bills and depending on the technology you could even paid for the energy you generate, or take advantage of the schemes that some companies offer. Find out more here";

       

       

      The word here thats bolded is the word i need to add a hyperlink to.  does anyone know how to do this?

       

      Thank you

        • 1. Re: Adding link - please help
          kglad Adobe Community Professional & MVP

          you can use an html-enabled textfield and use a standard anchor tag.

          • 2. Re: Adding link - please help
            beebeeruth Level 1

            I did this but it came back with an error saying unexpected <

             

            Any ideas?

             

            but5="15% of heat can be lost through the floors";

            but5bt="Seal any gaps and draughts round skirting boards and between floorboards. Timber floors can be insulated by lifting the floorboards and laying mineral wool insulation supported by netting between the joists. More information click";<a href="http://www.energysavingtrust.org.uk/Home-improvements-and-products/Home-insulation-glazing /Draught-proofing">here</a>

            • 3. Re: Adding link - please help
              kglad Adobe Community Professional & MVP

              copy and paste the error message.

              • 4. Re: Adding link - please help
                beebeeruth Level 1

                it says

                 

                Description

                Unexpected '<' encountered

                 

                the code is

                 

                 

                //link1= getURL("mailto:sustainability@brighton-hove.gov.uk");

                 

                introtxt="Homes can loose a lot of heat if not insulated properly; this is waste of energy and money. There are measures you can take to improve the energy efficiency of your home. Remember to check whether you are eligible for a grant for energy efficiency work here.<br><br>Press continue and roll your mouse over the image below. Click on the six hot spots for more information:";

                 

                but1="Around 25% of heat can be lost through the roof";

                but1bt="Stop this by ensuring you have good loft insulation - the recommended depth for mineral wool insulation is 270mm. Get more information here.";

                 

                but2="Walls: 35% of heat can be lost through the walls";

                but2bt=" If your home has cavity walls they can be easily insulated.  Solid walls can be insulated too.  Get more information on insulation here.";

                 

                but3="10% of heat is lost through windows";

                but3bt="Reduce this by fitting double glazing, draught proofing and hanging curtains. More information here.";

                 

                but4="15% of heat can be lost through draughty doors";

                but4bt="Make sure to draught proof doors. More information here.";

                 

                but5="15% of heat can be lost through the floors";

                but5bt="Seal any gaps and draughts round skirting boards and between floorboards. Timber floors can be insulated by lifting the floorboards and laying mineral wool insulation supported by netting between the joists. More information click";<a href="http://www.energysavingtrust.org.uk/Home-improvements-and-products/Hom e-insulation-glazing/Draught-proofing">here</a>

                 

                but6="Renewable Energy - Solar Panels";

                but6bt="Installing and using renewable energy technologies like wind turbines, solar panels and biomass heaters offer an alternative to fossil fuels.  It will reduce your homes CO2 emissions and energy bills and depending on the technology you could even paid for the energy you generate, or take advantage of the schemes that some companies offer. Find out more";

                 

                /*

                but6="Kettles";

                but6bt="Only boil as much water as you need, but remember to cover the elements if using an electric kettle. ";

                but7="Dripping taps";

                but7bt="A dripping hot water tap wastes energy and in one week wastes enough water to fill half a bath, so fix leaking taps and make sure they\'re turned off! ";

                but8="Light bulbs";

                but8bt="Use energy saving light bulbs and save money- they last up to 12 times longer than ordinary light bulbs. <br>Always turn off the lights when you leave a room. ";

                but10="Save water";

                but10bt="Shower rather than bath; showers use two thirds less water and less energy.";

                */

                 

                 

                 

                 

                allloaded = '1';

                • 5. Re: Adding link - please help
                  Ned Murphy Adobe Community Professional & MVP

                  You've ended the text assignment before the link text, so that <a and what follows it is in nowhere land...

                   

                      .... More information click";<a

                   

                  After you move the link inside the quotes, you'll need to slash the quotation marks inside the anchor tag.... <a href=\"....

                  1 person found this helpful
                  • 6. Re: Adding link - please help
                    beebeeruth Level 1

                    <a href=\"http://www.energysavingtrust.org.uk/Home-improvements-and-products/Hom e-insulation-glazing/Draught-proofing">here</a> 

                     

                    now brings up an error saying syntax error

                    • 7. Re: Adding link - please help
                      Ned Murphy Adobe Community Professional & MVP

                      From what you show, you didn't slash the other quotation mark in the href parameter value.  Without showing all of the code for that variable assignment, there's no telling if something else might be tripping the error

                      1 person found this helpful
                      • 8. Re: Adding link - please help
                        beebeeruth Level 1

                        sorry, the full code is

                         

                         

                        introtxt="Homes can loose a lot of heat if not insulated properly; this is waste of energy and money. There are measures you can take to improve the energy efficiency of your home. Remember to check whether you are eligible for a grant for energy efficiency work here.<br><br>Press continue and roll your mouse over the image below. Click on the six hot spots for more information:";

                         

                        but1="Around 25% of heat can be lost through the roof";

                        but1bt="Stop this by ensuring you have good loft insulation - the recommended depth for mineral wool insulation is 270mm. Get more information here.";

                         

                        but2="Walls: 35% of heat can be lost through the walls";

                        but2bt=" If your home has cavity walls they can be easily insulated.  Solid walls can be insulated too.  Get more information on insulation here.";

                         

                        but3="10% of heat is lost through windows";

                        but3bt="Reduce this by fitting double glazing, draught proofing and hanging curtains. More information here.";

                         

                        but4="15% of heat can be lost through draughty doors";

                        but4bt="Make sure to draught proof doors. More information here.";

                         

                        but5="15% of heat can be lost through the floors";

                        but5bt="Seal any gaps and draughts round skirting boards and between floorboards. Timber floors can be insulated by lifting the floorboards and laying mineral wool insulation supported by netting between the joists. More information click"<a href=\"http://www.energysavingtrust.org.uk/Home-improvements-and-products/Hom e-insulation-glazing/Draught-proofing">here</a>

                         

                        but6="Renewable Energy - Solar Panels";

                        but6bt="Installing and using renewable energy technologies like wind turbines, solar panels and biomass heaters offer an alternative to fossil fuels.  It will reduce your homes CO2 emissions and energy bills and depending on the technology you could even paid for the energy you generate, or take advantage of the schemes that some companies offer. Find out more";

                         

                        /*

                        but6="Kettles";

                        but6bt="Only boil as much water as you need, but remember to cover the elements if using an electric kettle. ";

                        but7="Dripping taps";

                        but7bt="A dripping hot water tap wastes energy and in one week wastes enough water to fill half a bath, so fix leaking taps and make sure they\'re turned off! ";

                        but8="Light bulbs";

                        but8bt="Use energy saving light bulbs and save money- they last up to 12 times longer than ordinary light bulbs. <br>Always turn off the lights when you leave a room. ";

                        but10="Save water";

                        but10bt="Shower rather than bath; showers use two thirds less water and less energy.";

                        */

                         

                         

                         

                         

                        allloaded = '1';

                        • 9. Re: Adding link - please help
                          Ned Murphy Adobe Community Professional & MVP

                          You didn't fix what I said needed fixing.  The link has to be inside the quotes of the text assignment, and the quotation marks inside the link need to be slashed...

                           

                          but5bt="Seal any gaps and draughts round skirting boards and between floorboards. Timber floors can be insulated by lifting the floorboards and laying mineral wool insulation supported by netting between the joists. More information click <a href=\"http://www.energysavingtrust.org.uk/Home-improvements-and-products/Home-insulation-glazing/Draught-proofing\">here</a>";