Now that our item renderers are visible, we are able to program a reaction when each is clicked by the user. We’ll add an event listener to each item renderer which will populate text within our details renderer on the stage.
- [Narrator] Now that our item renderers are visible,…we're able to program a reaction…when each is clicked by the user.…We'll add an event listener to each item renderer,…which will populate text within…our details renderer on the stage.…So, let's expand our Actions panel.…And we want to be able to add this…right where we're creating newItem…inside of our renderItems function, within this for loop.…So, let's go ahead and right after we set the y position,…I'm gonna paste in a snippet.…
What this does, is it binds a click event to newItem,…and when somebody clicks on this,…it runs this particular function here.…This function is gonna go ahead…and target the root.detailRenderer,…and it'll target various pieces of that,…such as title, date, description,…these are all our different text fields that we created.…You can see here that we pull in the different items.…You may have been wondering before,…when we create a new item, why we're preserving the id…as a property of that new item.…
This is why: because we need to know…
- Using XML and JSON
- Setting up your Animate project
- Building a carousel container
- Applying animation
- Creating titles with dynamic text
- Ingesting external data
- Rendering images
- Automating transitions
- Designing an RSS display
- Programming the RSS display
Skill Level Intermediate
1. Dynamic Data Fundamentals
About XML and JSON1m 49s
2. Design a Web Carousel
3. Program the Web Carousel
4. Design an RSS Display
5. Program the RSS Display
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.