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




Srolling Background



I have a little piece of script that scrolls my background from left to right.
It kinda works ok but it does need some elaboration.
Basicly it is attached to a mc on the stage and targets another mc full of buttons etc. Here it is

onClipEvent (enterFrame) {
if (Key.isDown(Key.LEFT)) {
// handle left key
_root.back._x += 20;
}
if (Key.isDown(Key.RIGHT)) {
// handle right key
_root.back._x -= 20;
}

I would like to limit how far the mc scrolls in either direction. As it stands it just carries right on until it leaves the sreen completely in either direction.
I would like to stop the action when the relevent end of the mc is at the edge of the frame. Also I would prefer to have the action on a mouse event rather than on the keyboard event. I guess this would involve some kind of
'hot spot' with the action in it.

I have included a link to the .swf ( 3.95Mb .rar, the .fla is over 7Mb so I just posted the .swf )

I am using mx but have access to mx2004 pro

Thanks in advance for any help. This is an old project and I would not mind finishing it

Scrolling Background

Trug



FlashKit > Flash Help > Flash ActionScript
Posted on: 07-13-2005, 11:52 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Srolling Box
ok this is the situation. I am making a Flash site to host software and games. what i need is a scrolling box that contains a picture of the the program in the file, the description(possibly also scrolling) next to that and then a download button underneth the both of them. I would like it so I can keep adding more pictures, descriptions, and download buttons under that. So i guess I want the whole thing to scroll, so when you scroll down you will see the picture, description, and download button of the next program.

Any help would be greatly appreciated!!!!

Srolling Map
I'm trying to create a scrolling map, the idea is to make the map move in relation to the mouse position. So when the cursor is placed on the right, de map moves to the left, revealing the right side. How closer to the edge how faster, but within a square around the centre there is no respons. So you'll have a border when the mouse get's there the map scrolls. also with a certain angle , like when you are in the upper right corner, the map moves diagonally down and to the left. I'm not a really good scripter, so if someone could help.

Srolling Map
I'm trying to create a scrolling map, the idea is to make the map move in relation to the mouse position. So when the cursor is placed on the right, de map moves to the left, revealing the right side. How closer to the edge how faster, but within a square around the centre there is no respons. So you'll have a border when the mouse get's there the map scrolls. also with a certain angle , like when you are in the upper right corner, the map moves diagonally down and to the left. I'm not a really good scripter, so if someone could help.

Srolling Text
On my page under flas then jokes (www.dannypic.com)... I have this scrolling text. It is not very user friendly and way to sensitive. Does anyone have any scripts that would help???


Dan

Srolling Window
hi guys im trying to create an online portfolio
i would like to know how to actionscript the buttons etc
do i need to use a mask as well ?
i would greatly appreicate some guidance as im quite new to flash

Srolling Navigation With MC's
I want this scrolling plane to hold seperate MC's which will animate when rollover and eventually clicked. I have tried placing a Mc inside the my Mc which scrolls but cant get it too work. Does anyone have any idea where I may be going wrong.
Included the fla.
FlashMX 2004

Srolling Button Help
im usin flash mx 2004. basically ive created some scrolling buttons by placing them into a modified text scroll box...however i cant seem to assign actions to these buttons...i basically want this affect http://www.lynntanaka.com/
(the protfolio section)...its been buggin me for a while now and bein a new flash user any help is appreciated...thanks alot!
also i read about hybrid pages that reduce the load time as the viewer only loads the page he/she is lookin at...but how do i link these together in html??
thanks again

Srolling Images (with XML And AS)
Question
How do I stop the scrolling when the last image is reached?

Code I'm Using
Action Script on the intial frame

Code:
myPhoto = new XML();
myPhoto.ignoreWhite = true;
myPhoto.onLoad = function(success) {
//portfolioTag = this.firstChild;
numimages = this.firstChild.childNodes.length;
spacing = 70;
for (i=0; i<numimages; i++) {
picHolder = this.firstChild.childNodes[i];
thumbHolder = thumbnails.createEmptyMovieClip("thumbnail"+i, i);
thumbHolder._x = i*spacing;
thumbLoader = thumbholder.createEmptyMovieClip("thumbnail_image", 0);
thumbLoader.loadMovie(picHolder.attributes.thmb);
thumbHolder.title = picHolder.attributes.title;
thumbHolder.main = picHolder.attributes.main;
thumbHolder.onRelease = function() {
getURL(thumbHolder.main);
loader.loadMovie(this.main);
title_txt.text = this.title;
};
}
};
myPhoto.load("posters.xml");
//Left Button
left_btn.onRollOver = function(){
tellTarget ("left") {
gotoAndPlay (2);
}
};
left_btn.onRollOut = function() {
tellTarget ("left") {
gotoAndStop (1);
}
};
//Right Button
right_btn.onRollOver = function() {
tellTarget ("right") {
gotoAndPlay (2);
}
};
right_btn.onRollOut = function() {
tellTarget ("right") {
gotoAndStop (1);
}
};
Action Script on frame 2 of "left" mc

Code:
movespeed = 5;
if (_root.thumbnails._x>=1000) {
gotoAndStop (1);
} else {
_root.thumbnails._x += moveSpeed;
}
Note
The code only works as ActionScript1 and developed as Flash6. I don't know why. I found this code a long time ago and don't remember who developed it otherwise I would ask and credit that individual(s).

Srolling Banners
Hi guys! I was just wondering if someone could help me with this. It's driving me crazy but I bet it's something trivial. I am trying to create banners which would slide by themselves but also need to be controlled by 2 buttons (previous, next type of thing) to force it into position. Basically something like this example: http://flashsources.net/flash_compon...580-h-240.html I know how to create the sliding if I have separate button for each banner but if I need to scroll just via one or two I am lost in the ActionSript (what to put on the buttons). I tried everything like on release gotoAndPlay, NextFrame etc. stuff but it just does not do what I wanted it to do. Is it masking or maths or what? Can someone please help a beginner? Thank you :-)

Srolling Scenes
I have a bkrng image, i want it to constantly run by, then stop on said part ot the image on releasing a button.... Idealy i would like the image of the back ground to be on the button face... any help, or ideas?
At the moment i have a long image that stops, and on release i have the time line jump to 30 frames behind the desired target, a do its little motion too it... I wold like to script the whole thing...
thanks...

Actionscript Srolling Xml Info....
Hey all im trying to work out how to scroll text in a dynamic text field that gets track titles from an xml file.
I want the track name to scroll like it does on windows media player and i havent a clue where to start.
Im using the xml player on flashkit thats the featured movie and its as easy as can be to use and edit but this is the bit im stuck on.
Does anyone know if this is possible ??

Thanks, Mental

2D Vertical Srolling Carousel,
Hi Fellows

I have created a vertical scrolling 2d carousel which is managed through cms/xml.
The problem is when I add a new thumbnail on the XML(images.xml) list
the carousel doesn't flow seamless, I either get gaps or overlapping.
At the moment i have tow move clips, when one has sroll down to the bottom of the screen it
get positioned at top again same applies for second movie clip.

you can see an example of it at http://overload.co.za/main.php
I have attached the source file as well, see source code below

one thing to note, the thumbnails have to be 115x115px

Any one with bright ideas, please assist

Thanks


//-----------------------------------------------------------------------ACTION SCRIPT
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];

