A set of directional controls already exist within our project, upon the stage. Let’s now add some event listeners to them in order to respond to user interaction - and shift the carousel left and right.
- [Narrator] A set of directional controls already…exists within our project upon the stage.…Let's now add some event listeners to them…in order to respond to user interaction.…Shifting the carousel left and right.…So on frame one of our root timeline,…in the Actions layers, let's expand the Actions panel,…and add in some more snippets.…Let's put some space up there and Paste.…So what I've just added in, was a new variable,…that keeps track of our currently centered image.…
The current image is going to be zero by default,…because that's the image position within our array…that we're setting to the center when…we render the images.…Next we add the event listeners to our direction left…and direction right buttons.…To do that, we say this direction left,…add event listener, of type Click.…We'll then invoke a function called shiftCarouselLeft…and we'll do the same thing for direction right.…
Except that will invoke shiftCarouselRight.…These two functions are directly below.…Here's shiftCarouselLeft.…And here again we use root since we're within a function.…
- 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.