Solved

Creating a dynamic carousel in Flash CS3

Posted on 2009-05-04
6
955 Views
Last Modified: 2013-11-11
I have a flash movie that I created with Flash Eff, consisting primarily of 3 movie clips, each of which has the pattern FESFlashSlide applied to it. Each MC has one static image inside it. I would like to add dynamic image loading to it, so that each time the flash eff pattern recycles, its MC has a new image.

Each flash eff control has a tab that accommodates loading an xml doc. Am I correct in assuming that this is the correct way to achieve the effect that I want? If so exactly what would the xml file look like? Just assume image1.jpg, image2,jpg, etc.

Thanks,
John
0
Comment
Question by:gabrielPennyback
  • 4
  • 2
6 Comments
 
LVL 22

Expert Comment

by:rascalpants
ID: 24305669
can you post a link to an example of what you want done...

also post the code that you have already written for this project, so we can see where your errors are located.



rp / ZA
0
 
LVL 1

Author Comment

by:gabrielPennyback
ID: 24307654
Here's a link to an example of what I mean: http://www.entheosweb.com/Flash/Photo_Gallery4/index.asp. You can download it but unfortunately there's no FLA file. I've attached their xml code which drives it. I've put this sort of thing together before and it's pretty straightforward, although I forget exactly what script you need in the FLA for it to work.

My flash movie is more complicated however because it has three movie clips each containing one image. Each movie clip has a FlashEff component which what creates the slide-in effect. I wouldn't have the slightest idea how to write the AS 3.0 to create the effect, it's all in the plug-in.

Here's a link: http://www.discretedata.com/navBar1/flash/AutoPartsTest1.htmlhttp://www.discretedata.com/navBar1/flash/AutoPartsTest1.html


The image is inside one movie clip (MC_1). That MC has the flashEff component assigned to it. MC_1 and its FlashEffcomponent are inside another movie clip (MC_2). What I want to do is use an xml doc to feed images into MC_1, ideally coinciding with the start of each new running of MC_1. Or if that can't be done with a time interval in the action script.

And here's a link to the FLA, although there's no script in it and you won't see anything happening without the FlashEff Panel installed: http://www.discretedata.com/navBar1/flash/AutoPartsTest1.fla

 (If you don't have it check out their website. If you can find a coupon for it, it's really worth getting: http://www.flasheff.com/)

Thanks,
John



<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<images>
    <pic>
        <image>ice1.jpg</image>
        <caption>Cheery Pie ala Mode</caption>
    </pic>
    <pic>
        <image>ice2.jpg</image>
        <caption>Ice Cream Dessert</caption>
    </pic>
    <pic>
        <image>ice3.jpg</image>
        <caption>Ice Cream Tower</caption>
    </pic>
    <pic>
        <image>ice4.jpg</image>
        <caption>Ice Cream and Raspberries</caption>
    </pic>
    <pic>
        <image>ice5.jpg</image>
        <caption>Iced Dessert </caption>
    </pic>
    
</images>

Open in new window

0
 
LVL 22

Expert Comment

by:rascalpants
ID: 24308039
I am getting a 403 forbidden error on the second link you posted....


secondly, you will need to use some other component or write your own actionscript code to have a slideshow...  but I assume most of them will include a way to load in a SWF... then you can just load those in, instead of images.


I would recommend looking at AFcomponents.com


rp / ZA



0
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
LVL 22

Expert Comment

by:rascalpants
ID: 24435588


^ bump ^
 

please come back and finish up this question...


thanks,

rp / Zone Advisor
0
 
LVL 1

Author Comment

by:gabrielPennyback
ID: 24444595
Sorry for the long delay in getting back to you. Try this link: http://www.discretedata.com/navBar1/index_beta2c.html

What I want to do is have each of the three movie clips load a different image randomly every time it recycles. I imagine that one of the first things we need to do is get rid of the embedded images and load them with actionscript. For what it's worth, here are the 3 images:
http://www.discretedata.com/navBar1/flash/images/grille.jpg
http://www.discretedata.com/navBar1/flash/images/exhaust.jpg
http://www.discretedata.com/navBar1/flash/images/wheels.jpg

IN AS2.0, I would use this script for loading: loadMovie("http://www.discretedata.com/navBar1/flash/images/grille.jpg", empty); but of course FlashEff requires 3.0, and I don't know the proper syntax in 3.0


Here is the FLA: http://www.discretedata.com/navBar1/flash/AutoPartsTest2.fla

I hope this isn't too confusing.

Thanks,
John
0
 
LVL 22

Accepted Solution

by:
rascalpants earned 500 total points
ID: 24446077
in AS 3 you use the Loader Class...

something like...

import flash.display.Loader;
import flash.net.*;

var theLoader:Loader = new Loader();
var request:URLRequest = new URLRequest("/images/grille.jpg");

theLoader.contentLoaderInfo.addEventListener( Event.INIT, on_Init );
theLoader.load( request );

addChild( theLoader );

function on_Init( evt:Event ):void
{
   trace( evt.target.name + "just loaded");
   //  do something here...  
}



now i have not confirmed that the code works, but this will get you going...  if you get an error on any of it, just goodle the reference...

rp / ZA
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question