thumbnails = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;

thumbnails[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
thumbnails_fn(i);
}
firstImage();

} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;

xmlData.load("images.xml");
/////////////////////////////////////
listen = new Object();
listen.onKeyDown = function() {
if (Key.getCode() == Key.LEFT) {
prevImage();
} else if (Key.getCode() == Key.RIGHT) {
nextImage();
}
};

/////////////////////////////////////
p = 0;
this.onEnterFrame = function() {
filesize = picture.getBytesTotal();
loaded = picture.getBytesLoaded();
preloader._visible = true;
if (loaded != filesize) {
preloader.preload_bar._xscale = 100*loaded/filesize;
} else {
preloader._visible = false;
if (picture._alpha<100) {
picture._alpha += 10;
}
}
};
function nextImage() {
if (p<(total-1)) {
p++;
if (loaded == filesize) {
picture._alpha = 0;
this.getURL(image[p], "_self", 1);
desc_txt.text = description[p];
picture_num();
}
}
}

function firstImage() {
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[0], 1);
desc_txt.text = description[0];
picture_num();
}
}
function picture_num() {
current_pos = p+1;
pos_txt.text = current_pos+" / "+total;
}




function thumbNailScroller() {
// thumbnail code!
this.createEmptyMovieClip("tscroller",1000);
scroll_speed = 10;
tscroller.onEnterFrame = function() {
if (thumbnail_mc._y>=-(xmlNode.childNodes.length)*215) {
thumbnail_mc._y = thumbnail_mc._y+4;
}

if (thumbnail_mc._y>= 480) {
thumbnail_mc._y= thumbnail_mc._y=-(xmlNode.childNodes.length)*215
}

};
}

thumbNailScroller();










//-------------------------------------------------------------------------DUPLICATE MOVIE TRIAL

function thumbNailScrollerdup() {
// thumbnail code!
this.createEmptyMovieClip("tscroller2",1003);
scroll_speed = 10;
tscroller2.onEnterFrame = function() {
if (newmc._y>=-(xmlNode.childNodes.length)*215) {
newmc._y = newmc._y+4;
}
if (newmc._y>= 480) {
newmc._y= newmc._y=-(xmlNode.childNodes.length)*215


}
};
}

thumbNailScrollerdup();


function thumbnails_fn(k) {
thumbnail_mc.createEmptyMovieClip("t"+k,thumbnail_ mc.getNextHighestDepth());
newmc.createEmptyMovieClip("t"+k,newmc.getNextHigh estDepth());
tlistener = new Object();
tlistener.onLoadInit = function(target_mc) {
target_mc._y = hit_left._y+(target_mc._height+20)*k;
target_mc.pictureValue = k;
target_mc.onRelease = function() {
p = this.pictureValue-1;
nextImage();
};




target_mc.onRollOver = function() {
this._alpha = 50;

//newmc._y = newmc._y+3
delete tscroller.onEnterFrame;
delete tscroller2.onEnterFrame;
//dupMovie();






};

target_mc.onRollOut = function() {
this._alpha = 100;
thumbNailScroller();
thumbNailScrollerdup();
//removeMovieClip(newmc);



};
};
image_mcl = new MovieClipLoader();
image_mcl.addListener(tlistener);
image_mcl.loadClip(thumbnails[k],"thumbnail_mc.t"+k);
image_mcl.loadClip(thumbnails[k],"newmc.t"+k);
}

Scroll Panel, Srolling Multiple MC's?
I am trying to have the scrollpanel scroll several MC's based on user input...The first frame of my movie will have a series of checkboxes...Based on the selections when submitted the selected MCs would be stacked in the panel...Such that if the user picks 1, 3, and 4...MCs 1, 3, and 4 would be stacked in the scrollpanel. Is this possible?

Help With Code For Loaded Srolling Text Swf
hello all -
I know that the code needs to be changed, but I am not sure to what exactly. I have the attached sample "scrolltest" swf that is a scrolling text box swf. I am loading it into an empty MC called "interview" in my main movie "main". once it loads, the scrollbar moves, but the text does not.

I am sure its a path problem with the AS but I am not sure how to get it to work....ANYONE????

Scrollpane Srolling Dynamic Content
is it possible to use the scrollpane component on dynamic content? duplicated movieclips and stuff. I tried it but seems not to work.
anybody experience with this?

thanks

Print Srolling Window Content
hi,
about my info-window, what if i would like to print it's content,
how will i do that?
i need your help please! i need it for my project.

i already made one and printed the result but the problem is it wont go on the next page printing. approximately my info window would make up of 5 pages to be printed and will be incremented depending on the demand of the user till how many he wants to print.

please help!

thank you in advance.

sincerely,

mimy

Loading Container From A Srolling Menu... Is It Possible?
Hello my distinguished Kirupians!!

I am trying to load a movie or image into a container from a scroller dynamically...

Is it possible?

Eddy

Having Difficulties Trying To Change White Background Of Flash Menu Into Transparent Background
How would I best go about changing a Flash menu that currently has a white background into a Flash menu with a transparent background?

I want to take that menu (with a transparent background) and place it over a side-bar image that i've got in DW.

Any help/advice'd be greatly appreciated.

[F8] List Component - Transparent Background? Or A Custom Bitmap Background?
I have a custom bitmap I'd like to use as the background for my List Component in Flash 8 Pro.

I can't for the life of me find any documentation on how to make the list component background transparent or how to put a bitmap in the background of it.

Can anyone help with this? Please!

FOO

How To Make The Background Transparent And/or Change The Shape Of The Background
Im just curious how to change the shape of the background or the transparency.

Please let me know

Transparent Background/ XML Code To Change The Background Colour
Hi,

In a bit of a pickle here; I need a way to insert a swf file into any color background website, so it automatically matches up.

Now, can one make the swf files background transparent? And match the background of any given websites background?

Or, can one use some sort of XML file and simply change this xml file to match the background color of the website?

Now, what if the website uses a particulare pic background? How would one match this?

As usual folks, I am stuck between a rock and a hard place, so any help deeply apprecaiteed!

Kind Regards,

Boxing Boom

HTML Background Matching Flash Background
Hey, I have a flash website that opens as a pop up, the pop auto fullscreens. The background in the flash document is a gradient, and I have a gradient in the background of the html. My question is how would I get the background of the HTML to always match up with the flash background using a percentage?

www.flippingsweet.net/index2.html

Printing A MC With White Background, Not Stage Background?
I’m trying to print a movieclip with a white background while keeping the stage background black. The movieclip, printResults_mc has a white rectangle in the bottom layer, 850 pixels x 1100 pixels. The following function scales printResults_mc to the printer’s printable area but because it’s impossible to predict the aspect ratio of the printable area some black background always leaks out. I tried making the white background 20 pixels larger than I need (870 x 1120) and then setting a crop rectangle in addPage of (10,10,850,1100), no luck, the black stage background just fills in the area outside the crop. A simple solution would be to temporarily set the stage background color property to white, print, then set it back to black, but I can’t find any such property. Anyone have some ideas?







Attach Code

function printResults(e:MouseEvent):void {
var myPrintJob:PrintJob = new PrintJob();
var result:Boolean = myPrintJob.start();
var pageMargin:Number = 0;
if (result) {
prepPage();
var cropRect:Rectangle = new Rectangle(pageMargin,pageMargin,printResults_mc.width-pageMargin,printResults_mc.height-pageMargin);
printResults_mc.width = myPrintJob.pageWidth;
printResults_mc.scaleY = printResults_mc.scaleX
myPrintJob.addPage(printResults_mc,cropRect);
myPrintJob.send();
} else {
//User does not have printer or user canceled print action
};
}

How To Make The Background Transperant Or Without Background
Hi, I'm just wondering how do I make the movie background transperant a example of this can be found in cn.yahoo.com
the ad appears in the middle without background.

thank you

Transition Problems - Background To Background
my problem is, when click on the button to make a background go away ( fade out ) and another fades in...there is a quick blip or jump when it should be a very smooth transition from one to the other.

can anybody help me with this problem? the file is attached.

oh yeah, click on the red buttons toward the buttom to see the problem.

Transition Problems - Background To Background
my problem is, when click on the button to make a background go away ( fade out ) and another fades in...there is a quick blip or jump when it should be a very smooth transition from one to the other.

can anybody help me with this problem? the file is attached.

oh yeah, click on the red buttons toward the buttom to see the problem.

Transition Problems - Background To Background
my problem is, when click on the button to make a background go away ( fade out ) and another fades in...there is a quick blip or jump when it should be a very smooth transition from one to the other.

can anybody help me with this problem? the file is attached.

oh yeah, click on the red buttons toward the buttom to see the problem.

Swf In Table Background / Cell Background Possible
ive read it cant be done? but you never know! anyone know of how it can be done?

thanks

Background
alright, i guess im pretty new to flash but i was wondering, when you make a background image for a flash page, (in photoshop for me) what format do you save it as to get the best picture? ive tried .png and it comes out blurry and has a lot of miscolored pixels, .jpg comes out the same way, .gif was very bad, it was even distorted. i figured bitmap would be too big of a file size so i didnt try, but what does every use to get good quality pictures?

Background
Is it possible to have a transparent background and put it "behind" an html page? Because all I want is a custom cursor and it would take too long to convert the whole site to flash.

Background
This first time working with swish. I created a movie with 2 scenes is there any way to have deferent background on the second scene. If not can I make the first scene take all the browser so will not show the background and only the second one will…

Ugh. Please Help With Background
I am trying to creat an swf file with a transparent background.

i create my movie, the select 'panels' and 'export'. in the show export options for html, under window mode i select 'transparent'. then i use the export toolbar to export to .swf file. but the exported file always has a background the color of my movie, not a transparent one.

what am i doing wrong? thanks a lot.

Background Help
Hi All

I have a Flash movie that is 31 scenes long. I want to create a background that plays continually as the user goes from one scene to another.

Is there a way to create a background scene for the whole movie? There are about six animated movie clips that I want to use as the background.

Thanks

Digital Editor

Background Rgb
Hi

Im working with a Background MC. I change the rgb of this MC using a button. I need that the mc respect the rgb i select when it pass from one scene to another.
I set the rgb in the scene 1. When i go to scene 2 it respect the rgb. But when i go next scene the Background MC get the default value.

the button to select the rgb says:
on (press) {
newColour = "blue";
a = new Color(fondo);
a.setRGB(0xff9900);
}

And the first frame of all scenes says:
if (_root.newColour == "blue") {
b = new Color(fondo_prog);
b.setRGB(0xff9900);
}

please help me!

thanxxx!!

Background Rgb
Hi

I wanna change the Background MC color pressing button and when i go to one scene to another the Background MC of the new Scene respect the color i select....

Thaaannxx!

Background
Hi I want to import pictures that have white or black background. But when I import them in flash the background hides the other things. Can I make the white or black background invisible and how?

Background
how can I make a background all black? and then how do I get an image to fade?

Background
How can i import an own background? for example a screenshot or something, and I tried to copy and past but that wouldn't work. Plzz help!

Background ?
Thanks so much
But how to have a best quality background picture in a Flash ? If I use *.jpeg(800*600) with impression=100 in the 800x600 monitor it used to alias when I exported to *.swf.
Even thought in Photoshop it is very well quality.
Please tell me how to solve this problem ?
Thank you
Hoang

Background
how do you get the background of a flash movie to be transparent?

Mc's With Background
OK, i'm pretty confused on what to do her. IF i had a house for example in the main timeline. I wanted to have a person bouncing a ball at the side of the house. So i make a person bouncing a ball in it's own timeline but do I have to draw the house in the Mc timeline as well? Also if i wanted sound would I put it in the Mc timeline or the main timeline? Thanks alot

Background
Can anyone help?
Hi can anyone help?
I'm Dicemice
http://www.dicemice.com
I'm useing Flash5 and have just got into action script, got to grips with 'Drop and Drag' now I want to learn how to enable the participant to change the colour of the blackground see http://www.dicemice.com/diceparty.html ?

Background
Is there any way I could select a file as my background!!!

Background
hi there
how could i show a picture as background in a flash movie???

Background
hi there
how could i make a picture the background for a flash movie?

Various Background
can some body tellme how to use variables to make that every time that I load the scene the background photo is different

Thanks

Using Background Gif's ?
I'm wondering how to prevent the browser from prompting viewers with the printing option when the cursor rests over the background Gif I'm using to frame out my .swf that's imbeded in a html page.

I'm sure there's a way to do this, anybody know what I need to do?

Thanks,

Background
I having some probules. I how do i do change the baukground colur

plaes hlep mi men

My appreciation for your assist in advance

-Jake

Ps go to my site i thnak it's just a white screen. (cuz i cant change the colur)

Background...
Hi Everyone
I have never used Flash before, and wish to do something simple. I have made a small movie, and have inserted a logo in it. The logo's background is White, but when it runs in the movie I dont want the background to be displayed as white...I want the logo background to be the same color as the background on which its placed. Could anyone please tell me how to do that?

Thanks

Copyright © 2005-08 www.BigResource.com, All rights reserved