Flash MX 3D Carousel
Hi everyone,I'm new to Flash and I do not have the most recent version of the software. I've been trying to figure out how to create a 3D carousel using Flash MX (2002), but for some reason, the code does not seem to be working at all. Will Lee's tutorial work for Flash MX users? And if not, is it possible to create carousels in Flash MX? Are there any tutorials or has anyone created a code for it?Thanks in advance.
General Flash
Posted on: Wed Jan 14, 2009 11:21 pm
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Flash Carousel
Hi i need someones expert help on an issue i'm having using a flash carousel into a php website.
Heres the situation:
Flash Carousel loading images from XML file.
Works fine uploaded onto the server through a direct link.
However when I place the carousel inside the site, nothing.
The flash is called up and the blank space is visible. No images appear.
Thus far I've tried using the crossdomain.xml and had no luck at all and now its just bugging me with curiosity. I can see it being a very simple error.
Please help!
Mike
Flash Carousel
Hi.
I've made one of those cool Carousels that display items in a circular manner.
And, when i press on an item from the carousel, i want the whole carousel to rotate untill that item gets to the center of the page and in the front. Then i want it to stop. After that a window will come down displaying some text and when i press close button the window will rise.
The problem is that i can't figure it out how to make the carousel spin to the center with the item i press on and then stop.
Can someone help? Someone who is familiar with flash carousels?
Thanks a lot.
Flash 3d Carousel
I found a a free flash carousel from gotoandlearn.com but don't know how to change it so the icons link to a page? I know that doesn't make sense but go to the link below and you'll download the finished piece so you can see what it does now.
So basically I just want to make it so when the user clicks on an icon it takes them to a page.
http://www.gotoandlearn.com/files/carousel3.zip
Flash Carousel - Above And Beyond - Help
I'm working with the Flash Carousel from the video tutorals. I've extended it a bit and have been succcessfull in altering it in every aspect assigned to me except for two things:
1. Having the Carousel rotate from icon to icon uppon button press (almost if it was a navigation menu)
2. When clicking on an icon (or category as I've come to call it basied on my project) the image will swap to another called from the XML (I'm thinking of calling the "alternate image" to load when the XML is loaded but have it enter with the alpha at 0. Then when clicked on I can have the alpha's of both images swap from 0 - 100 and vise versa. Not too hard to do but will increase the overall loading time a bit).
Successfull alterations:
- Given the carousel a "No Rotate Zone" from the center of the stage.
- Made images blur and fade based uppon their "y" position in the carousel.
- Called external flash movie "category.swf" when clicking on an icon / category and dynamically populating the flash with 5 icons evenly spaced accross the stage to act as "sub-categories" basically these are product images and details.
- Given liks to categorys & specific products, details, and links all populated by the XML
I've included everything in the zip. Running the html file will start everything as I have it thus far (obviously you need to extract all the files so the pathing will be correct to the images, xml, and swf files). I've just completed one category thus far for testing since all other categories work the same way. It's the image with the stroller but it's called "Teens".
Thank you in advanced and any help would be GREATLY appreciated!
Flash 3d Carousel
Hi, I did the flash 3d carousel tutorials I think its really great and I enjoy all the
tutorials. I was wondering how I can put an object or pic in the middle
and have my 3d carousel move around it right now you can see the objects Thur it.
is this possible... i would really appropriate some help.
i have uploaded all the files... in zip format
thank you
al
Flash Carousel 2
is there a way to set this up so when you click on one of the items in your carousel it links you to another page???
thanks in advance....
Some Flash Carousel Help
I wanted to know if instead of the pictures tweening to the corner of the text box there was a way to make it tween to the center of the page.
[F8] Flash Carousel Could Not Play On Web
Hello all, I would be glad for getting help from anyone. I created a carousel , uploaded and wanted to use the link on my website and my myspace site, but it could not show up at all ... its all white ... could someone help me out!!!!
this is the link to the upload.... http://www.quext.com/DLpro/carousel_Final.swf
thanks,
Collins.
Flash Carousel As Seen On Tv.com Of Cnet.com
Hi!
I'm trying to create a, I guess you could call it, carousel, much like the one on tv.com, but I need som kind of tutorials of code examples to be able to pull it off. Links anyone?
help would be much appriciated!!
Help Modifying Flash Carousel
I downloaded a carousel from flashmo.com
Im no flash expert. All i need to change is that when you click on a thumbnail the link opens up in a new window.
This is the actionscript:
Code:
// Code Credit: Lee Brimelow
// Tutorial Reference URL: www.gotoandlearn.com
// Modified by www.flashmo.com
stop();
// total is length of label_list OR link_list
// OR total frames inside "flashmo thumbnails"
var total:Number = 16;
// length of label_list array and length of link_list array must be equal
// to length of frames inside "flashmo thumbnails" movieclip
var label_list:Array = new Array( "Print Work", "Lindberg Belts webpage", "Platinum Spa webpage", "Hercules Auto Parts webpage", "Vividxenons webpage", "VividXenons Custom Ebay Marketing Template" , "Web work", "John Abbott College Vernissage Trade fair flyer", "custom invitation", "Elite Party Bus promo flyer", "Custom Water bottle Labels", "Custom Water bottle Labels", "Golden Paradise Casino Logo creation", "Hercules Auto Parts custom return form", "Lindberg Belts double sided Matte style business card", "Mebu double sided glossy business card");
var link_list:Array = new Array("Print Work", "http://www.lindbergbelts.com", "https://jag-designs.sslpowered.com/platinumspa.com/index.html", "http://www.herculesautoparts.ca", "http://www.vividxenons.com", "http://vividxenons.com/ebay/index.html", "http://pearlwhitemedia.com/portfolio/JohnAbbottflyer.jpg", "http://pearlwhitemedia.com/portfolio/card.jpg", "http://pearlwhitemedia.com/portfolio/elitepartybusflyer.jpg", "http://pearlwhitemedia.com/portfolio/waterbottlelabels1.pdf", "http://pearlwhitemedia.com/portfolio/waterbottlelabels2.pdf", "http://pearlwhitemedia.com/portfolio/goldenparadiselogo.jpg", "http://pearlwhitemedia.com/portfolio/herculesautopartsform.jpg", "http://pearlwhitemedia.com/portfolio/lindbergcard.JPG", "http://pearlwhitemedia.com/portfolio/mebucard.JPG");
var radiusX:Number = 330;
var radiusY:Number = 90;
var centerX:Number = 400;
var centerY:Number = 140;
var speed:Number = 0.003;
tn_group_mc._visible = false;
info.text = ""; fm_label.text = "";
for( var i = 0; i < total; i++)
{
var t = tn_group_mc.duplicateMovieClip("tn"+i, i);
t.tn_mc.gotoAndStop(i+1); t.tn_shadow_mc.gotoAndStop(i+1);
t.fm_label = label_list[i];
t.fm_url = link_list[i];
t.angle = i * ((Math.PI*2)/total);
t.onEnterFrame = mover;
t.fm_button.onRollOver = function()
{
fm_label.text = "Title: " + this._parent.fm_label;
info.text = "URL: " + this._parent.fm_url;
}
t.fm_button.onRollOut = function()
{
info.text = ""; fm_label.text = "";
}
t.fm_button.onRelease = function()
{
getURL( this._parent.fm_url );
}
}
function mover()
{
this._x = Math.cos(this.angle) * radiusX + centerX;
this._y = Math.sin(this.angle) * radiusY + centerY;
var s = this._y /(centerY+radiusY);
this._xscale = this._yscale = s*100;
this.angle += this._parent.speed;
this.swapDepths(Math.round(this._xscale) + 100);
}
this.onMouseMove = function()
{
speed = (this._xmouse-centerX) * 0.0001;
}
Any ideas?
Flash Carousel Menu
hi i am new comer in this thread
please help me for the circular carousel menu i am getting problems how to do it!
Modifying A Flash Carousel
Hi guys! I'm not new to flash but this is one of my first attempts with actionscript so bare with me a bit.
The code below is for a carousel I've managed to create from a combination of online tutorials. Basically there are 5 images that rotate as you'd expect it to do in a carousel. But something I added is, when you hover over one of the pictures it changes to another picture. For example, an angry face is rotating and when you hover on it, it changes to a happy face.
All this works fine, but what I want to do now is to make the angry face change to a happy face automatically once it rotates to between the 5 and 7 o'clock position. Once past this position it changes back to an angry face. Any help will be appreciated.
Thanks!
Actionscript Code:
var numOfBalls:Number = 5;
var radiusX:Number = 350;
var radiusY:Number = 160;
var centerX:Number = Stage.width / 2;
var centerY:Number = Stage.height / 2;
var speed:Number = 0.005;
for(var i=0;i<numOfBalls;i++)
{
var t = this.attachMovie("face"+i,"b"+i,i+1);
t.angle = i * ((Math.PI*2)/numOfBalls);
t.onEnterFrame = mover;
}
function mover()
{
this._x = Math.cos(this.angle) * radiusX + centerX;
this._y = Math.sin(this.angle) * radiusY + centerY;
var s = this._y /(centerY+radiusY);
this._xscale = this._yscale = s*100;
this.angle += this._parent.speed;
this.swapDepths(Math.round(this._xscale) + 100);
}
this.onMouseMove = function()
{
speed = (this._xmouse-centerX)/30000;
}
Flash Carousel Using A Database
Hi guys,
I'm just starting to learn Flash CS3... And did the tutorial on Lee's Flash Carousel (wow)!
I wanted to create something similar to this, but the carousel to contain a whole heap of books and when you click the book enlarges (comes forward) and info is displayed about the book... i.e. Summary, Price, Date Published, Publishers Website. I have 35 books I want to use so it's going to be pretty big, I thought about doing this in XML but all the info about each book could get really messy. Would the advisable thing to do be to use PHP and a MySQL database? If so could anyone give me some pointer of doing this in CS3?
Thanks all in advance!
Carousel-Like Flash Navigation
Hello,
I am currently working on a project that requires me to build a navigation system using Flash. Now I usually work on CMS systems and Flash isn't really my bag so you will have to bear with me on this!
The requirement itself is quite easy, build a carousel-like flash animation that looks like the image below..
The idea is that when the user moves their mouse to the right of the images they cycle right and when the user moves their mouse the the left they cycle left.
I have done quite a bit with flash in the past but just little bits and pieces here and there, however, I do remember one project whereby I drew a line that a particular object followed, motion guide perhaps? I don't know if this is the correct way to look at this but an help that you guys can provide would be great.
Thanks in advance!
[CS3] Add Left/right Arrows To Flash Xml Carousel
Hi,
I have added a flash carousel to a client website. they now require it to also have left and right buttons. As my flash knowledge is limited and i downloaded the template i am unsure how to add these in. would anyone know how i can amend the flash file or actionscript code to include these images??
Thanks
// Below is the action script contained in the flash file. If you require anything else just ask.
stop();
var folder:String = "folder_location/";// a folder for thumbnail files + an XML file
var total:Number;
var radiusX:Number = 250;
var radiusY:Number = 30;
var centerX:Number = 310;
var centerY:Number = 100;
var speed:Number = 0.005;
tn_group_mc._visible = false;
fm_label.text = ""; fm_url.text = "";
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = function()
{
var nodes = this.firstChild.childNodes;
total = nodes.length;
for( var i=0; i < total; i++)
{
var t = tn_group_mc.duplicateMovieClip("tn"+i, i);
t.angle = i * ((Math.PI*2)/total);
t.onEnterFrame = mover;
t.tn_mc.inner.loadMovie( nodes[i].attributes.filename );
t.tn_reflection_mc.inner.loadMovie( nodes[i].attributes.filename );
t.fm_label = nodes[i].attributes.label;
t.fm_url = nodes[i].attributes.url;
t.fm_button.onRollOver = function()
{
fm_label.text = this._parent.fm_label;
}
t.fm_button.onRollOut = function()
{
fm_label.text = " "
}
t.fm_button.onRelease = function()
{
getURL(this._parent.fm_url);
}
}
}
d = new Date();
// always an unique number
kill = d.getTime();
xml.load(folder + "15.htm?kill="+kill);
function mover()
{
this._x = Math.cos(this.angle) * radiusX + centerX;
this._y = Math.sin(this.angle) * radiusY + centerY;
var s = this._y /(centerY+radiusY);
this._xscale = this._yscale = s*100;
this.angle += this._parent.speed;
this.swapDepths(Math.round(this._xscale) + 100);
}
this.onMouseMove = function()
{
speed = (this._xmouse-centerX) * 0.0001;
}
SwapDepths Problem With Flash Carousel
Hi
I've just completed a great video tutorial from http://www.gotoandlearn.com/ and have now made my own carousel, but it has one problem. The mc's do not swap depths properly which kinda kills the whole illusion...
here's my code,
Code:
var numOfItems:Number = 10;
var radiusX:Number = 250;
var radiusY:Number = 75;
var centerX:Number = Stage.width/2;
var centerY:Number = Stage.height/2;
var speed:Number = 0.05;
for(var i=0;i<numOfItems;i++) {
var t = this.attachMovie("item","item"+1, i+1);
t.angle = i * ((Math.PI*2)/numOfItems);
t.onEnterFrame = mover;
}
function mover() {
this._x = Math.cos(this.angle) * radiusX + centerX;
this._y = Math.sin(this.angle) * radiusY + centerY;
var s:Number = this._y / (centerY+radiusY);
this._xscale = this._yscale = s * 100;
this.angle += this._parent.speed;
this.swapDepths(Math.round(this._xscale)+100);
}
this.onMouseMove = function() {
speed = (this._xmouse-centerX)/9000;
}
my stage is 1000 x 1000
the mc's flash back and forward when they overlap at the edges of the carousel.
any ideas what's going wrong?
Cheers for your help
Steve
Best Practices - Flash Image Carousel
When creating an image Carousel in flash for a web page, what are the best practices for loading quickly and changing images?
So for instance, on an ecommerce site, the home page often has a block created in flash in which 4-6 images are included with arrows or image numbers are displayed at the bottom as buttons. The images automatically change to the next ever x seconds unless the user selects an image number or the forward/back arrows.
Obviously, smaller the image the better. But how about best practices for things like:
Do you include one image in the block and then load dynamically the other images? Should all images be dynamically loaded if you want to change them on a daily/weekly basis? Any suggestions for making sure the images, especially the first one is loaded quickly?
Anyone have sample ~gpl code that demonstrates a block like this?
Two examples - kohls.com, jcrew.com
Flash Carousel..(adding Swf's Instead Of Text)
I need help, I completed the carousel tutorial with no problems, only now I want to create a site based around this idea, but I'm having problems figuring out how to put in actual content like an individual SWF, or a movie clip rather than the Text box ....Help!!!
Problems With Flash-based Carousel
I made some progress with a basic "spinning" carousel of items (which works a treat using just shapes created within Flash 8) but seem to have hit a few issues when stepping up to grabbing images via an external XML file- I'll try and explain the problem...
Each of the carousel items needs to grab a different file (at present I'm trying to test with images but in time these will be FLV video files).
The carousel is based on the ones demo'd at www.gotoandlearn.com. I followed the second of the tutorials and have got to the point where I've created a movie clip inside a movie clip inside a movie clip (required for the carousel) and have the accompanying ActionScript working, however when I preview the SWF file I only see the "filler shape" of the innermost movie clip, not the image file (.png) that it's supposed to contain.
The three movie clips are called item (the outermost), icon (inside item) and inner (the innermost). The outermost one ("item") is the one set to "export to ActionScript".
The images are grabbed from an XML file. The ActionScript is as follows:
Code:
var numOfItems:Number; //don't declare yet as number of items will be read from XML
var radiusX:Number = 250;
var radiusY:Number = 75;
var centerX:Number = Stage.width/2;
var centerY:Number = Stage.height/2;
var speed:Number = 0.05;
var perspective:Number = 130; //skew the perspective so items further back are smaller
var home:MovieClip = this; //create variable to be used inside the XML for loop later as we can't use "this" inside that loop
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = function()
{
var nodes = this.firstChild.childNodes; //i.e the XML file hierarchy
numOfItems = nodes.length;
for (var i=0;i<numOfItems;i++)
{
var t = home.attachMovie("item","item"+i,i+1);
t.angle = i * ((Math.PI*2)/numOfItems);
t.onEnterFrame = mover;
t.icon.inner.loadMovie (nodes[i].attributes.image); //load the image files
}
}
for (var i=0;i<numOfItems;i++)
{
var t = this.attachMovie("item","item"+i,i+1);
t.angle = i * ((Math.PI*2)/numOfItems);
t.onEnterFrame = mover;
}
xml.load("icons.xml");
function mover ()
{
this._x = Math.cos(this.angle) * radiusX + centerX;
this._y = Math.sin(this.angle) * radiusY + centerY;
var s:Number = (this._y - perspective)/(centerY + radiusY - perspective); //add the new perspective variable to the calculation
this._xscale = this._yscale = s * 100;
this.angle += this._parent.speed;
this.swapDepths(Math.round(this._xscale)+100);
}
this.onMouseMove = function()
{
speed = (this._xmouse-centerX)/2000;
}
The XML file:
<?xml version="1.0" encoding="iso-8859-1"?>
<icons>
<icon image="icon1.png" />
<icon image="icon2.png" />
</icons>
The XML file seems to be read (to a degree) by the ActionScript, because if I had a new "icon" item, the carousel "grows" another item accordingly (although as before, it only displays the background shape of the image "placeholder" movie clip).
Amyone got any ideas? I really need to get this sorted in the next week or so!
Help ... Carousel With Fixed Positions Ideas, Using Flash 8
Hy guys, i'm having a really big problem with a carousel, i started working with the base being a tutorial on gotoandlearn on "Creating 3D Carousels". It works fine as a carousel but i need it to look always the same no matter how manny images i load ... i need it exactly like this
.. this is my carousel with 15 images loaded, but if load 10 i get this
or if i load 20 i get this
.. this where all done with a radius of 280 and the images in the back are not visible;.I've tried calculating the radius by the number of images but it's still not great looking
with 10
.. with 15
an finally with 20
In the first example i calculate the speed like this speedValue = (360/numOf)/2, i need like that so i can allways center on 270 degrees ... the pozitions like this
mc._y = centerY - mc._height/3;
mc._x = centerX + Math.cos((mc.angle) / 180 * Math.PI)*radiusX - mc._width/2;
end the scale like this mc._xscale=mc._yscale=360-mc.angle+10; or mc._xscale=mc._yscale=mc.angle-180 + 10; depending on the angle
In the second example i added this radiusX=numOf*22;
....
can anyone help with an idee some code whatever , and sorry for my bad english
PROBLEMS LOADING FLASH CAROUSEL INTO DREAMWEAVER
... dear all, I have loaded the SWF file of the carousel into dreamweaver, however, its just the black background that shows up when i test movie - I am sure that it's got something to do with the XML file (as it holds all the images) - PNG files have also been put in the dreamweaver root folder too. The carousel works fine in Flash (nothing wrong there) ... help much appreciated
Flash Carousel- Amending To Include New Text?
Hi, I've created a carousel of items using (initially) the tutorials from gotoandlearn.com, and then also the modified version here:
http://www.box.net/public/6rhb01kcja
- which was posted in another link.
This modified code allows you to click on one of the carousel items, which then brings up a new screen that plays an SWF file (specified in the accompanying XML file). Meanwhile the carousel item moves to one side.
What I need is for that carousel item to also have on it some text along the lines of "Click here to return to the carousel of videos" or similar. However I can't see a way of doing this within the ActionScript- has anyone got any ideas?
This is the current ActionScript for my carousel:
Code:
import mx.utils.Delegate;
//transitions for icon tween
import mx.transitions.Tween;
import mx.transitions.easing.*;
var numOfItems:Number;
var radiusX:Number = 300;
var radiusY:Number = 75;
var centerX:Number = Stage.width/2;
var centerY:Number = (Stage.height/2.6);
var speed:Number = 0.05;
var perspective:Number = 130;
var home:MovieClip = this;
//text field invisible at startup
myLoader._alpha = 0;
var tooltip:MovieClip = this.attachMovie ("tooltip","tooltip",10000)
tooltip._alpha = 0;
var xml:XML = new XML ();
xml.ignoreWhite = true;
xml.onLoad = function ()
{
var nodes = this.firstChild.childNodes;
numOfItems = nodes.length;
trace(numOfItems);
for (var i=0;i<numOfItems;i++)
{
var t = home.attachMovie ("item", "item"+i, i+1);
t.angle = i * ((Math.PI*2)/numOfItems);
t.onEnterFrame = mover;
//attributes called from XML
t.toolText = nodes[i].attributes.tooltip;
t.movie = nodes[i].attributes.movie;
//t.content = nodes[i].attributes.content;
//t.loadClip = nodes [i].attributes.movie;
//t.myLoader = nodes[i].attributes.movie;
//t.loadMovie = nodes[i].attributes.movie;
//t.myLoader.loadMovie = nodes[i].attributes.movie;
//t.movieClip = nodes[i].attributes.movie;
//t.myLoader.loadMovie = nodes[i].attributes.movie;
//t.page = nodes[i].attributes.movie;
t.icon.inner.loadMovie (nodes [i].attributes.image);
t.ref.inner.loadMovie (nodes [i].attributes.image);
t.icon.onRollOver = over;
t.icon.onRollOut = out;
t.icon.onRelease = released;
}
}
function over ()
{
home.tooltip.tipText.text = this._parent.toolText;
home.tooltip._x = this._parent._x;
home.tooltip._y = this._parent._y - this._parent._height/2;
home.tooltip.onEnterFrame = Delegate.create (this,moveTip);
home.tooltip._alpha = 100;
}
function out ()
{
delete home.tooltip.onEnterFrame;
home.tooltip._alpha = 0;
}
function released ()
{
home.tooltip._alpha = 0;
for (var i=0;i<numOfItems;i++)
{
//var to refer to icons in carousel
var t:MovieClip = home["item"+i]
t.xPos = t._x;
t.yPos = t._y;
t.theScale = t._xscale;
//undo icon properties when fired
delete t.icon.onRollOver;
delete t.icon.onRollOut;
delete t.icon.onRelease;
delete t.onEnterFrame;
//if statement to animated selected icon in a different way to all other items
if (t != this._parent)
{
var tw:Tween = new Tween (t,"_xscale",Strong.easeOut,t._xscale,0,1,true);
var tw2:Tween = new Tween (t,"_yscale",Strong.easeOut,t._yscale,0,1,true);
var tw3:Tween = new Tween (t,"_alpha",Strong.easeOut,100,0,1,true);
}
else
{
var tw:Tween = new Tween (t,"_xscale",Strong.easeOut,t._xscale,100,1,true);
var tw2:Tween = new Tween (t,"_yscale",Strong.easeOut,t._yscale,100,1,true);
//Next 2 lines determine where the carousel item moves to when clicked and the video plays
var tw3:Tween = new Tween (t,"_x",Strong.easeOut,t._x,40,1,true);
var tw4:Tween = new Tween (t,"_y",Strong.easeOut,t._y,207,1,true);
var tw5:Tween = new Tween (myLoader,"_alpha",Strong.easeOut,0,100,1,true);
//theText.text = t.content;
//mcLoader.loadClip(t.page ,myLoader);
//myLoader.loadMovie = t.page;
//myLoader.movieClip = t.movie;
//myLoader.loadMovie = t.loadMovie;
myLoader.loadMovie(t.movie);
var s:Object = this;
tw.onMotionStopped = function()
{
s.onRelease = unReleased;
}
}
}
}
function unReleased()
{
delete this.onRelease;
var tw:Tween = new Tween (theText,"_alpha",Strong.easeOut,100,0,0.5,true);
var tw2:Tween = new Tween (scroller,"_alpha",Strong.easeOut,100,0,0.5,true);
for (var i=0;i<numOfItems;i++)
{
var t:MovieClip = home["item"+i]
myLoader.unloadMovie();
if (t != this._parent)
{
var tw:Tween = new Tween (t,"_xscale",Strong.easeOut,0,t.theScale,1,true);
var tw2:Tween = new Tween (t,"_yscale",Strong.easeOut,0,t.theScale,1,true);
var tw3:Tween = new Tween (t,"_alpha",Strong.easeOut,0,100,1,true);
}
else
{
var tw:Tween = new Tween (t,"_xscale",Strong.easeOut,100,t.theScale,1,true);
var tw2:Tween = new Tween (t,"_yscale",Strong.easeOut,100,t.theScale,1,true);
var tw3:Tween = new Tween (t,"_x",Strong.easeOut,t._x,t.xPos,1,true);
var tw4:Tween = new Tween (t,"_y",Strong.easeOut,t._y,t.yPos,1,true);
tw.onMotionStopped = function()
{
for (var i=0;i<numOfItems;i++)
{
var t:MovieClip = home["item"+i]
t.icon.onRollOver = Delegate.create (t.icon,over);
t.icon.onRollOut= Delegate.create (t.icon,out);
t.icon.onRelease= Delegate.create (t.icon,released);
t.onEnterFrame = mover;
}
}
}
}
}
function moveTip ()
{
home.tooltip._x = this._parent._x;
home.tooltip._y = this._parent._y - this._parent._height/2;
}
xml.load ("icons.xml");
for (var i=0;i<numOfItems;i++)
{
var t = this.attachMovie ("item", "item"+i, i+1);
t.angle = i * ((Math.PI*2)/numOfItems);
t.onEnterFrame = mover;
}
function mover ()
{
this._x = Math.cos (this.angle) * radiusX + centerX;
this._y = Math.sin (this.angle) * radiusY + centerY;
var s:Number = (this._y-perspective) / (centerY+radiusY-perspective);
this._xscale = this._yscale = s * 100;
this.angle += this._parent.speed;
this.swapDepths (Math.round (this._xscale) + 100);
}
this.onMouseMove = function()
{
speed = (this._xmouse-centerX)/2500;
}
This is the XML file:
(at present I'm just testing with a single image and SWF but obviously different ones will eventually be used)
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<icons>
<icons image="iconbigger01.png" tooltip="Customer" movie="mov01059.swf" />
<icons image="iconbigger02.png" tooltip="Customer" movie="mov01059.swf" />
<icons image="iconbigger03.png" tooltip="Customer" movie="mov01059.swf" />
<icons image="iconbigger04.png" tooltip="Customer" movie="mov01059.swf" />
<icons image="iconbigger05.png" tooltip="Customer" movie="mov01059.swf" />
<icons image="iconbigger06.png" tooltip="Customer" movie="mov01059.swf" />
<icons image="iconbigger07.png" tooltip="Customer" movie="mov01059.swf" />
<icons image="iconbigger08.png" tooltip="Customer" movie="mov01059.swf" />
<icons image="iconbigger09.png" tooltip="Customer" movie="mov01059.swf" />
<icons image="iconbigger10.png" tooltip="Customer" movie="mov01059.swf" />
</icons>
[edited by admin: Use code tags!]
Carousel Icons Not Showing Up When Flash File Added To Html
Hi there.
I am not new to html or flash but, some what new to XML. I created a carousel based off the tutorials and it works great on my computer but, when I create an html file and attach the .swf file the flash file loads but, the icon images or anything from the .xml file doesn't appear.
This is what I use to load my .swf file :
<div id="spacer">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="900" height="726">
<param name="movie" value="carousel/carouselallinkfinal.swf">
<param name="quality" value="high">
<embed src="carousel/carouselallinkfinal.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="900" height="726"></embed>
</object>
</div>
Any ideas why this is happening? Do I have to put a special script in the html document for it to be able to see the xml file?
Really need your help. This is for a deadline that I have to accomplish by end of this week.
Carousel Help
i am creating a Carousel effect (found here: www.gotoandlearn.com), but am not implementing any mouse interaction with it, it is a straight forward loop. i need help in two areas.
Code:
var numOfBalls:Number = 3;
var radiusX:Number = 375;
var radiusY:Number = 100;
var centerX:Number = 400;
var centerY:Number = 400;
var speed:Number = 0.005;
for(var i=0;i<numOfBalls;i++)
{
var t = this.attachMovie("ball_3","b"+i,i+1);
t.angle = i * ((Math.PI*2)/numOfBalls);
t.onEnterFrame = mover;
}
function mover()
{
this._x = Math.cos(this.angle) * radiusX + centerX;
this._y = Math.sin(this.angle) * radiusY + centerY;
var s = this._y /(centerY+radiusY);
this._xscale = this._yscale = s*100;
this.angle += this._parent.speed;
this.swapDepths(Math.round(this._xscale) + 100);
}
Q1: How would i go about inserting 3 DIFFERENT library objects (ie ball_1, ball_2, ball_3)?
Q2: Is it possble to make the objects pause at the front for a short period of time?
thanks for ANY help i can get on this. i am not a pro-actionscripter by any definition of the word, but i AM learning.
i can attach a sample file if you like.
Could Someone Please Help With Carousel
hey, i have downloaded this free carousel:
http://www.flashmo.com/preview/flashmo_056_carousel
i have customized it all fine with the way i would like it,
however, when clicking on a different button to go to a different frame, the initial frame that loads the icons and text in, still shows up on all frames, yet it is only on one frame,
Can anyone help me to unload or remove it so that it only loads once on that frame i put it on>?
im fairly new to flash so sorry if im stupid
thanks heaps,
here is the action script, it's 2.0
Code:
stop();
var total:Number = 6;
var label_list:Array = new Array( "1", "2", "3", "4", "5");
var radiusX:Number = 300;
var radiusY:Number = 70;
var centerX:Number = 400;
var centerY:Number = 110;
var speed:Number = 0.005;
tn_group_mc._visible = false;
info.text = ""; fm_label.text = "";
this._y = centerY + 230;
this._x = centerX - 400;
fm_label._y = centerY + 270;
fm_label._x = centerX - 340;
for( var i = 0; i < total; i++)
{
var t = tn_group_mc.duplicateMovieClip("tn"+i, i);
t.tn_mc.gotoAndStop(i+1); t.tn_shadow_mc.gotoAndStop(i+1);
t.fm_label = label_list[i];
t.angle = i * ((Math.PI*2)/total);
t.onEnterFrame = mover;
t.tn_mc.onRollOver = function()
{
fm_label.text =this._parent.fm_label;
}
t.tn_mc.onRollOut = function()
{
info.text = ""; fm_label.text = "";
}
}
function mover()
{
this._x = Math.cos(this.angle) * radiusX + centerX;
this._y = Math.sin(this.angle) * radiusY + centerY;
var s = this._y /(centerY+radiusY);
this._xscale = this._yscale = s*130;
this.angle += this._parent.speed;
this.swapDepths(Math.round(this._xscale) + 100);
}
this.onMouseMove = function()
{
speed = (this._xmouse-centerX) * 0.0001;
}
PLEASE HELP ME IT"S URGENT
2D Carousel
Right, I'm needing some help here folks, basically I'm setting up a website and I would like a sliding window effect in flash as part of the navigation in one area.
This is the idea http://www.htc.com/www/product.aspx
So far It's nearly working perfectly using some code from another project but it needs tweaked, I've looked Google to see about X/Y coordinates etc but can't find the right code or even know what to look for.
Basically the page consists of 2 arrows one on the right and one on the left, these slide pages from right to left or left to right depending on the arrow clicked. Unfortunately the code I'm using relied on 4 buttons to change the X Coordinates to slide the windows into place under the masked area. I now only have two buttons to do the same job and they only let me go between page 1 & 2, so I don't want to specify coordinates but rather add/subract to/from the current coordinates to get to the next/last window.
Anyone able to help me out or point me towards a tutorial?
Here is the code:
onClipEvent (load) {
_x = 0;
_y = 0;
spd = 4;
}
onClipEvent (enterFrame) {
_x += (endX-_x)/spd;
_y += (endY-_y)/spd;
_root.leftclick.onRelease = function() {
endX = 0;
endY = 0;
};
_root.rightclick.onRelease = function() {
endX = -800;
endY = 0;
}
}
Thanks in advance
Carousel
I'm working on a simple 3d carousel, reading from an xml file, but i cannot get the text tags that pop above the pictures to rotate with the items in the carousel. I'm following a tutorial based on MX, and believe it might be a problem with the mx.utils.Delegate function that i'm importing. help a brother out...
the function that is not working, as well as the code concerning delegation are bolded below, everything else is functioning properly.
Code:
import mx.utils.Delegate;
var numOfItems:Number = 10;
var radiusX:Number = 250;
var radiusY:Number = 75;
var centerX:Number = Stage.width/2 - 35
var centerY:Number = Stage.height/2
var speed:Number = 0.02;
var perspective:Number = 0;
var home:MovieClip = this;
var tooltip:MovieClip = this.attachMovie("tooltip","tooltip",10000);
tooltip._alpha = 0;
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = function()
{
var nodes = this.firstChild.childNodes;
numofItems = nodes.length;
for(var i=0;i<numOfItems;i++)
{
var t = home.attachMovie("item","item"+i,i+1);
t.angle = i * ((Math.PI*2) / numOfItems);
t.onEnterFrame = mover;
t.tooltext = nodes[i].attributes.tooltip;
t.icon.inner.loadMovie(nodes[i].attributes.image);
t.reflection.inner.loadMovie(nodes[i].attributes.image);
t.icon.onRollOver = over;
t.icon.onRollOut = out;
}
}
function over()
{
home.tooltip.tipText.text = this._parent.tooltext;
home.tooltip._x = this._parent._x;
home.tooltip._y = this._parent._y - this._parent._height/2;
home.tooltip.onEnterFrame = Delegate.create(this.moveTip);
home.tooltip._alpha = 100;
}
function out()
{
delete home.tooltip.onEnterFrame;
home.tooltip._alpha = 0;
}
function moveTip()
{
home.tooltip._x = this._parent._x;
home.tooltip._y = this._parent._y - this._parent._height/2;
}
xml.load("icons.xml");
function mover()
{
this._x = Math.cos(this.angle) * radiusX + centerX;
this._y = Math.sin(this.angle) * radiusY + centerY;
var s:Number = (this._y - perspective) / (centerY + radiusY - perspective);
this._xscale = this._yscale = s * 100;
this.angle += this._parent.speed;
this.swapDepths(Math.round(this._xscale + 100));
}
this.onMouseMove = function() {
speed = (this._xmouse - centerX) /3500;
}
Carousel
hi all,
I've built up a carousel from Lee's tutorial. What he has done is he's fetching images from an XML file and when you click on a thumbnail it shows up the details.
Instead of this I want to fetching images by passing a query to the swf file.
eg:carousel.swf?pic1=1.jpg&pic2=2.jpg&... and so on. And when you click on a thumbnail instead of showing up the details I want to direct it to it's corresponding page.
Please download the source files.
Dowload the source files
Your help is highly appreciated.
Thanks very much.
Regards,
Soulfly
Carousel...
Hi!
I'm trying to make a vertical carousel and another horizontal working at the same time.
I've followed a tutorial on the net and now it works horizontally with this code:
import mx.utils.Delegate;
var numOfItems:Number;
var radiusX:Number = 300;
var radiusY:Number = 50;
var centerX:Number = Stage.width/2;
var centerY:Number = Stage.height/2;
var speed:Number = 0.05;
var perspective:Number = 50;
var home:MovieClip = this;
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = function() {
var nodes = this.firstChild.childNodes;
numOfItems = nodes.length;
for (var i = 0; i<numOfItems; i++) {
var t = home.attachMovie("item","item"+i,i+1);
t.angle = i*((Math.PI*2)/numOfItems);
t.onEnterFrame = mover;
t.icon.inner.loadMovie(nodes[i].attributes.image);
t.r.inner.loadMovie(nodes[i].attributes.image);
t.icon.onRollOver = over;
t.icon.onRollOut = out;
t.icon.onRelease = released;
}
};
xml.load("icons.xml");
function mover() {
this._x = Math.cos(this.angle)*radiusX+centerX;
this._y = Math.sin(this.angle)*radiusY+centerY;
var s = (this._y-perspective)/(centerY+radiusY-perspective);
this._xscale = this._yscale=s*100;
this.angle += this._parent.speed;
this.swapDepths(Math.round(this._xscale)+100);
}
this.onMouseMove = function() {
speed = (this._xmouse-centerX)/8000;
};
When I change X and x for Y and y it works on vertical and it's ok.
The problem is that I can't put both of them working together at the same time...what is the problem? I was thinking that probably was because of the var home:MovieClip = this;but I don't know how to solve it.
Thanks a lot.
3D Carousel Bug?
http://www.celestrialrealms.com/indextest.html
The FACTIONS link.
Why's the <item> movieclip appearing for an instant in the upper left?
Code:
var numOfItems:Number = 4;
var radiusX:Number = 210;
var radiusY:Number = 156;
var centerX:Number = 420;
var centerY:Number = 313;
var speed:Number = 0.05;
var perspective:Number = 200;
for (var i=0;i<numOfItems;i++)
{
var t=this.attachMovie("item","item"+i,i+1);
t.angle=i*((Math.PI*2)/numOfItems);
t.onEnterFrame = mover;
}
function mover()
{
this._x = Math.cos(this.angle) * radiusX + centerX;
this._y = Math.sin(this.angle) * radiusY + centerY;
var s:Number = (this._y - perspective) / (radiusY + centerY-perspective);
this._xscale = this._yscale = this._alpha = s * 100;
this.angle += this._parent.speed;
this.swapDepths(Math.round(this._xscale)+100);
}
The carousel is an external swf being loading into an empty movieclip.
Help
Carousel
Hello. Im trying to make a carouse for my website, in that carousel i want a picture in the middle and the icons around it to move in a way that they look 3d, meaning they never show the side but only the front. I am using the code from other carousel but that carousel when the icons are in the far right or far left turn and show the sides and look like plain pictures. How can i make them 3d? this is part of the code, i think this is what makes the carousel, i will appreciate a lot your help. Thanks!
// user transforms
if (pressv!=0) {
this.panel+=pressv;
pressv=pressv*.9;
if ((pressv<.2) && (pressv>-.2)) {
pressv=0;
}
}
// 3d transforms
theta+=_parent.speed;
xbit=Math.sin(Math.PI/180 * theta);
ybit=Math.cos(Math.PI/180 * theta);
this._xscale=ybit*this.panel;
this._x=xbit*this.radius;
this._alpha=20+(ybit+1)*50;
this._yscale=this.panel+ybit*1;
stack=Math.round((ybit+1)*radius*.5);
if (stack==100) {
stack=100;
}
this.swapDepths(stack);
Carousel
I have a photo scroller built with CS3 and actionscript. It uses XML to load images for the thumb-scroll portion. I'd like to know if there is a quick fix to make the picstrip seem to a carousel - in other words, the strip would just continue to scroll whether you moused left or right.
Another Carousel
Here
For a client, added distance blur, enhanced reflections, blah etc. Recently updated to use similar code from gotoandlearn, since that carousel was moderately better written than mine *ouch* in some parts, particularly the onEnterFrame model (hence it's about 50% faster too)
Reckon it's too fast? Tell me how badly this needs a stabbin'
PS. It's not actually this size in the clients interface, this merely shows that it's totally vector.
Carousel Help
Hello,
I've been working with the carousel tutorial from gotoAndLearn(). I understand the math after a lot of effort not being a programmer, but I still need help. Instead of the default continuous scrolling of the icons dependent on the mouse position, I want a button navigation system to move through each icon. So the bottom arrow buttons on the attached .fla would navigate and scroll each icon one at a time (each click). Any ideas on how to do this? thanks in advance
Carousel Help
Hello all!
I'm hoping you can help me out. I've done a carousel tutorial and everything is working fine except that I'm playing with the depth. And now one of my movies which is supposed to work, comes out below the other... see here for example go to Articles:
http://www.africandancelady.com
Can anyone help with it and tell me how to make the depht of the object come forward over the other?
Any help would be greatly appreciated! Thanks
Carousel Help
One request, I just want to know how to put an object in the center of this so it truly looks 3D. Right now, I've only figured out how to put the object either in front of or behind the carousel. Any advice would be great, thanks.
As well, if anyone has any input for things to make the carousel more unique, I'm open for suggestions. This script has been making the rounds on the web, it's useful, but I want to push it further. I'm just not very good with AS yet...
AS3 Carousel Help
Hi,
I have been doing the carousel tutorial by Lee Brimelow from gotoAndLearn.com, but have been trying to convert it to AS3.
I have gotten stuck and am hoping someone can help me out.
The problem is I'm trying to place four instances of the clip "item" onto the carousel, four of them are there but they are all in the same position.
you can see the swf and source fla here:
http://www.thelightdivided.co.uk/flash/index.html
http://www.thelightdivided.co.uk/flash/carousel.fla
The code I have so far is:
var numOfItems:Number = 4;
var radiusX:Number = 200;
var radiusY:Number = 50;
var centerX:Number = this.stage.stageWidth / 2;
var centerY:Number = this.stage.stageHeight / 2;
var speed:Number = 0.02;
var t:item;
// attach icons to the stage
for (var i = 0; i < numOfItems; i++) {
t = new item();
t.name = "item_"+i;
// place each item equally around the circle
t.angle = i * ((Math.PI*2) / numOfItems);
t.addEventListener(Event.ENTER_FRAME, mover);
// add to stage
addChild(t);
}
function mover(evt:Event):void {
this.x = Math.cos(evt.target.angle) * radiusX + centerX;
this.y = Math.sin(evt.target.angle) * radiusY + centerY;
var s:Number = this.y / (centerY + radiusY);
this.scaleY = this.scaleX = s;
evt.target.angle += this.speed;
trace(evt.target.name);
trace(this.x);
}
Many thanks
Chris
Carousel
Hi everybody
I have seen a great "animation" on this website : www.finaref.fr/etapes-du-credit.asp
I wish use it for my personel website, could you help me to creat it, could you please give me steps?
You can see what i want with this link : www.finaref.fr/etapes-du-credit.asp
Thank you in advance
Josiane (sorry for my poor inglish)
Carousel Help
I have used the tutorial from gotoandlearn.com to create a carousel. I have modified it so that it does not spin until the mouse actually moves however its terribly chunk and I have realised that it doesn't really do what I want it to do.
so
I have a circle of items and I want it so they dont move until you click on one of the words it moves to the front in a clock wise motion, im totally lost, here is the action script.
items contains a dynamic textfield with the word in it.
Quote:
var numOfItems:Number = 10;
var radiusX:Number = 232;
var radiusY:Number = 75;
var centerX:Number = Stage.width/2;
var centerY:Number = Stage.height/2;
var speed:Number = 0.05;
var moving:Boolean = true;
var boxes:Array = new Array();
//math.PI is equal to the radium of 360 degrees devided by the number of items.
for(var i=0;i<numOfItems;i++)
{
var t = this.attachMovie("item","item"+i,i+1);
t.angle = i * ((Math.PI*2)/numOfItems);
t.onEnterFrame = setPos;
boxes.push(t);
t.onRelease = clicked;
}
//cos = angle which presents the ratio of the sides of item x axis
//sin = angle which presents the ratio of the sides of item y axis
function clicked()
{
trace("pos"+this.angle);
}
function stopMoving()
{
moving = false
trace("timer")
clearInterval(stopTimer);
}
function mover()
{
for(var i=0;i<numOfItems;i++)
{
boxes[i].angle += boxes[i]._parent.speed;
}
}
function setPos()
{
if(moving)
{
this._x = Math.cos(this.angle) * radiusX + centerX;
this._y = Math.sin(this.angle) * radiusY + centerY;
var s:Number = this._y / (centerY+radiusY);
this._xscale = this._yscale = s *100;
this.swapDepths(Math.round(this._xscale) + 100);
}
}
this.onMouseMove = function()
{
mover();
speed = (this._xmouse-centerX)/1500;
}
var stopTimer = setInterval(this, stopMoving, 100);
Carousel Help
I am following the tutorials on gotoLearn.com and I need some help loading a large image and transitioning. In the last tutorial I followed I got the small thumb nail image in the carousel to slide off to the left and some text to appear. But now when the thumb nail image slides over I need a larger image to appear. Has anyone worked on this tutorial and might be able to help?
AS2 - Carousel
Can anyone know any tutorial how to make similar to this?
http://www.earthcote.co.za/flash/#/p...h/countrywhite
or a sample file or a components thanks.
Carousel As2 To As3
hi
first of all i'd like to thank you for all the tutorials i can find here.
lastly i've been playing with your carousel tut and been porting it to as 3. i'm somewhere in the middle of 3rd video and i cant get the animation to work properly erm i think that link will just fit nice you'll see what im talking about.
http://szela93.0fees.net/Flash/Carousel2/
and here's the code
Code:
import fl.transitions.Tween;
import fl.transitions.TweenEvent;
import fl.transitions.easing.*;
var numOfItems:Number;
var radiusX:Number = 400;
var radiusY:Number = 150;
var centerX:Number = stage.stageWidth/2;
var centerY:Number = stage.stageHeight/2;
var speed:Number = 0.05;
theText.x = stage.stageWidth;
theText.y = stage.stageHeight;
theText.alpha = 0;
var tooltip = addChild(new ttip());
tooltip.name = "tooltip";
tooltip.scaleX = tooltip.scaleY = 0.4;
tooltip.alpha = 0;
var follower:MovieClip;
stage.addEventListener(MouseEvent.MOUSE_MOVE, setSpeed);
var myXML:XML;
var myLoader:URLLoader = new URLLoader();
myLoader.load(new URLRequest("list.xml"));
myLoader.addEventListener(Event.COMPLETE, processXML);
function processXML(e:Event):void {
myXML = new XML(e.target.data);
numOfItems = myXML.*.length();
for (var it=0;it<numOfItems;it++)
{
var t=stage.addChild(new item());
t.name = "item" + it;
trace(myXML.ICON[it].@URL);
t.ref.mask = t.masker;
t.angle = it*((Math.PI*2)/numOfItems);
t.addEventListener(Event.ENTER_FRAME, mover);
var i =new Loader();
i.load(new URLRequest(myXML.ICON[it].@URL));
t.icon.addChild(i)
var i2 =new Loader();
i2.load(new URLRequest(myXML.ICON[it].@URL));
t.ref.addChild(i2)
t.tooltext = myXML.ICON[it].@TIP;
t.acttype = myXML.ICON[it].@CLICKEFFECT.toString();
t.actcontent = myXML.ICON[it].@CLICKCONTENT;
t.btnPuppet.addEventListener(MouseEvent.ROLL_OUT, out);
t.btnPuppet.addEventListener(MouseEvent.ROLL_OVER, over);
t.btnPuppet.addEventListener(MouseEvent.MOUSE_UP, released);
}
}
function released(e:MouseEvent)
{
switch (follower.acttype)
{
case "navigate":
navigateToURL(new URLRequest(follower.actcontent));
break;
case "description":
tooltip.alpha=0;
tooltip.x=stage.stageWidth;
tooltip.y=stage.stageHeight;
for (var i = 0;i<numOfItems;i++)
{
out(null);
var t:Object = stage.getChildByName("item" + i);
t.xPos = t.x;
t.yPos = t.y;
t.theScale = t.scaleX;
t.removeEventListener(Event.ENTER_FRAME, mover);
t.btnPuppet.removeEventListener(MouseEvent.ROLL_OUT, out);
t.btnPuppet.removeEventListener(MouseEvent.ROLL_OVER, over);
t.btnPuppet.removeEventListener(MouseEvent.MOUSE_UP, released);
if (t != e.target.parent)
{
var twe1:Tween = new Tween(t,"scaleX",Strong.easeOut,t.scaleX,0,1,true);
var twe2:Tween = new Tween(t,"scaleY",Strong.easeOut,t.scaleY,0,1,true);
var twe3:Tween = new Tween(t,"alpha",Strong.easeOut,1,0,1,true);
}
else
{
var tw1:Tween = new Tween(t,"scaleX",Strong.easeOut,t.scaleX,1,1,true);
var tw2:Tween = new Tween(t,"scaleY",Strong.easeOut,t.scaleY,1,1,true);
var tw4:Tween = new Tween(t,"x",Strong.easeOut,t.x,167.3,1,true);
var tw5:Tween = new Tween(t,"y",Strong.easeOut,t.y,313.0,1,true);
var tw6:Tween = new Tween(theText,"alpha",Strong.easeOut,0,1,1,true);
theText.x = 307;
theText.y = 146.5;
theText.text = t.actcontent;
t.addEventListener(MouseEvent.MOUSE_OVER, twMotionFinishEvt);
}
}
break;
}
}
function twMotionFinishEvt(e:MouseEvent)
{
e.target.removeEventListener(MouseEvent.MOUSE_OVER, twMotionFinishEvt);
e.target.addEventListener(MouseEvent.MOUSE_UP, unreleased);
}
function unreleased(e:MouseEvent)
{
e.target.removeEventListener(MouseEvent.MOUSE_UP, unreleased);
var tw:Tween = new Tween(theText,"alpha",Strong.easeOut,1,0,.5,true);
for (var i = 0;i<numOfItems;i++)
{
var t:Object = stage.getChildByName("item" + i);
if (t != e.target.parent)
{
var twe1:Tween = new Tween(t,"scaleX",Strong.easeOut,0,t.theScale,1,true);
var twe2:Tween = new Tween(t,"scaleY",Strong.easeOut,0,t.theScale,1,true);
var twe3:Tween = new Tween(t,"alpha",Strong.easeOut,0,1,1,true);
}
else
{
var tw1:Tween = new Tween(t,"scaleX",Strong.easeOut,1,t.theScale,1,true);
var tw2:Tween = new Tween(t,"scaleY",Strong.easeOut,1,t.theScale,1,true);
var tw4:Tween = new Tween(t,"x",Strong.easeOut,167.3,t.xPos,1,true);
var tw5:Tween = new Tween(t,"y",Strong.easeOut,313.0,t.yPos,1,true);
t.removeEventListener(MouseEvent.MOUSE_UP, unreleased);
for (var it = 0; it < numOfItems; it++)
{
var te:Object = stage.getChildByName("item" + it);
te.addEventListener(Event.ENTER_FRAME, mover);
te.btnPuppet.addEventListener(MouseEvent.ROLL_OUT, out);
te.btnPuppet.addEventListener(MouseEvent.ROLL_OVER, over);
te.btnPuppet.addEventListener(MouseEvent.MOUSE_UP, released);
}
theText.x = stage.stageWidth;
theText.y = stage.stageHeight;
theText.alpha = 0;
}
}
}
function out(e:MouseEvent)
{
tooltip.removeEventListener(Event.ENTER_FRAME, moveTip);
tooltip.alpha = 0;
tooltip.tiptext.text="";
}
function over(e:MouseEvent)
{
tooltip.tiptext.text = e.target.parent.tooltext;
tooltip.x = e.target.parent.x;
tooltip.y = e.target.parent.y - e.target.parent.height/2;
tooltip.addEventListener(Event.ENTER_FRAME, moveTip);
follower = e.target.parent;
tooltip.scaleX = tooltip.scaleY = 0.7 * (follower.y / (centerY + radiusY));
tooltip.alpha = 1;
}
function moveTip(e:Event)
{
tooltip.scaleX = tooltip.scaleY = 0.7 * (follower.y / (centerY + radiusY));
tooltip.x = follower.x;
tooltip.y = follower.y - follower.height/2;
}
function mover(e:Event)
{
var t = e.target;
t.x = Math.cos(t.angle) * radiusX + centerX;
t.y = Math.sin(t.angle) * radiusY + centerY;
var s:Number = (t.y / (centerY + radiusY));
t.scaleX = t.scaleY = s;
t.angle += speed;
parent.setChildIndex(t,1);
sortItems()
}
function sortItems():void
{
for( var i:int = 0; i < numOfItems - 1; i++)
{
for(var j:int = 1; j < numOfItems; j++)
{
var temp1:DisplayObject = stage.getChildAt(j);
var temp2:DisplayObject = stage.getChildAt(j-1);
if( temp1.scaleX < temp2.scaleX )
{
stage.swapChildren(temp1, temp2);
}
}
}
}
function setSpeed(e:MouseEvent)
{
speed = (stage.mouseX - centerX)/(radiusX * 15);
}
i've tried to make it like tutorial says (i mean adding eventlistener to tween) but that gave me even more glitches and bugs so im stuck now.
thanks in advance
Carousel
Hi!
I have the following alteration made to the carousel:
- inserted a move left and a move right button
- when the buttons are pressed the carousel moves in the respective direction and stops
But when the carousel stops there isn´t an icon in the center.
What can I do so that an icon stops in the center?
All help appreciated. Thank you
Carousel Help
Hi,
I have been doing the carousel tutorial (fantastic by the way )
I am trying to make it so when you click on one of the loaded items you open an swf instead of loading the text into the dynamic text field. I have created a movie clip for the swf to load in called blank. I have also in the xml file made a new attribute called content. Each content attribute opens a different swf file which is written in the xml file like so:
<icon image="icon1.png" tooltip="Home" content="Main_win.swf"/>
can someone help me work out how to do this?
Cheers and thanks for taking the time to read this
A Little Help With The Carousel
i was wondering if it was possible to add links so if you click an item it shows the description then a link somewhere on the page? im new to flash thanks in advance i have no idea how to do or start this?
Carousel
Hi i'm a newb to flash and forums.
I'm trying to followthe great tutorial on the carousel but when i get to test the movie after i have got to the point were i should have one item in the carousel and it should rotate. I get one item in the top left hand corner that does not move.
i am using flash 8
here is my code
var numOfItems:Number = 1;
var radiusX:Number = 250;
var radiusY:Number = 75;
var centreX:Number = Stage.width/2;
var centreY:Number = Stage.height/2;
var speed:Number = 0.05;
for (var i = 0;i<numOfItems;i++)
{
var t = this.attachMovie("item1","item1"+i,i+1);
t.angle = i * ((Math.PI*2)/numOfItems);
t.onEnterFrame = mover;
}
function mover()
{
this._x = Math.cos(this.angel)* radiusX + centreX;
this._y = Math.sin(this.angel)* radiusY + centreY;
var s:Number = this._y / (centreY+radiusY);
this._xscale = this._yscale = s * 100;
this.angle += this._parent.speed;
}
hoping that you may help as i'm tearing my hair out!
Bob
AS3 Carousel....
I've searched the forums and have found small issues with converting the AS2 carousel to AS3, but haven't found a finished version. Each post handles a separate small issue, not the big picture. I was curious if anyone has a successfully functioning version of the carousel in AS3 they'd be willing to share with the community?
--Thanks to all!
3D Carousel
I've done the 3D Carosel Part 2 tutorial and I want to gotoAndStop(); on a different frame label for each icon click on from a mc on the main stage...any thoughts?
It would also be nice to disable the carousel hot spots and send it behind or _alpha = 0 while the mc in front plays.
Thanks in advance.
|