Solved

Creating a dynamic carousel in Flash CS3

Posted on 2009-05-04
6
934 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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
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.

708 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now