Solved

Creating a dynamic carousel in Flash CS3

Posted on 2009-05-04
6
947 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

920 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

16 Experts available now in Live!

Get 1:1 Help Now