Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash








Xml Data , Media Galley And Sectins Overlap :((


Hi There,

'm making media gallery. Hv three sections ,photos, videos, audios.
Each section has contents comming externally form xml file. Having all code in one keyframe on main time line..using (Action Script 3.0)

for eg : When I go from photo section to video section, images and txt from photo remains in video section. one section to another sections the contents .


A soultion wil be a great help...I'm not able to figure it out..
Thanks in advance
-----------------------------
import caurina.transitions.Tweener;
import caurina.transitions.properties.FilterShortcuts;
FilterShortcuts.init();

var introbutton = new IntroButton;
var mybg = new BgMain;
var topbar = new TopImage;
var bottombar = new BottomImage;
var photos_btn = new PhotosBtn;
var videos_btn = new VideosBtn;
var audios_btn = new AudiosBtn;
var photoshow1 = new PhotoNum1;
var photoshow2 = new PhotoNum2;
var photoshow3 = new PhotoNum3;
var photoshow4 = new PhotoNum4;
var mytext = new TextShow;
var myvideo = new VideoDisplay;
var videocaption = new VideocaptionDisplay;
var butterfly = new ButterFly;


var bigImages:XML = new XML(); // global variable to display large images ..
var pic =0; // var pic is assigned
//var bigInfo:TextField = new TextField;


var myheader = new HeaderText;
var headerstring:String =" "
myheader.headertxt.text = headerstring;


introbutton.x = 60;
introbutton.y = 555;
mybg.x = 800;
mybg.y = 0;
topbar.x = 800;
topbar.y = 4;
bottombar.x = -800;
bottombar.y = 554;

videos_btn.x = 560;
videos_btn.y = 0;
videos_btn.alpha = 0;
audios_btn.x = 660;
audios_btn.y = -18;
audios_btn.alpha = 0;
photos_btn.x = 450;
photos_btn.y = -18;
photos_btn.alpha = 0;

photoshow1.x= 390;
photoshow1.y= 600;
photoshow1.scaleX=.9;
photoshow1.scaleY=.9;
photoshow1.rotate =90;
photoshow2.x= 80;
photoshow2.y= 600;
photoshow2.scaleX=.9;
photoshow2.scaleY=.9;
photoshow3.x= -210;
photoshow3.y= 320;
photoshow3.scaleX=.9;
photoshow3.scaleY=.9;
photoshow4.x= 135;
photoshow4.y= -225;
photoshow4.scaleX=.9;
photoshow4.scaleY=.9;

myheader.x = 600;
myheader.y = 10;
myheader.alpha =0;
myvideo.x = 20;
myvideo.y = 200;
myvideo.alpha = 0;
videocaption.x = 375;
videocaption.y = 250;
videocaption.alpha = 0;
mytext .x = 825;
mytext .y = 293;
mytext.alpha = 0;
butterfly.x = 30,
butterfly.y = 500;
butterfly.scaleX=0;
butterfly.scaleY =0;


addChild(mybg);
addChild(topbar);
addChild(bottombar);
addChild(photos_btn);
addChild(videos_btn);
addChild(audios_btn);
addChild(photoshow1);
addChild(photoshow2);
addChild(photoshow3);
addChild(photoshow4);
addChild(myheader);
addChild(mytext);
addChild(butterfly);
addChild(introbutton);
addChild(videocaption);

// button mode -for hand cursor
introbutton.buttonMode = true;
photos_btn.buttonMode = true;
videos_btn.buttonMode = true;
audios_btn.buttonMode = true;

//event listeners for buttons
introbutton.addEventListener(MouseEvent.CLICK,intr oAnimation);
photos_btn.addEventListener(MouseEvent.CLICK,photo Gallery);
videos_btn.addEventListener(MouseEvent.CLICK,video Gallery);
audios_btn.addEventListener(MouseEvent.CLICK,audio Gallery);



function introAnimation(evt:MouseEvent):void {

removeVideoGallery();
removePhotoGallery();

Tweener.addTween(mybg,{x:0, y:0, time:1,transition:"easeInCirc"});
Tweener.addTween(photoshow1,{ x:50, y:110, alpha:.9, scaleX:1,scaleY:1,time:2,delay:0.1,transition:"eas eOutBounce"});
Tweener.addTween(photoshow2,{ x:165, y:150, alpha:.9,scaleX:1,scaleY:1,time:2,delay:0.3,transi tion:"easeOutBounce"});
Tweener.addTween(photoshow3,{ x:245 ,y:145, alpha:.9, scaleX:1,scaleY:1,time:2,delay:0.5,transition:"eas eOutBounce"});
Tweener.addTween(photoshow4,{ x:115 ,y:275, alpha:.9, scaleX:1,scaleY:1,time:2,delay:0.7,transition:"eas eOutBounce"});
Tweener.addTween(mytext, { x:610, y:293, alpha:.9,time:3,delay:2,_Blur_blurX:0,transition:" easeOutExpo"})
Tweener.addTween(myheader,{x:600,y:3,alpha:0,time: 2,delay:1,transition:"easeInExpo"});

//trace(introbutton);


}



// intro animation-bg
Tweener.addTween(mybg,{x:0, y:0, time:1,transition:"easeInCirc", onComplete:showSlides});

// intro animation -- slides
function showSlides ():void {
Tweener.addTween(topbar,{x:1,y:4,time:1,transition :"easeInOutQuard"});
Tweener.addTween(bottombar,{x:320,y:544,time:1,tra nsition:"easeInOutQuard", onComplete:showMenu});//top anad bottom sildes..main

}
// intro animation -- show menu
function showMenu ():void {

Tweener.addTween(photos_btn,{ x:450, y:570, alpha:.9, time:0.5,delay:0.1,transition:"easeOutBounce"});
Tweener.addTween(videos_btn,{ x:560, y:570, alpha:.9, time:0.5,delay:0.3,transition:"easeOutBounce"});
Tweener.addTween(audios_btn,{ x:670 ,y:570, alpha:.9, time:0.5,delay:0.7,transition:"easeOutBounce", onComplete:showPhotos});

}

// intro animation -- for photos
function showPhotos ():void {

Tweener.addTween(photoshow1,{ x:50, y:110, alpha:.9, scaleX:1,scaleY:1,time:2,delay:0.1,transition:"eas eOutBounce"});
Tweener.addTween(photoshow2,{ x:165, y:150, alpha:.9,scaleX:1,scaleY:1,time:2,delay:0.3,transi tion:"easeOutBounce"});
Tweener.addTween(photoshow3,{ x:245 ,y:145, alpha:.9, scaleX:1,scaleY:1,time:2,delay:0.5,transition:"eas eOutBounce"});
Tweener.addTween(photoshow4,{ x:115 ,y:275, alpha:.9, scaleX:1,scaleY:1,time:2,delay:0.7,transition:"eas eOutBounce"});
Tweener.addTween(mytext, { x:610, y:293, alpha:.9,time:3,delay:2,_Blur_blurX:0,transition:" easeOutExpo"});

}

//------------------photo gallery starts here--------------//
var xpos =20;
function photoGallery(evt:MouseEvent):void {
renewButtons();
removeIntro();
removeVideoGallery();
headerstring="PHOTO GALLERY";

if(myvideo.stage) {
removeVideo();
}

evt.target.removeEventListener(MouseEvent.CLICK,ph otoGallery);
evt.target.buttonMode = false;
Tweener.addTween(evt.target,{alpha:.3,time:1});
Tweener.addTween(myheader,{alpha:.0,time:1,onCompl ete:changeText})

Tweener.addTween(mybg,{x:-800, y:0, time:1,transition:"easeInCirc"});
Tweener.addTween(myheader,{x:600,y:3,alpha:1,time: 2,delay:1,transition:"linear"});

Tweener.addTween(butterfly, {x:600,y:150,scaleX:.3, scaleY:.3, time:2, delay:2});
Tweener.addTween(myheader,{x:600,y:3,alpha:1,time: 2,delay:1,transition:"linear"});



var myXMLURL: URLRequest = new URLRequest("images.xml");

var myLoader:URLLoader = new URLLoader();
myLoader.load(myXMLURL);
myLoader.addEventListener(Event.COMPLETE, xmlLoaded);


var cssRequest: URLRequest = new URLRequest("mediagallery.css");
var cssLoader:URLLoader = new URLLoader(cssRequest);
var styles:StyleSheet = new StyleSheet;
cssLoader.addEventListener(Event.COMPLETE,cssLoade d);

var imageinfo:TextField = new TextField;
//bigInfo = Imageinfo;
imageinfo.multiline = true;
imageinfo.wordWrap= true;
imageinfo.x = 500;
imageinfo.y =225;
imageinfo.width = 200;
imageinfo.styleSheet = styles;
addChild(imageinfo);

var largeframe = new BigFrame;
largeframe.x = xpos;
largeframe.y =100;
largeframe.scaleX = 0.90
largeframe.scaleY = 0.80;

largeframe.addEventListener(MouseEvent.MOUSE_DOWN, startDragging);
largeframe.addEventListener(MouseEvent.MOUSE_UP, stopDragging);


function cssLoaded(evt:Event):void {
styles.parseCSS(cssLoader.data);
}


function xmlLoaded(evt:Event):void {
var myImages:XML = new XML(evt.target.data);
bigImages = myImages; //bigImages is equals to myImages.. so it has all the properties of myImages
for (var i :Number=0; i<myImages.image.length(); i++) {
var myRequest:URLRequest = new URLRequest(myImages.image[i].url);
var myLoader:Loader = new Loader();
myLoader.load(myRequest);
var smallframe = new SmallFrame;
smallframe.addChild(myLoader);
smallframe.x = xpos;
smallframe.y =500;
smallframe.scaleX = 0.15;
smallframe.scaleY = 0.15;
addChild(smallframe);
smallframe.addEventListener(MouseEvent.CLICK,large Image);
xpos += 75;

// loads static image for display. we make request every time we want to load object from outside.
}
var loadimage:URLRequest = new URLRequest(myImages.image[0].url);
var imageloader:Loader = new Loader();
imageloader.load(loadimage);
largeframe.addChild(imageloader);
addChild(largeframe);
imageinfo.htmlText ="<span class = 'date'>"+myImages.image[0].date+"</span><br/><span class ='caption'>"+myImages.image[0].caption+"</span>";
}

function largeImage(evt:MouseEvent) { // traces mouse event for thumbnails
trace(evt.target.name);
if (evt.target.name=="instance4"){ //conditonal statement for target name..that is thumbnail instance is linked with large photos
pic=0; // array as in xml
}
else if (evt.target.name=="instance8")
{
pic=1;
}
else if (evt.target.name=="instance12"){
pic=2;
}
else if (evt.target.name=="instance16")
{
pic=3;
}
else if (evt.target.name=="instance20")
{
pic=4;
}

else if (evt.target.name=="instance24")
{
pic=5;
}
else if (evt.target.name=="instance28")
{
pic=6;
}
else if (evt.target.name=="instance32")
{
pic=7;
}
else if (evt.target.name=="instance36")
{
pic=8;
}
else if (evt.target.name=="instance40")
{
pic=9;
}
else if (evt.target.name=="instance44")
{
pic=10;
}

var bigImages:URLRequest = new URLRequest(bigImages.image[pic].url); // we request to bring large image
var bigloader:Loader = new Loader();
bigloader.load(bigImages); // connects to loader form the top as bigImages has all the properties of loader.
largeframe.addChild(bigloader); // big loader is attached to large frame
addChild(largeframe);

//bigInfo.htmlText ="<span class = 'date'>"+bigInfo.image[1].date+"</span><br/><span class ='caption'>"+bigInfo.image[1].caption+"</span>";
trace(bigImages);
//trace(bigInfo);

}



// start drag funciton
function startDragging(event:MouseEvent):void
{
largeframe.startDrag();

// stop drag funciton
}
function stopDragging(event:MouseEvent):void
{
largeframe.stopDrag();

}


//---------photogallery ends here--------------//


}

// video gallery starts here

function videoGallery(evt:MouseEvent):void {
renewButtons();
removeIntro();
removePhotoGallery();
headerstring = "VIDEO GALLERY";
evt.target.removeEventListener(MouseEvent.CLICK, videoGallery);
evt.target.buttonMode = false;
Tweener.addTween(evt.target,{alpha:.3,time:1});
Tweener.addTween(myheader,{alpha:0,time:1,transiti on:"easeInExpo",onComplete:changeText});
Tweener.addTween(mybg,{x:-1600,time:1,transition:"easeInCirc"});
Tweener.addTween(myheader,{x:600,y:3,alpha:1,time: 2,delay:1,transition:"easeInExpo"});
Tweener.addTween(myvideo,{x:20,y:180,alpha:1,time: 1,delay:1,transition:"linear"});
Tweener.addTween(videocaption,{x:375,y:230,alpha:1 ,time:1,delay:1,transition:"easeInQuard"});

addChild(myvideo);
myvideo.player.source = "heart.flv";
//trace(myvideo);
}

//audio gallery starts here

function audioGallery(evt:MouseEvent):void {
renewButtons();
removeIntro();
removePhotoGallery();
removeVideoGallery();
headerstring="AUDIO GALLERY";

if(myvideo.stage) {
removeVideo();
}

evt.target.removeEventListener(MouseEvent.CLICK,au dioGallery);
evt.target.buttonMode = false;
Tweener.addTween(evt.target,{alpha:.3,time:1});
Tweener.addTween(myheader,{alpha:.0,time:1,onCompl ete:changeText});

Tweener.addTween(mybg,{x:-2400, y:0, time:1,transition:"easeInCirc"});
Tweener.addTween(myheader,{x:600,y:3,alpha:1,time: 2,delay:1});


}

// remove intro animation

function removeIntro():void {

Tweener.addTween(photoshow1,{ x:200, y:400, scaleX:.1,scaleY:.1,alpha:0, time:1,delay:0.1,transition:"easeInOutCircle"});
Tweener.addTween(photoshow2,{ x:-20, y:250, scaleX:.1,scaleY:.1,alpha:0, time:1,delay:0.2,transition:"easeInOutCircle"});
Tweener.addTween(photoshow3,{ x:300 ,y:300, scaleX:.1,scaleY:.1,alpha:0, time:1,delay:0.3,transition:"easeInOutCircle"});
Tweener.addTween(photoshow4,{ x:-10 ,y:150, scaleX:.1,scaleY:.1,alpha:0, time:1,delay:0.4,transition:"easeInOutCircle"});
Tweener.addTween(mytext, { x:900, y:293, alpha:.0,time:2,transition:"easeOutExpo"});

}
// remove photogallery animation

function removePhotoGallery():void {

Tweener.addTween(myheader,{x:600,y:3,alpha:0,time: 0.5,transition:"linear"});
Tweener.addTween(butterfly, {x:700,y:150,scaleX:.1, scaleY:.1, time:2, alpha:0});


}

// // remove videogallery animation

function removeVideoGallery():void {
Tweener.addTween(myvideo,{x:20,y:250,alpha:0,time: 0.5,transition:"easeInCirc"});
Tweener.addTween(videocaption,{x:375,y:225,alpha:0 ,time:0.5,transition:"easeInCirc"});
Tweener.addTween(myheader,{x:600,y:3,alpha:0,time: 0.5,transition:"linear"});


}

// change text funciton

function changeText():void {
myheader.headertxt.text = headerstring;

}


// renew button funciton
function renewButtons():void{

photos_btn.addEventListener(MouseEvent.CLICK,photo Gallery);
videos_btn.addEventListener(MouseEvent.CLICK,video Gallery);
audios_btn.addEventListener(MouseEvent.CLICK,audio Gallery);
photos_btn.buttonMode = true;
videos_btn.buttonMode = true;
audios_btn.buttonMode =true;
photos_btn.alpha = 1;
videos_btn.alpha = 1;
audios_btn.alpha = 1;
}

// remove video funciton
function removeVideo():void {
myvideo.alpha = 0;
removeChild(myvideo);
myvideo.player.source ="dummy.flv";

}
--------------------------------------------------



Sabs




FlashKit > Flash Help > Actionscript 3.0
Posted on: 12-06-2008, 01:05 AM


View Complete Forum Thread with Replies

Sponsored Links:

Invalid Media Data Error - Pls Help
I'm getting an error when trying to play my .swf stating "Couldn't open file because Invalid Media Data was found in Movie". The only thing I've done remotely different is Trace Bitmap on some jpg's I've imported. Pls Help!

View Replies !    View Related
Get Byte Data From Media Content
i wanted to sci wanted to scale several pieces of
media being loaded up into a series of empty
movieclips through a looping function and
an incrementing variable

but had difficulty getting it to work
works fine its own, but if i try to
apply looping funciton or incrementation
nothing happens

was thinking perhaps empty movieclips were
being scaled before media content was properly
loaded into them

and thought of using getBytesLoaded + Total
in order to check byte size of media content
loaded into empty_mc's and total size of media
content

but whenever i use the "getBytes" AS all i get
are the Byte data of the empty_mcs that are in
the flash movie

how do i get byte data
of media content and byte data of
media content that has loaded into empty mc?

what might be better method of scaling aray
of media through looping funciton and incrementing
variable?i

View Replies !    View Related
Trace Bitmap Gets Invalid Media Data Error
I've imported jpg's into my movie and did a Trace Bitmap effect...then convert to Graphic Symbols...then Test Movie is fine....BUT when I go to try swf all by itself I get an Error "Couldn't open file because Invalid Media Data was found in Movie" There is nothing in the least bit fancy in this movie...Please Help!

View Replies !    View Related
Galley Help Pls?
am gonna try to explain this the best I can:

right here goes......

am creating a galley for my 3D images (ok so far?....good)

all the options are in a vertical line (+ links) which are controlled by a scrollbar e.g

image 1
image 2
image 3
.....
image 25
etc so you can scroll up & down through them (you still with me?........cool!)

now the problem is dat...I GOT LOADS OF THEM (more than 25) and what it is that I want to do is that if I create a new image I want that to go to the top of the list and the rest will push down 1.

e.g

image 1
image 2
image 3

now becomes...

new image
image 1
image 2

but that means am gonna have to change all the names of each button & the links to the images. is there an easier way of doin this? Cause its gonna take me forever to change, i create new images all the time.

pls can anyone help?

View Replies !    View Related
Photo Galley
Can anyone recomand me a dynamic photo gallery, that I can
introduce in a template!
10q

View Replies !    View Related
Vertical XML Galley
Hai all,

I am new in action script

I want the vertical thumnails scrolling like in this site .... it should move whenever mouse is over that one. I need only vertical scrolling like in the below site. http://www.theinfantphotographer.com...our/index.html


I have Developed a vertical XML Gallery.

But I am not able to Get all the images in xml file, By default Gallery is moving but I want that to be in stand Mode and whenever the Mouse move up gallery should move up and whenever the mouse move down gallery should move down.

I have attached my Files.

Any one can Please Help me to solve this problem.

Thanks,
Krish

View Replies !    View Related
Vertical XML Galley
Hai,

I have Developed a vertical XML Gallery.

But I am not able to Get all the images in xml file, By default Gallery is moving but I want that to be in stand Mode and whenever the Mouse move up gallery should move up and whenever the mouse move down gallery should move down.

I have attached my Files.

Any one can Please Help me to solve this problem.

Thanks,
Krishna.

View Replies !    View Related
Photo Galley Help
I am using the photo gallery with thumbnails tutorial (http://www.kirupa.com/developer/mx2004/thumbnails.htm) and i am trying to create the gallery as a move clip to make life easier, so i thought. has anyone else had this problem, or am i doing something wrong?

Thanks for your help.

View Replies !    View Related
Xml Galley Problem ...
i have this xml gallery that i found in here ...

ok i,ve edited it with my pics ... n it,s workin 100% without any single mistake ...

how ever when i upload it to my site it won,t load all the pics it gets stuck while loading some pics ... like it loads pic 1 3 5 but i wont load 2 4

but in my pc it loads em all ...

i,ve checked everythin 3 times but couldn,t find out whats wrong ...

u can find the fla. and the xml and the pics in this link ...

http://www.sendspace.com/file/smdzma

View Replies !    View Related
Galley Script Help, Please
Hello,
I'm new to actionscript in general, I do know a little...

I foung a gallery script, modified many things, the images open fine, everything is working, but here's the thing:

the gallery is in 3 sections, red, blue and yellow.

I would like to know how, what, and where to put a script so that if a "the small red image #1" is clicked, I can load any sort of a movie on top of the "the BIG red image #1" or #2 or 3 and so on...same goes for the blue and yellow...

here are all the files...
http://www.gentro.ca/sandra_test.zip


p.s.: I think the script that controls the gallery is in symbol 120

I really would appreciate the help
Merry Christmas in advance to everyone
Sandra

View Replies !    View Related
Optimizing Photo Galley
I have this code like a every other gallery with thumbs and everytime you click on one of the thumbs the image selected appears


Code:
var thumb_spacing = 49;

// load variables object to handle loading of text
var description_lv = new LoadVars();
description_lv.onData = function(raw_text){
description_txt.text = raw_text;
}

function GeneratePortfolio(portfolio_xml){
var portfolioPictures = portfolio_xml.firstChild.childNodes;
for (var i = 0; i < portfolioPictures.length; i++){
var currentPicture = portfolioPictures[i];

var currentThumb_mc = sub_display.createEmptyMovieClip("thumbnail_mc"+i,i);
currentThumb_mc._x = i * thumb_spacing;

currentThumb_mc.createEmptyMovieClip("thumb_container",0);
currentThumb_mc.thumb_container.loadMovie(currentPicture.attributes.thumb);

currentThumb_mc.title = currentPicture.attributes.title;
currentThumb_mc.num = currentPicture.attributes.num;
currentThumb_mc.image = currentPicture.attributes.image;
currentThumb_mc.description = currentPicture.attributes.description;


currentThumb_mc.onRollOver = currentThumb_mc.onDragOver = function(){
title_txt.text = this.title;
num_txt.text = this.num;

}
currentThumb_mc.onRollOut = currentThumb_mc.onDragOut = function(){
title_txt.text = this.title;
num_txt.text = this.num;
}
currentThumb_mc.onRelease = function(){
place_holder.loadMovie(this.image);

description_lv.load(this.description);
}
}
}

// xml object for xml content (defines sources for selections)
var portfolio_xml = new XML();
portfolio_xml.ignoreWhite = true;
portfolio_xml.onLoad = function(success){
if (success) GeneratePortfolio(this);
else trace("Error loading XML file"); // no success? trace error (wont be seen on web)
}
// load
portfolio_xml.load("portfolio.xml");





But i want so that every time you rollover or hover on one of the thumbs it expands

I cant get it to work

Help appreciated

View Replies !    View Related
Dynamic Flash Galley With PHP?
Ok i have a flash file that contains 48 thumbnail images. Each image will load a page with the full image on it. I"m looking for some PHP code or something that will send a file variable from flash (ex. if you click image1 it will pull image1.jpg out a file) using php or somehting and pull the corosponding picture out of a file then put that picture into a template HTML page in a fixed size.

Any body seen a tutorial or something on how maybe to do this?

View Replies !    View Related
Galley Text Problem
Here is my attempt at a site, The irc friends Text is my problem when you open the gallery go to first picture, their is a read up dynamic text to the left of screen.. Now if you go to button 1 or 2 the gallery goes away thats fine, But the text still shows on the left How can I fine tune it so it goes away once gallery is shut?

http://www.barrie44.pwp.blueyonder.co.uk/friends40.html


The action script :

//initialize variables and properties

description1 = "I am a 40 year old wife, mother, daughter, sister and friend from North Texas This October I will be married to Ricky aka RenSor 10 years.I am the mother of 2 sons, Brandon 19 and Bradley 17, Step-mom of Kris 25 and Karrie 19 Also, I am the proud Grandma to Lezlie Jayde (Brandon), Step-Gma to Anthony and Micheal (Kris) and Angel (Karrie)I have two wonderful pets, Bubbles my 12 year old Border Collie and Diesel our 7 month old kitten. My hobbies and interests include: Computers, Photography and Photo scrapebooks, Poetry, Swimming and Dirtbikes (which I miss terribly) Right now most of my free time is spent visiting with friends online.";

description2 = "";

square._alpha = 0;
whichPic = 0;
//initiate change to new image when buttons are clicked
next.onPress = function() {
if (whichPic<17 && !fadeIn && !fadeOut) {
fadeOut = true;
whichpic++;
input = whichPic;
}
};

back.onPress = function() {
if (whichPic>1 && !fadeIn && !fadeOut) {
fadeOut = true;
whichpic--;
input = whichPic;
}
};
_root.onEnterFrame = function() {
// when a new Photo is selected, fade out, load new image, and fade in
if (square._alpha>10 && fadeOut) {
square._alpha -= 10;
}
if (square._alpha<10) {
loadMovie("friends40/image"+whichPic+".jpg", "square");
fadeOut = false;
fadeIn = true;
if (whichPic == 1){desc = description1;}
else if (whichPic == 2){desc = description2;}
else if (whichPic == 3){desc = description3;}
else if (whichPic == 4){desc = description4;}
else if (whichPic == 5){desc = description5;}
else if (whichPic == 6){desc = description6;}
else if (whichPic == 7){desc = description7;}
else if (whichPic == 8){desc = description8;}
else if (whichPic == 9){desc = description9;}
else if (whichPic == 10){desc = description10;}
else if (whichPic == 11){desc = description11;}
else if (whichPic == 12){desc = description12;}
else if (whichPic == 13){desc = description13;}
else if (whichPic == 14){desc = description14;}
else if (whichPic == 15){desc = description15;}
else if (whichPic == 16){desc = description16;}
else if (whichPic == 17){desc = description17;}
}
if (square._alpha<100 && fadeIn && !fadeOut) {
square._alpha += 10;
} else {
fadeIn = false;
}
// limit input field
if (input>17) {
input = 17;
}
// initiate change to new image when Enter key is pressed
if (Key.isDown(Key.ENTER)) {
fadeOut = true;
whichpic = input;
}
};
// if a number is entered in the input field but Enter is not pressed, change
// back to current Photo number when clicking anywhere else
inputField.onKillFocus = function() {
input = whichPic;
};

Can some one help please, To amend my problem..

Many Thanks

Regards Barrie

View Replies !    View Related
Another Photo Galley Question (yay..)
Hi.

I've looked around the forums, but I was unable to find the answer to this question on my own.

What I want to do is to make a gallery based on the tutorial gallery here (thumbs), but I want the user to be able to choose different galleries from within the movie.

I figured that I could make a loop to cycle through the galleries, then nest another loop inside it to cycle through the pics, captions and thumbs. While I wrote, I constantly tested the output with trace commands, but when I tried nesting the loop I lost all output..

I'm pretty new to both Flash and Actionscript, so if theres an obvious solution I havent been able to see it..

This is my temp XML file:


HTML Code:
<bilder>
<galleri name="Bursdagsfest i koret">
<node name="temp" bilde="burdagsfest/1.jpg" thumb="bursdagsfest/thumbs/1.jpg"/>
<node name="temp" bilde="burdagsfest/2.jpg" thumb="bursdagsfest/thumbs/2.jpg"/>
<node name="temp" bilde="burdagsfest/3.jpg" thumb="bursdagsfest/thumbs/3.jpg"/>
<node name="temp" bilde="burdagsfest/4.jpg" thumb="bursdagsfest/thumbs/4.jpg"/>
<node name="temp" bilde="burdagsfest/5.jpg" thumb="bursdagsfest/thumbs/5.jpg"/>
<node name="temp" bilde="burdagsfest/6.jpg" thumb="bursdagsfest/thumbs/6.jpg"/>
<node name="temp" bilde="burdagsfest/7.jpg" thumb="bursdagsfest/thumbs/7.jpg"/>
<node name="temp" bilde="burdagsfest/8.jpg" thumb="bursdagsfest/thumbs/8.jpg"/>
<node name="temp" bilde="burdagsfest/9.jpg" thumb="bursdagsfest/thumbs/9.jpg"/>
<node name="temp" bilde="burdagsfest/10.jpg" thumb="bursdagsfest/thumbs/10.jpg"/>
<node name="temp" bilde="burdagsfest/11.jpg" thumb="bursdagsfest/thumbs/11.jpg"/>
<node name="temp" bilde="burdagsfest/12.jpg" thumb="bursdagsfest/thumbs/12.jpg"/>
<node name="temp" bilde="burdagsfest/13.jpg" thumb="bursdagsfest/thumbs/13.jpg"/>
<node name="temp" bilde="burdagsfest/14.jpg" thumb="bursdagsfest/thumbs/14.jpg"/>
<node name="temp" bilde="burdagsfest/15.jpg" thumb="bursdagsfest/thumbs/15.jpg"/>
<node name="temp" bilde="burdagsfest/16.jpg" thumb="bursdagsfest/thumbs/16.jpg"/>
<node name="temp" bilde="burdagsfest/17.jpg" thumb="bursdagsfest/thumbs/17.jpg"/>
<node name="temp" bilde="burdagsfest/18.jpg" thumb="bursdagsfest/thumbs/18.jpg"/>
<node name="temp" bilde="burdagsfest/19.jpg" thumb="bursdagsfest/thumbs/19.jpg"/>
</galleri>
<galleri name="test">
<node name="temp" bilde="burdagsfest/1.jpg" thumb="bursdagsfest/thumbs/1.jpg"/>
<node name="temp" bilde="burdagsfest/2.jpg" thumb="bursdagsfest/thumbs/2.jpg"/>
<node name="temp" bilde="burdagsfest/3.jpg" thumb="bursdagsfest/thumbs/3.jpg"/>
<node name="temp" bilde="burdagsfest/4.jpg" thumb="bursdagsfest/thumbs/4.jpg"/>
<node name="temp" bilde="burdagsfest/5.jpg" thumb="bursdagsfest/thumbs/5.jpg"/>
<node name="temp" bilde="burdagsfest/6.jpg" thumb="bursdagsfest/thumbs/6.jpg"/>
<node name="temp" bilde="burdagsfest/7.jpg" thumb="bursdagsfest/thumbs/7.jpg"/>
<node name="temp" bilde="burdagsfest/8.jpg" thumb="bursdagsfest/thumbs/8.jpg"/>
<node name="temp" bilde="burdagsfest/9.jpg" thumb="bursdagsfest/thumbs/9.jpg"/>
<node name="temp" bilde="burdagsfest/10.jpg" thumb="bursdagsfest/thumbs/10.jpg"/>
<node name="temp" bilde="burdagsfest/11.jpg" thumb="bursdagsfest/thumbs/11.jpg"/>
<node name="temp" bilde="burdagsfest/12.jpg" thumb="bursdagsfest/thumbs/12.jpg"/>
<node name="temp" bilde="burdagsfest/13.jpg" thumb="bursdagsfest/thumbs/13.jpg"/>
<node name="temp" bilde="burdagsfest/14.jpg" thumb="bursdagsfest/thumbs/14.jpg"/>
<node name="temp" bilde="burdagsfest/15.jpg" thumb="bursdagsfest/thumbs/15.jpg"/>
<node name="temp" bilde="burdagsfest/16.jpg" thumb="bursdagsfest/thumbs/16.jpg"/>
<node name="temp" bilde="burdagsfest/17.jpg" thumb="bursdagsfest/thumbs/17.jpg"/>
<node name="temp" bilde="burdagsfest/18.jpg" thumb="bursdagsfest/thumbs/18.jpg"/>
<node name="temp" bilde="burdagsfest/19.jpg" thumb="bursdagsfest/thumbs/19.jpg"/>
</galleri>
</bilder>
and this is my attempt at coding it:


Code:
function loadXML(loaded){
if (loaded){
galleri = [];
nodes = [];
navn = [];
bilde = [];
thumb = [];
galleritotal = images_xml.firstChild.childNodes.length;
for (p = 0; p<galleritotal; p++){
galleri[p] = images_xml.firstChild.childNodes[p];
gallerinavn[p] = images_xml.firstChild.childNodes[p].attributes.name;
for (i = 0; i<total; i++){
total = galleri[p].childNodes.length;
navn[i] = galleri[p].childNodes[i].attributes.name;
bilde[i] = galleri[p].childNodes[i].attributes.bilde;
thumb[i] = galleri[p].childNodes[i].attributes.thumb;
thumbs_fn[i];
}
}
trace(navn);
}
else{
content ("Fila lastar ikkje!")
}
}
images_xml = new XML();
images_xml.ignoreWhite=true;
images_xml.onLoad = loadXML;
images_xml.load("galleri.xml");
I hope I got my problem across properly, and someone has a solution to this.

Thanks in advance.

View Replies !    View Related
Optimizing Photo Galley
I have this code like a every other gallery with thumbs and everytime you click on one of the thumbs the image selected appears



Code:
var thumb_spacing = 49;

// load variables object to handle loading of text
var description_lv = new LoadVars();
description_lv.onData = function(raw_text){
description_txt.text = raw_text;
}

function GeneratePortfolio(portfolio_xml){
var portfolioPictures = portfolio_xml.firstChild.childNodes;
for (var i = 0; i < portfolioPictures.length; i++){
var currentPicture = portfolioPictures[i];

var currentThumb_mc = sub_display.createEmptyMovieClip("thumbnail_mc"+i,i);
currentThumb_mc._x = i * thumb_spacing;

currentThumb_mc.createEmptyMovieClip("thumb_container",0);
currentThumb_mc.thumb_container.loadMovie(currentPicture.attributes.thumb);

currentThumb_mc.title = currentPicture.attributes.title;
currentThumb_mc.num = currentPicture.attributes.num;
currentThumb_mc.image = currentPicture.attributes.image;
currentThumb_mc.description = currentPicture.attributes.description;


currentThumb_mc.onRollOver = currentThumb_mc.onDragOver = function(){
title_txt.text = this.title;
num_txt.text = this.num;

}
currentThumb_mc.onRollOut = currentThumb_mc.onDragOut = function(){
title_txt.text = this.title;
num_txt.text = this.num;
}
currentThumb_mc.onRelease = function(){
place_holder.loadMovie(this.image);

description_lv.load(this.description);
}
}
}

// xml object for xml content (defines sources for selections)
var portfolio_xml = new XML();
portfolio_xml.ignoreWhite = true;
portfolio_xml.onLoad = function(success){
if (success) GeneratePortfolio(this);
else trace("Error loading XML file"); // no success? trace error (wont be seen on web)
}
// load
portfolio_xml.load("portfolio.xml");

But i want so that everytime you rollover or hover on one of the thumbs it expands

I cant get it to work

Help appreciated

View Replies !    View Related
Galley Has Mucho Mc's, How To Return...
so lets say that the viewer clicked my gallery button which loaded a swf file onto an empty movie clip, okay?
the gallery page opens in all of it's beautifulness (snarf) and distributed throughout the new page are several thumbnails of my pics.
now the question, how to make the following happen(?):
the viewer sees a thumbnail that looks interesting so he/she/it clicks it and the thumbnail enlarges over the existing page (existing page is 800x600 and enlarged thumbnail is 300x250ish), the viewer grows weary of the enlarged thumbnail so they click it again and the enlarged pic returns to the original page as a thumbnail...thus allowing the totally bored viewer another chance to click another completely dreadful thumbnail...thus starting the whole inane process over again. can someone say, "pavlov's dog?" :doughnut:
i'm not sure if i would hide a m.c. button underneath the thumbnail/enlarged pic or do another empty m.c. load movie or what!?
please help my brain is loaded (and not with movie clips!) lol!

View Replies !    View Related
Random XML Photo Galley
I am trying to create a photo gallery using xml that is random. I can't seem to get it to work. Here is the code I am using:


HTML Code:
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
total = xmlNode.childNodes.length;
i=Math.ceil(Math.random()*total);
while (i<total) {
image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
caption[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
photo_name[i] = xmlNode.childNodes[i].childNodes[2].firstChild.nodeValue;
i++;
}
firstImage();
} else {
content = "file not loaded!";
}
}
It is based of the code in this tutorial: http://www.kirupa.com/developer/mx20...otogallery.htm


Any help would be appreciated. Thanks.

View Replies !    View Related
Dynamic Flash Galley With PHP?
Ok i have a flash file that contains 48 thumbnail images. Each image will load a page with the full image on it. I"m looking for some PHP code or something that will send a file variable from flash (ex. if you click image1 it will pull image1.jpg out a file) using php or somehting and pull the corosponding picture out of a file then put that picture into a template HTML page in a fixed size.

Any body seen a tutorial or something on how maybe to do this?

View Replies !    View Related
Galley Text Problem
Here is my attempt at a site, The irc friends Text is my problem when you open the gallery go to first picture, their is a read up dynamic text to the left of screen.. Now if you go to button 1 or 2 the gallery goes away thats fine, But the text still shows on the left How can I fine tune it so it goes away once gallery is shut?

http://www.barrie44.pwp.blueyonder.co.uk/friends40.html


The action script :

//initialize variables and properties

description1 = "I am a 40 year old wife, mother, daughter, sister and friend from North Texas This October I will be married to Ricky aka RenSor 10 years.I am the mother of 2 sons, Brandon 19 and Bradley 17, Step-mom of Kris 25 and Karrie 19 Also, I am the proud Grandma to Lezlie Jayde (Brandon), Step-Gma to Anthony and Micheal (Kris) and Angel (Karrie)I have two wonderful pets, Bubbles my 12 year old Border Collie and Diesel our 7 month old kitten. My hobbies and interests include: Computers, Photography and Photo scrapebooks, Poetry, Swimming and Dirtbikes (which I miss terribly) Right now most of my free time is spent visiting with friends online.";

description2 = "";

square._alpha = 0;
whichPic = 0;
//initiate change to new image when buttons are clicked
next.onPress = function() {
if (whichPic<17 && !fadeIn && !fadeOut) {
fadeOut = true;
whichpic++;
input = whichPic;
}
};

back.onPress = function() {
if (whichPic>1 && !fadeIn && !fadeOut) {
fadeOut = true;
whichpic--;
input = whichPic;
}
};
_root.onEnterFrame = function() {
// when a new Photo is selected, fade out, load new image, and fade in
if (square._alpha>10 && fadeOut) {
square._alpha -= 10;
}
if (square._alpha<10) {
loadMovie("friends40/image"+whichPic+".jpg", "square");
fadeOut = false;
fadeIn = true;
if (whichPic == 1){desc = description1;}
else if (whichPic == 2){desc = description2;}
else if (whichPic == 3){desc = description3;}
else if (whichPic == 4){desc = description4;}
else if (whichPic == 5){desc = description5;}
else if (whichPic == 6){desc = description6;}
else if (whichPic == 7){desc = description7;}
else if (whichPic == 8){desc = description8;}
else if (whichPic == 9){desc = description9;}
else if (whichPic == 10){desc = description10;}
else if (whichPic == 11){desc = description11;}
else if (whichPic == 12){desc = description12;}
else if (whichPic == 13){desc = description13;}
else if (whichPic == 14){desc = description14;}
else if (whichPic == 15){desc = description15;}
else if (whichPic == 16){desc = description16;}
else if (whichPic == 17){desc = description17;}
}
if (square._alpha<100 && fadeIn && !fadeOut) {
square._alpha += 10;
} else {
fadeIn = false;
}
// limit input field
if (input>17) {
input = 17;
}
// initiate change to new image when Enter key is pressed
if (Key.isDown(Key.ENTER)) {
fadeOut = true;
whichpic = input;
}
};
// if a number is entered in the input field but Enter is not pressed, change
// back to current Photo number when clicking anywhere else
inputField.onKillFocus = function() {
input = whichPic;
};

Can some one help please, To amend my problem..

Many Thanks

Regards Barrie

View Replies !    View Related
Xml.load Galley Problem And Xml Guestbook Doubt.
Having been able to combine several tutorials into one without any great problem I now arrived at something I cannot solve alone.

This is what I am working on right now

Click on "Work" - In the upper part chose The "text" tab. As you can see, some caracters are not shown. It's caracters like: é, ê and ç that are missing and I have no Idea how to get Flash to import the right text encoding. I'll need to write in Portuguese, so these caracters are essential.

Also I'd like to create a guestbook in the inc. section, but my server has no MySQL support so I tried the Kirupa XML_guestbook tutorial And i't noere close to working. And anyway I really just want something simple and basic like the Sofake Guestbooklet (In the 8th zoomstage - or pannel - or set) Is there anyone who can tell me how to build this?

And that is all I need for now.

I thank in advance!

Marc06

View Replies !    View Related
Images In Kirup Photo Galley Flipped Horizontally
I followed the tutorials to make the photo gallery, and everything works fine, except that all of my pictures are flipped horizontally, which causes some pictures to look funny. Can anyone tell me why this is happening and how I can fix it?

Thanks in advance!

View Replies !    View Related
Images In Kirup Photo Galley Flipped Horizontally
I followed the tutorials to make the photo gallery, and everything works fine, except that all of my pictures are flipped horizontally, which causes some pictures to look funny. Can anyone tell me why this is happening and how I can fix it?

Thanks in advance!

View Replies !    View Related
Media Controller Or Media Playback Wont Work
Im trying to stream http://internetradiopros.net:10042 into the default flash media controller or playback....I have NO idea how to do this. I know how to call mp3's and FLV's. I really need help on this badly.....

View Replies !    View Related
[CS3|AS3] Accessing Media Portion Of A Media Atom Feed
Hopefully someone could help me with this. I am using the as3 syndication libraries and an example provided here:

http://www.mikechambers.com/blog/200...ctionscript-3/

I am basically trying to integrate with YouTube ( http://code.google.com/apis/youtube/...list_of_videos) and test being able to pull in videos from their feeds. Using the code:


Code:
var rss:Atom10 = new Atom10();
rss.parse(data);
var rssEntries:Array = rss.entries;

for each(var entry:Entry in rssEntries)
{
trace(entry.title + " : " + entry.id + " : ");
}
I can access the children of <entry> just fine, but, things like the actual video url and thumbnails are in the <media:group> which looks to be outside the <entry> node, but I am not entirely sure, I am quite new to parsing Atom feeds. Does anyone have an idea on how I can access that portion of the feed? Do I need to create a new class for <media> like there is included for <entry>?

Here's an example feed for anyone to take a look at:
http://gdata.youtube.com/feeds/api/v...max-results=10

Thanks for any help anyone can offer.

View Replies !    View Related
Save "Shareobject" Data In A Server Without Flash Media Server.
Hi there!

I´m Triyng to save "shareobject" data in a server from a Flash Game, in order to save each player score or any data. I´ve heard that it's made doing "sharedobject.getRemote". So each player would logg in and save their score wherever they are (from any PC conected in a server). So the Flash cookies should be in the server.

The problem is that to make that user would need to have the Flash Media Server installed...

So it´s possible to save "Shareobject" data in a server without Flash Media Server.

Thank you in advance

View Replies !    View Related
Help Creating Media Player Using Media Components
please help me create media player using flash components of flash mx 2004

that can play mp3 file to wich we can play or stop in between.

View Replies !    View Related
Div Overlap
Hello,

I have two flash objects in div.

One DIV - A of flash should overlap the other DIV - B

So i mean two flash should overlap each other.

Can anyone help ?

Thanks.

View Replies !    View Related
Sound Overlap
Hi ,
I have made two different swf files.First one of them contains some annimations along with a sound file that i want should play continously in the background. Then after finishing out the animations in that movie i loaded 2nd swf file in the level1.
This file contains the main movie and has many voice over files in it , and some buttons on which these voice overs are called accordingly....
Now what i did was on pressing any of these buttons i used "stopallsounds" and then played the corresponding voice over ..... this was done to stop any sound file playing in this 2nd swf .... but it also stops the main music in level0
Now what should i do ... i want the background music to play on continously and to change voice overs according to the button clicked on....
Please help me out....

View Replies !    View Related
Movieclip Overlap
need some help!

I have 8 buttons that I have programmed to show MovieClips when pressed. Problem is,if I click on Button 1, it displays MovieClip 1, which is what its suppose to do. But when I go to click on Button 2, the MovieClip 2 that is programmed to play when button 2 is clicked, overlaps the movieClip 1 that was activated with button 1.

How do I get the previous movieclip that is showing, to disappear when you click on another button to view its movieclip, there for not having any of the movieclips over lapping etc.

this is the actionscripting I'm using for button 1, although the rest of the buttons have the same scripting just different tellTarget info numbers. Info stands for MovieClip:

on (release) {
tellTarget ("/info1") {
play ();


any help would be great, Thanks!
}
}

View Replies !    View Related
Overlap Swf Inside Swf
Ok, I have already once asked this question and got no answer. I think it is a pretty easy one, so i attached the zip file of what i am talking to make it easier.

I want to load a external swf into another swf. (loadmovie command i know). I got that part happening.

First question : How do i tell this window where on the screen to load? rathan then position x=0 y=0

Now whilst the window is loaded if you move the mouse around it and pass over the links from the main swf file you are able to click on them. I don't want to be able to click on them.

How can I prevent this??

files are attached. anyhelp would be great. Thanks in advanced

Trent

View Replies !    View Related
Movie Overlap
I am trying to play movies over each other in my scene using the instance.play(); command, however they just overlap and I want the existing movie to dissapear first, I plan to use this system for thumnails and wiuld be using about 12 movies. Is there away to give the button a command to clear the other movies before playing the new one?

I would really appreciate anyones help on this.

Thanks

View Replies !    View Related
Sound Overlap Through AS
is it possible to over lap music using AS like.....

---- = music


-----------_________
________------------


coz i made a little loop in FLstudio, and it has like 1/2 second gap at the end. the thing is it is for my site, so there is only one frame to have it on, so i cant just overlap it manualy. or if theres any other way that would be appreciated thanx

View Replies !    View Related
Hit Test - Don't Allow Overlap
Hi. I'm trying to make a basic game to use with my pupils. It's like dominoes, I have 13 movieclips on the stage and when they press play then words related to our study appear in the movieclips. I have the movieclips dragging and stopping. Ideally they would move the movieclips next to each other as you do in dominoes. But i would like to make it so that when they touch each other then the can't move or overlap each other. Should i seach under collision or hit test?
I have attached the fla file - hopefully
Cheers
Lesley

View Replies !    View Related
Can't Overlap Buttons...what To Do?
I have created 5 buttons that point to an object. When each buttons rolls over the object animates with a background fading in.

However, when you roll off one button and onto another, it starts the animation over. How can I set it so that when you are over the image or any of the buttons, the animation starts and doesn't stip until you roll out of this entire area.

I trie dusing a big button over the area, but the overlapping buttons cause a problem. Only the button on top worked. Any help would be greatly appreciated!!

My flash is too big to attached here, but I have posted the swf so you can see how this is working currently.

View Replies !    View Related
Sound Overlap ~_~
Here's the code for frame 1 of the main timeline;

Code:
stop();
introsound = new Sound;
introsound.attachSound("intro");
introsound.start(0,999);

However the problem I have with this code is that evertime it returns to this frame, the sound starts, overlapping with the original;

I have a button that moves to frame 2, another button that moves back to frame 1, and so the problem starts;

Is there anyway to have a sound object play through multiple frames?;

View Replies !    View Related
Stage Overlap
Hi. I'm not a complete newbie to flash- have made a few sites in it and learned some basic action script. I'm wondering if I'm missing something really simple which has changed in more recent versions of flash.

When I first published my movie (with scaling set to 100% x 100%) I got everything off stage also viewable in the browser. No problem, I simply erased excess graphics that overlapped the stage.

The problem reoccured when I wanted to load an external SWF. I made a movie exactly the same size for it to load into. (138h x 900w). The external swf was made in Swish Max with a stage of the aforementioned size, scrolling a long jpeg across the stage. Now when I publish the movie the external swf loads and plays correctly but the whole long jpeg is viewable overlapping the stage and crossing the width of the web browser!

Once again, I'm sure there must be an easy way to deal with this. As far as I know, only the stage is supposed to be viewable when published in a browser, right? Any help would be much appreciated.

View Replies !    View Related
Using HitTest For No-overlap
Hi All

I'm trying to use hitTest so that if any images overlap they will be replaced on the canvass.



ActionScript Code:
function imgSeed(){
    for(i=0; i<5; i++){
                 a += 1;
        duplicateMovieClip(test_mc, ["newImg_mc"+a], this.getNextHighestDepth());
        _root["newImg_mc"+a]._x = myRandom(50,450);
        _root["newImg_mc"+a]._y = myRandom(50,450);
//below code is for checking no overlap of images. Its with this that I'm having problems
        if(_root["newImg_mc"+a].hitTest(HIT ANY OTHER EXISTING IMG){
        //new random placement      }
    }
}

I'm stuck with the hitTest bit I want it to take the current mc and hitTest it for all the other existing mc's and if hitTest == true then I can re-run for a new placement.

Can anyone help?

Thanks

edit--

i've narrowed it down to a function


ActionScript Code:
function overLapCheck(){
    for(k=0; k<5; k++){
        if(_root["newImg_mc"+a].hitTest(_root["newImg_mc"+k])){
            trace ("hit test == true: newImg_mc"+a+" hit newImg_mc"+k);
        }
    }
}
although this works, It checks against itself, so it always true at least once, how can I tell it not to check against itself?

View Replies !    View Related
Help With Overlap Test
Hi. I would like to know if this is possible or not and how it might be achieved. Once I draw shapes on the background, i have actionscript code to dynamically create about 1000 small squares on the background which are movie clips. I would like to test if the movie clips -squares are "inside"/overlapping/contained withing/... the drawn shape. So if I draw some circles/rectangles, I would know if the squares drawn by actionscript overlap or not. Is there any simple way to accomplish this test? I dont even know what keywords I would search for this either to find help.

Thanks

View Replies !    View Related
LoadMovie Overlap Help Please
hi.

i have 5 different buttons on my website. 2 of them
call seperate swf's to load into my main.swf and the others
are a part of main.swf- they're on the same timeline/scene, etc...

the other buttons are text pages, and now seem to appear behind
the loaded movie swfs....basically the loaded movies wont go away
upon clicking another button.

do you know why this is happening?

here's what i have on the buttons calling external files

on (release) {
loadMovieNum("accessories.swf", 1);
gotoAndPlay("accSF2005");{
}
}

View Replies !    View Related
Object Overlap
I have made a series of MC's on a single layer. Each is triggered by a button, however I am having trouble getting the imgs to remain on top of the others for the MC. Does anyone know how to get multiple images to the same depth on the stage? Cheers.

View Replies !    View Related
Button Overlap Tip
Here's the situation:

I have an expandable banner, that when the mouse moves off of it should go back to it's original size. The way I would normally do this would be to add a big button over the expanded banners full size and put a onRollOut action to it.

Trouble is, this specific banner has three other small buttons in it. So what happens is, when I move over one of the three small buttons the onRollOut action is called since these small buttons are in the way.

What would you guys suggest in this case? I tried calling faking the onRollOut by just getting the mouses coordinates onEnterFrame, but that is kinda buggy since if you move the mouse out of the banner too fast it doesn't detect the roll out.

View Replies !    View Related
Button Overlap?
I am working on a map of the usa that as you roll over each state the name of the state appears and the state is highlighted. I had no problems until I was done and tested it. Some of the roll over parts of the button (the text of the state names) fall underneath of the button (state) right next to it. Why would the rolled over button be affected by the untouched button to it's sides?

I do have all of these buttons on the same level and they are close/touching each other. How do I make it so that the button that is rolled over and it's text are in the forefront and exposed?

Any thoughts? Thanks.

View Replies !    View Related
Overlap Function Help
Hi, wonder if anyone could help me with this problem.

Basically the following code is creating concentric circles.

I've got a collision detection and overlap function script at the end which is telling me if two or more circles have interacted with another.

What i'm basically after is for flash to give me a string of numbers to tell me how much of an overlap is occuring.

I know the end of this script is wrong - I'm getting a boolean outcome instead of a number, I think "return true;" needs to be "return dist;" and "return false;" should be "return 0;" but if I try and change that then I get:

"The Expression returned must match the function's return type"

and if I try and change :boolean to :number in that function then I get:

"Type mismatch in assignment statement: Number where Boolean is required"

Any ideas?

Heres my script:

circles = new Array();

circle._visible = false;

var drawCFlag:Boolean = true;

listener = new Object();
listener.onMouseDown = function(){
_root._quality = "MEDIUM";
instructions._visible = false;
msDown = true;
}
listener.onMouseUp = function(){
msDown = false;
drawCFlag = true;
}
Mouse.addListener(listener);

var circleCount = 0;
this.onEnterFrame = function(){ // updates every frame
if (msDown==true && drawCFlag == true){
circleCount++;
var newCircle:MovieClip = _root.circle.duplicateMovieClip("circle"+circleCou nt, circleCount);
circles.push(newCircle);
_root["circle"+circleCount]._x = _root._xmouse;
_root["circle"+circleCount]._y = _root._ymouse;
trace ("[x value= " + _root._xmouse + "]")
trace ("[y value= " + _root._ymouse + "]")
trace ("[circleCount= " + circleCount + "]")
trace ("[circles size = " + circles.length + "]")
_root.max.send("; x_value " + _root._xmouse + ";"); //send info to max/msp
_root.max.send("; y_value " + _root._ymouse + ";"); //send info to max/msp
drawCFlag = false;
}
andgo();
}

function andgo(){

//Collision detection:
for(var i:Number = 0;i < circles.length;i++)
{
var src:MovieClip = circles[i];
for(var j:Number = 0;j < circles.length;j++)
{

if(i == j) continue;
var dest:MovieClip = circles[j];
var touching:Boolean = checkOverlap(src,dest);
if(touching)
{
trace("Circles : " + src._x + " " + src._y + " : " + dest._x + " " + dest._y + " overlap");
}
//else
//{
//trace("No overlap between : " + src + " : " + dest);
}
}
}

function checkOverlap(c1:MovieClip, c2:MovieClip):Boolean
{
// distance between centers
var dx:Number = c2._x - c1._x;
var dy:Number = c2._y - c1._y;
var dist:Number = Math.sqrt( (dx*dx) + (dy * dy) );

if(dist < c1._width + c2._width)
{
return true;
}
else
{
return false;

View Replies !    View Related
Image Overlap Each Other
Why Does my photo's dont make a space between them .. but overlap each other

ActionScript Code:
var i = -1;
function loadContent(aImage:Array) {
    var nxFrame:Number = 3;
    var nyFrame:Number = 3;
    //var i = 0;
    //for (var i = 0; i<aImage.length; i++) {
    i++;
    if (i<aImage.length) {
        var my_mcl:MovieClipLoader = new MovieClipLoader();
        var myListener:Object = new Object();
        var nxBlok:Number = 0;
        myListener.onLoadComplete = function(target_mc:MovieClip) {
            target_mc._y = nyFrame;
            target_mc._x += nxFrame;
            nxFrame += 50;
        };
        myListener.onLoadInit = function(target_mc:MovieClip) {
            // you can now do any setup required, for example:
            target_mc._width = 40;
            target_mc._height = 40;
            showImage(target_mc, aImage);
        };
        myListener.onLoadError = function(target_mc:MovieClip, errorCode:String) {
            trace("*********First my_mcl instance*********");
            trace("ERROR CODE = "+errorCode);
            trace("Your load failed on movie clip = "+target_mc+"
");
        };
        trace("BLAAAAAAAAAAAAAAAAAAAAAAAA");
        my_mcl.addListener(myListener);
        this.createEmptyMovieClip("clip_mc"+i, this.getNextHighestDepth());
        my_mcl.loadClip(aImage[i], "clip_mc"+i);
    }
}
function showImage(target_mc, aImage) {
    target_mc._alpha = 0;
    var nAlpha = 5;
    target_mc.onEnterFrame = function() {
        nAlpha += 3;
        if (target_mc._alpha<95) {
            trace("alpha"+target_mc._alpha);
            target_mc._alpha += nAlpha;
        } else {
            loadContent(aImage);
            target_mc._alpha = 100;
            delete this.onEnterFrame;
        }
    };
}

View Replies !    View Related
AS2 - Overlap Problem
I have problem in new created movie clip position because it's dyanamic.
if i create new movie clip it is not overlap on previous movie clip. that position will be new or different place.

find attachment show this problem

so please give me code of positioning movie clip without overlap


thanks

Dars

View Replies !    View Related
Overlap Sounds
At the moment I have a flash menu, and each button has an over state keyframe, and for the over state keyframe I have set a sound to play ('event' in the drop down box), but the problem is, when the user moves the cursor quickly across the buttons, they play consecutively, therefore delaying the sounds.

I want each sound to overlap the other so that the sound plays at exactly the same time as the cursor is over the button, but I don't know any methods of doing this. If you know how, please tell me!!!

Thanks alot!
Mike

View Replies !    View Related
Html Img Overlap
I'm loading html into a textfield which works appropriately. However, the html displayed in the textfield contains images that are overlapping (directly on top of each other).

Imported HTML

Code:


<img src='file1.png' width='200' height='200' hspace='0' />
<img src='file2.png' width='200' height='200' hspace='0' />
<img src='file3.png' width='200' height='200' hspace='0' />



What can I do to separate out the images besides putting in a dozen break tags?

View Replies !    View Related
Voiceovers In My Tutorial Overlap.please Help
Hello everyone,

I have 5 keyframes and each keyframe has its own wavefile on it. I want to play the wavefile when i enter the frame and stop playing the wavefile when ileave the frame.

navigation between these frames is thru buttons

when i go to the second frame the first wavefile overlaps with the second.

How do i correct this problem ?

i used stopallsounds on the button press but of no use ...
please help

kiran

View Replies !    View Related
Button Overlap Issue
Hey there . . .

I'm fairly new to flash, and am getting the hang of it. My problem is a simple one; I've created a calendar, and populated it with button symbols for events. I've set the button's 'over' keyframe to be much larger than the regular button, so that when the user mouses over a given date, that date pops up w/ info about the event on that date.

the problem I'm having is that when these pop-up, I get overlap problems; ie. the larger area of the pop-up frame is cut off by neighboring buttons. It seems to be some kind of priority; the ones I put down first are underneath all the others. Is there an easy way to make the button symbol overlap all neighboring symbols when moused over, but to allow itself to be overlapped when *not* moused over?

thanks in advance . . .

Ron G

View Replies !    View Related
Movie Menu Overlap Help Please Help
Hi all...
I have been working on the main interface of my site and have definitely run into a stumbling point. I originally used a menu from here at flashkit called smoothmenu.fla and have had trouble relocating it so i could contact the creator.

I have provided links for the fla files in in question so ppl can take a look at them...
The problem i have been having is getting the slide sub menus available by clicking on one of the 5 'zooms' or circle buttons...
what happens is that even with the sub menu options/buttons in there, if you click twice on the same main 5 button it will play other submenus or a blank one. I am totally stumped and it has put off work on my site for about 2 months... PLEASE PLEASE help... with anything!

http://karmakat.ca/smoothmenu.fla : is the original script for the menu

http://karmakat.ca/may.fla : my latest incarnation and stumblings without the submenu buttons properly there

http://karmakat.ca/april.fla : another older incarnation with the submenu buttons... which are all willy-nilly all over the place and overlapping eachother for some inexplicable reason!!!!

-Aleksandr Berland AKA KarmaKat
http://karmakat.ca

View Replies !    View Related
Movie Menu Overlap Help Please Help
Hi all...
I have been working on the main interface of my site and have definitely run into a stumbling point. I originally used a menu from here at flashkit called smoothmenu.fla and have had trouble relocating it so i could contact the creator.

I have provided links for the fla files in in question so ppl can take a look at them...
The problem i have been having is getting the slide sub menus available by clicking on one of the 5 'zooms' or circle buttons...
what happens is that even with the sub menu options/buttons in there, if you click twice on the same main 5 button it will play other submenus or a blank one. I am totally stumped and it has put off work on my site for about 2 months... PLEASE PLEASE help... with anything!

http://karmakat.ca/smoothmenu.fla : is the original script for the menu

http://karmakat.ca/may.fla : my latest incarnation and stumblings without the submenu buttons properly there

http://karmakat.ca/april.fla : another older incarnation with the submenu buttons... which are all willy-nilly all over the place and overlapping eachother for some inexplicable reason!!!!

-Aleksandr Berland AKA KarmaKat
http://karmakat.ca

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved