Need help with loop and variable

Hi all.

I'm almost there with this, but I'm stuck on one last question.

I am a loop in XML to choose the images to display, with the title and ID (which is used in the link).
Everything works now except the itemID. This used to work, but now the ID is the same for all containers/links on the page.

Code is attached below, and the function is the image.addEventListener.
The itemID variable is that doesn't change is not to reflect the individual elements.

Please please help.

Thank you very much


Hello

You can try to use logic you used in your posted previous sample. Use the event.currentTarget.id to get the ID of the Image.

image.addEventListener (MouseEvent.CLICK, function(e:Event):void
{
var imgId:String = e.currentTarget.id;
var url: URLRequest = new URLRequest (" http://localhost/youtubeDownloader-debug/index.cfm?video=" + imgID).
navigateToURL (url, "_blank");

});

You can also use the property 'data' of the Image to store the value you want and use the same property to get the value in the event listener.

I hope this helps.

Tags: Flex

Similar Questions

  • Need help with drag and drop

    IM really new to this program as a

    day new hehe and I need help. im making a game quiz and your supposed

    ED to score in the hoop with a circle.  I have the

    codes for the drag and drop for the circle, but I need help with the collision between the Hoop and the ball, I want to go to the image next or gotoandPlay when the ball touches the ring. HELP PLEASE

    You should not attach code to objects.  and you can be able to happen by using a loop.

    Start by removing all the code the suggested by maqro (i.e. as3) and by removing all the code attached to objects.

    use:

    {yourobject.onPress = function ()}

    this.startDrag ();

    }

    {yourobject.onRelease = yourobject.onReleaseOutside = function ()}

    this.stopDrag ();

    {if (this.) HitTest (whatever))}

    do something

    }

    }

  • HP laptop: need help with internet and search for things

    whenever I'm on chrome internet explore google ect and go to tab it is says unknown error or no internet connection or anything and just takes me chrome ect. I need help with this im involved in a byod class and my computer won't let me on what whatever usually it just starts out black and white and the seeds I my search request

    Yes it's a Windows 10 and it arrived already installed I'll take the other info now

  • Need help with loops

    Hi all

    I am a beginner in Labview. If need help in loops. Please check the attached vi and suggest me the procedure I followed is effective or not. If this is not the case, correct me.

    Waiting for answer

    According to the commentary of diagram, table sizes are all 16, then here is everything you need:

    (Hmm, clips chiseled Booleans in the constant diagram, just ignore that)

    "Elements of an array AND" checks if all a real (upper thread)

    'The GOLD table elements' check if at least one is true. (all others)

  • Need help with sizing and save files in batches

    Hi need help with a project.

    I have thousands of vector files that I need size of 350px X 350px, and then place it on a work plan x 600px-600px.

    Then I need to save it to the web as a PNG with a transparent background.

    Could I do a script for? or is there another way to do it in batches?

    I wouldn't have to open them one by one and resize the work plan then the image and save it one by one as that would take forever.

    Any help some suggestions would be greatly appreciated.

    ID do as a series of actions photoshop if the end result is png,

    pro image processor can help you make automatically, if you must resize batch additional... >

    https://sourceforge.NET/projects/PS-scripts/files/image%20Processor%20PRO/v3_2%20betas/

    I think that your work can run in a few steps, but for simplicity, I would like to start / test with a new photoshop action recording

    Open a file, change the size of the image to 350 x 350

    Change the canvas size,

    then save under...

  • No support for pse4, don't need help with aid and all the rest. What is a layer? How can I get help PDF from CD? I don't have any idea how to use it. I have a Macbook pro.

    Need help with using pse4 not taken in charge by adobe. How subjects do not available and I have never used something like that. Aide said there is a download but have not been able to do. What is a rookie to do? Y at - it somewhere that I can go to learn how to use PSE4?

    To find out how your problem:

    http://kb2.Adobe.com/CPS/402/kb402107.html

    To get help from the CD files you double-click in the finder, go to PDF help and drag it to the desktop or elsewhere.

  • Need help with the procedure variable

    Hi guys,.

    I try to get the list of the TableName of a specific table and store it in a variable and use this variable to LOOP and remove specific data in the table. Here is my code, maybe that will be clearer...

    This procedure within a package

    PROCEDURE DeleteData (parCONTR_NBR IN VARCHAR2)
    AS
    v_TableName CMSR_MAPPING. TABLE_NAME % TYPE;

    BEGIN
    Extract the names of the tables
    SELECT TABLE_NAME
    IN v_TableName
    OF CMSR_MAPPING
    WHERE TABLE_TYPE <>'W '.
    AND ORDER_SEQ <>' 0'
    ORDER BY ORDER_SEQ DESC
    ;

    -Loop on the name of the table
    FOR v_Index in 1... v_TableName.Count LOOP
    -Check that the table name and remove from the respectable table -.
    CASE v_TableName (v_Index)
    WHEN "CMSW_CONTR" THEN
    REMOVE FROM CMSW_CONTR
    WHERE CONTR_NBR = parCONTR_NBR;
    WHEN "CMSW_AMNDS" THEN
    REMOVE FROM CMSW_AMNDS
    WHERE CONTR_NBR = parCONTR_NBR;

    END CASE;

    END LOOP;

    END;

    When I run it, I get the following compile on this line error of TO v_Index IN 1.. v_TableName.COUNT LOOP:
    PLS-00487: Invalid reference to the variable 'V_TABLENAME '.

    Can someone help with this? What I'm doing wrong here?

    Like this?

    /* Formatted on 5/20/2011 12:37:05 PM (QP5 v5.149.1003.31008) */
    CREATE OR REPLACE PROCEDURE DeleteData (parCONTR_NBR IN VARCHAR2)
    IS
    BEGIN
       FOR c IN (  SELECT TABLE_NAME v_TableName
                     FROM CMSR_MAPPING
                    WHERE TABLE_TYPE != 'W' AND ORDER_SEQ != '0'
                 ORDER BY ORDER_SEQ DESC)
       LOOP
          -- Verify the table name and delete in respectable table --
          --( I always hate when my tables aren't respectable !)
          CASE c.v_TableName
             WHEN 'CMSW_CONTR'
             THEN
                DELETE FROM CMSW_CONTR
                      WHERE CONTR_NBR = parCONTR_NBR;
             WHEN 'CMSW_AMNDS'
             THEN
                DELETE FROM CMSW_AMNDS
                      WHERE CONTR_NBR = parCONTR_NBR;
          END CASE;
       END LOOP;
    END;
    

    Obviously I don't have your data and do not know exactly what is the whole procedure
    but you could not do?

    /* Formatted on 5/20/2011 12:49:07 PM (QP5 v5.149.1003.31008) */
    CREATE OR REPLACE PROCEDURE DeleteData (parCONTR_NBR IN VARCHAR2)
    IS
    BEGIN
       DELETE FROM CMSW_CONTR
             WHERE CONTR_NBR = parCONTR_NBR
                   AND EXISTS
                          (SELECT 1
                             FROM CMSR_MAPPING
                            WHERE     TABLE_TYPE != 'W'
                                  AND ORDER_SEQ != '0'
                                  AND table_name = 'CMSW_CONTR');
    
       DELETE FROM CMSW_AMNDS
             WHERE CONTR_NBR = parCONTR_NBR
                   AND EXISTS
                          (SELECT 1
                             FROM CMSR_MAPPING
                            WHERE     TABLE_TYPE != 'W'
                                  AND ORDER_SEQ != '0'
                                  AND table_name = 'CMSW_AMNDS');
    END;
    

    Published by: pollywog may 20, 2011 12:49

  • Urgent need help with find and change / GREP

    I'm working on a manual that contains more than a thousand paintings. I'm not quite familiar with GREP and need help to determine the right to coding/jokers to change the character style to a group of words/numbers on a global basis.

    For example, in Chapter 7, a paragraph style is applied to this line of text:

    TABLE 7.1: T4, T3, FREE T4 AND FREE T4ED

    I need to change "table 7.1:" for a character style and so of suite/so on up to "Table 7,150:"-while leaving the other numbers on the same line unchanged also.»» Is it possible to do without having to manually each table style number?

    gd247 wrote:

    I'm working on a manual that contains more than a thousand paintings. I'm not quite familiar with GREP and need help to determine the right to coding/jokers to change the character style to a group of words/numbers on a global basis.

    For example, in Chapter 7, a paragraph style is applied to this line of text:

    TABLE 7.1: T4, T3, FREE T4 AND FREE T4ED

    I need to change "table 7.1:" for a character style and so of suite/so on up to "Table 7,150:"-while leaving the other numbers on the same line unchanged also.»» Is it possible to do without having to manually each table style number?

    No need for GREP. If "TABLE 7.1:" is text, you can create a nested character style that extends through the colon, in the paragraph style. "

    If "TABLE 7.1:" is created by a numbered list of automatic type paragraph style, you can specify a character style named for the part of automatic numbering in the drop-down menu Style of character, in the Style of numbering of the chips section and numbering of the dialog box Options of paragraph style. If the character style does not exist, you can stay in the operation of paragraph options by choosing 'New Style of character' in the menu. After you create the new style, you're back in the process of definition of the paragraph.

    HTH

    Kind regards

    Peter

    _______________________

    Peter gold

    Know-how ProServices

  • Need help with WRT54G2 and network at home

    OK, I got the WRT54G for a long time and recently updated for the WRT54G2 but now can't access the file sharing and running Windows Vista from Windows XP using wireless.

    Here is my set upward,

    Desktop running Windows Vista connected to the router (that's the computer with folders and printers)

    2 - Windows XP laptop computer connected wireless

    All 3 are defined on the same workgroup can be seen on Windows XP machine when you go to, favorite network, also all can get on the internet.

    Any ideas what the problem might be? I'm guessing a setting somewhere but I was not able to find it.

    After a lot of research and help from this forum, I finally got to work, it was a firewall issue

    Thanks for the replies.

  • Need help with the text variables

    I have a directory to which is more than 300 pages long.

    Each entry begins with a photo in a built-in framework shaped like a cat fall, followed by a space en dash and then the name, company, address, e-mail, etc.. Essentially, we have a photo hanging to the left and on the right information.

    The name is the last name in capital letters, first name and middle name propercase. I've defined a character style "Dict Head" and used in a paragraph style as style nested through 3 characters.

    Then, I defined a two text for the instance variable first and last instance on the page of the character style "Dict Head". I have a hyphen between the two variables (the goal is at the head of the race be "AAR - ABE," for example). The application, however, includes space en with three letters.

    I did a GREP search for space en with the applied character style and replaced it with himself, and < None > character style applied and which does not seem to get rid of. My current title looks like this " AAR - ABE." With invisible on I see the en space is still there.

    I deleted the text variables, exported a. File INX, opened soft and recreated the text variables and the spaces are still there.

    I'm open to suggestion.

    Ken

    It seems ID brings together up to three regular characters with which nesting style... (Okay - just tried and the original en-space is also considered to be a 'character' for this number of three.) No matter what... read more, please)

    You can not delete a character with your search and replace nested style. Try it - ID can be found but not change it to [anything].

    Possible workaround would be to not use the style nested to mark the names and put the character marker using a GREP search and replacement style.

  • I need help with copy and paste does not

    I already asked this question, but no one seems to want to help or does not know the answer.  I can't afford to pay microsoft $49 help. It is their dang opertating system and you would think they would help the customers who buy their products.  Don't think!  Please, someone help me.  I am a graphic designer and need to copy and paste all the time, but it does not work.  It's so frustrating.  Should have bought a Mac time... next.  If no one here can help... where can I go for help?  Here the question again.

    Copy and paste the orders have stopped working in all my software programs (Photoshop, CorelDraw, Corel Painter, etc.).  When I type "copy", or "control c", it crashes and whatever program I use becomes inoperative, as well as all my programs, until I can get the specirfic program to close.  I ran Services.msc to ensure than the Clipboard (did not find Clipboard so I assumed it was changed to album) has been activated, which he was, but when I click on 'Start service' it says "cannot start service on local computer album.  "Error: 1068: the dependency service or group could start. It started several weeks ago and I have not installed new programs during this period.  Only my computer display was the automatic updates of Windows.  It's very frustrating... How can I copy and paste to work.  I got this computer less then 4 months.  Thank you

    To all with this problem, try this:

    http://support.Microsoft.com/kb/309662

  • Need help with gel and ringing

    Please help me I read and try stuff on the left and on the right it seems random freeze hum like an audio loop I can't do anything and I have to restart my computer manually I seem to have all the updated drivers and windows is updated my computer is new to me a year but I've been on it for about 4 months then I had to move and it ended seat for about 8 months after turn it on and update I play a game and I don't have any idea when it will freeze and not buzz no blue screen I have video card 16g ram amd radeon r290 and asrock x 99 extreme6 mobo intel i7 5820 k im lost on what to do, I have some errors in the case where the viewer I'll post it works fine other wise please help she's my baby

    Hello

    Thanks for posting in Microsoft Community

    I understand the inconvenience that you face in accessing the operating system as it freezes. We will help you to solve this problem.

    We know the following details to help you the best with this question:

    1. When you exactly the system freezes?
    2. This issue persists in a particular case?

    I suggest you try the troubleshooting steps mentioned in the Microsoft article below and check if it helps.

    Crashes Windows or freezes

    Safety Scanner WARNING: There could be a loss of data while performing an analysis using the Microsoft safety scanner to eliminate viruses as appropriate.

    Chkdsk WARNING: Running chkdsk on the drive if bad sectors are found on the hard drive, while the bad sectors can be refunded but there may be loss of data.

    Also check out the article below to find the logs of events on this problem and check if it helps.

    Reference: what information appears in event logs? (Event Viewer)

    It will be useful. Answer the post office with a State updated this issue to get help.

  • Need help with charger and power adapter

    I can't find my charger for HP Elitebook 8570p.

    I need the specs for the power supply cable and adapter. If anyone can help. Be good if you have a photo too.

    Hello:

    You can find the necessary information in Chapter 3, pages 51 and 52 of the repair... Articles and part numbers.

    Power cords are classified separately according to the countries.

    http://h20628.www2.HP.com/km-ext/kmcsdirect/emr_na-c03565466-1.PDF

    The 90 Watt adapters are larger that the 65W those, the latter are more suited to travel with.

    If you want the 65 W adapter, then you want this one...

    AC adapter smart HP 65 W (RC/V, EM, 3-wire) HP Part # 693710-001

  • Need help with sql, and bash

    Hi guys,.

    My main problem/situation is when sqlplus returns no data (no message selected lines)

    Bash shell script condition

    echo $open_items

    15 if [[$open_items == "0"]]

    16. can

    echo 17 0

    18 else

    19 1 echo

    20 fi

    and real sql is as follows:

    elect the count (*) a table with a condition.

    I get the output as follows:

    + open_items ='

    COUNT (*)

    ----------

    0'

    + echo 'COUNT (*)'---0

    COUNT ()) - 0

    + [[

    COUNT (*)

    ----------

    0 == \0 ]]

    + echo 1

    1

    What to do so that I can get a number in the output of sql is my question because the condition of shell script is based entirely on sqlplus out. I tried set feedback off, but it does not help.

    Any help would be much appreciated!

    SQL lover wrote:

    OK I try it and give you feedback

    In fact, I take out execution of sql into a variable

    MyVar = $(sqlplus-s/as sysdba)<>

    Set echo off feedback off verify off trimsp head off pages 0

    Select count (*) from dba_users;

    output

    EXPRESSIONS OF FOLKLORE)

    echo myvar is $myvar

  • Need help with Substr and Instr

    I have a request

    Select msg

    from table_a

    She returned as log messages below

    Continued in logid = > 241153 < for oid = > 1621 <, GoC = > 795, bday = > 01.04.2013 <

    If the message contains logid = > then I want to display

    Continued in logid = > 241151 <

    for example

    case

    When the msg like ' % logid = > %'

    then

    I tried the combinations of substr and instr, but cannot make it work

    Any help appreciated

    Gus

    SQL >-samples:

    SQL > with t as

    2 (choose "continued in logid-online 241153< for="" oid="">1621<, gdc="">795, bday-online 01.04.2013")<;' str="" from="" dual="" union="">

    3 select "continued in pid-online 241153< for="" oid="">1621<, gdc="">795, bday-online 01.04.2013"<;' str="" from="">

    4)

    5. Select case-sensitive

    6 when instr (str, 'logid') > 0

    7 then substr (str

    8, instr (str, ' > ', 1, 1) + 1

    9, instr(str, '<', 1,="" 1)-instr(str,="" '="">', 1, 1)-1

    10                      )

    11 another null - or what you want / need

    12 end str

    13 t;

    STR

    ------------------------------------------------------------------------

    241153

    2 selected lines.

Maybe you are looking for