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




[CS3] Scroll Items In Flashbanner



Hi!

I am pretty new at coding actionscript.
I'm trying to do a flashbanner that gets the title and url to joboffers from an xml file.
Right now I have this code that gets the data from the xml and prints it out in my flash file.
The problem is that I want the joboffers to scroll in my banner. I got 30 offers, but only 11 are visible. So they should scroll from the bottom and up.

This is my code so far:


Code:
mainmenu._y=40;
offersXML = new XML();
offersXML.ignoreWhite = true;
offersXML.onLoad = function(success) {
if (success) {
mainItem = this.firstChild.childNodes;
for (var i=0; i<mainItem.length; i++) {
item = mainmenu.duplicateMovieClip("mainmenu" + i, i);
item._x = 1;
item._y = 23*i;
item.mainlink.text = "» " +mainItem[i].firstChild.firstChild.nodeValue;
item.link = mainItem[i].lastChild.firstChild.nodeValue;
item.myover._visible=false;
item.myup.loadMovie("./button.jpg");
item.myover.loadMovie("./button.jpg");

item.onRollOver = function() {
this.myup._visible=false;
this.myover._visible=true;
this.mainlink.textColor = 0xFF8700;
};
item.onRollOut = function() {
this.myup._visible=true;
this.myover._visible=false;
this.mainlink.textColor = 0xFFFFFF;
};
item.onPress = function() {
getUrl(this.link);
};
}
}
};
offersXML.load("http://www.stepstone.se/includes/listing/se/pb/flashbaner/index.cfm");
stop();
And it looks like this: http://trosell.se/flashbanner/Menu_geturl.html

Any idé of how to do that? A suppose I have to do a loop that moves the items every frame?

Best Regards
Josse



FlashKit > Flash Help > Flash ActionScript
Posted on: 02-29-2008, 05:33 AM


View Complete Forum Thread with Replies

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

Scroll Through Items [MX04]
I have a question about scrolling through a page. On the following page (http://www.fenom.nl/palet1.asp) I have some blocks with texts, where a visitor now can click through by clicking the arrows on the right. As the rest of the site (no Flash-pages, for example the blue link on the left 'Dienstverlening') scrolls by mouse-over on this arrows, I would like this page exactly to be like those, maybe with a little teaser (the top of the 4th row with block, so that the user sees that there is more than the top 6 blocks with references of this company).

Does anyone has a solution for me or can anyone make a simple example? I am just too bad in scripting, sorry!

Thanks a lot!
Ciao, LaatR...

Scroll Xml Menu Items
I have created a vertical menu from xml file.

I create movie clip that holds menu items that are attached dynamically.

I want to allow the menu items to scroll if there are too many to fit into the movie clip and be visible on the stage.

any thoughts welcomed...

Click Counter On A Flashbanner
Ive searched the internet so many times for this but I cant find what im looking for anywhere.
Im an advertiser and right now Ive created banners that are placed on external websites. I want to see how many people click on my banners so I know if its profitable or not.

Is there a code I can use inside my flashbanner that counts each click and sends the info to me?

A Small Flashbanner Question
Hi guys, I'm new here, but I'm hoping to continue to browse around and get to know you all. I had a question, and I wasn't sure where else to post it, so I'm posting it here.

I've made a banner in Flash, and when I make a button opens the banner, the banner opens in the wrong dimensions. Fine. So I've gone into Dreamweaver, and tried the "import flash" option, and imported my banners as .swf and tried to put up a banner page. But that doesnt work. The banners don't even show up. How can I upload a Flash banner, but make sure that its size dimensions stays constant? Can anyone please help? I would be greatful!

Flashbanner Incl Popup On Mouseover
Hey!

I'm intrested in making a banner in size 234x60 in flash which will open some graphic or an .swf when I go mouseover (and this graphic or .swf or whatever it is, is actually BIGGER than 234x60). I've seen this kind of banner on MSN Messenger, I think it was a banner for Pirates of Caribbean.

VERY greatful for any answer.

/newform

Flashbanner Incl Popup On Mouseover
Hey!

I'm intrested in making a banner in size 234x60 in flash which will open some graphic or an .swf when I go mouseover (and this graphic or .swf or whatever it is, is actually BIGGER than 234x60). I've seen this kind of banner on MSN Messenger, I think it was a banner for Pirates of Caribbean.

VERY greatful for any answer.

/newform

Call Link When Clicking On The Entire Flashbanner
Hello!
I´m a newbie into flash. I have made a flashbanner with some movement and a movieclip. My problem is: When I put the banner on a website I don´t know how to make it clickable all the time (not only one button). Because I need the whole banner to be clckable from start to end. Please forgive my english

Thanks in advance.
== Adilante ==

Smart Clip Scroll Menu-attach Actions To List Items
I am using Flash 5 on a Mac platform.

I downloaded the Scroll Menu extension from Macromedia Extensions Exchange.
It works great.

What I would like to do now is attach actions to individual list items.
I have no idea how to go about that. I have been searching forums and posting the question of how to use Actionscript to accomplish this, but have received no answers.

Can you give me direction on how to attach actions. Do I need to do something like this to label the array in the smart clip first?

onClipEvent (load) {
function onMenu (item, label) {
labelArray = new Array("1", "2", "3",...)
val = labelArray[item];

And then use an
if(currentValue = "[0]")
gotoAndplay (3)

I am over my head here (not a programmer)! If you can assist me I would be very grateful.

Thank you in advance for any help you can give me
Jody

Drag Items Into A Target Zone - Shrink Old Items
Hello - I have been thinking about how best to handle this but thought I'd ask if anyone has seen any actual code that will get me close to where I want to be. I have attached an image that will give you the idea.

I want to have a "target area" and drag and drop items onto it. As I add new items the ones already there will need to shrink to make room for the new item. As items are removed the remaining itmes can grow a bit more again. Get the idea?

IMAGE
http://pixelfumes.com/uploads/shrinky.gif

Thanks guys!
-Sarge

Drag Items Into A Target Zone - Shrink Old Items
Hello - I have been thinking about how best to handle this but thought I'd ask if anyone has seen any actual code that will get me close to where I want to be. I have attached an image that will give you the idea.

I want to have a "target area" and drag and drop items onto it. As I add new items the ones already there will need to shrink to make room for the new item. As items are removed the remaining itmes can grow a bit more again. Get the idea?

IMAGE
http://pixelfumes.com/uploads/shrinky.gif

Thanks guys!
-Sarge

Placing Items Above Loaded Movie Items
Ok,

I have a blank page (BASE.swf) that is eventually filled with backgrounds, graphics, etc. all through Load Movie commands- they start at level 1-7. My question is:

How do I put items that show above them? It doesn't matter where I put them in the BASE file, the loaded movies always appear above them...

Ideas?

Thanks,

Joe

List Item W/ Multiple Data Items - How To Select Data Items?
I have a list component (myListBox) that is showing the labels for some data items read in from an XML file. Each item in the list has an associated name, description, and path (they're mp3 files) and they are named accordingly in the XML tags.

Using myListBox.selectedItem.label gives the correct label but myListBox.selectedItem.data is undefined. I've tried using the XML tags after the data selector (e.g. myListBox.selectedItem.data.path) but those don't work, either. All of the examples I've found in the docs show only a single data element associated with each list item.

So, if a list item has multiple data items associated with it, how do you select them using the listBox.selectedItem property?

TIA,

rgames

Calling Items From Library And Getting Number Of Items In Library
If i have a folder named questions in my library and i want to get the number of items in that folder how would i do that. I tried the code below but was unsucessful. Is this possible threw code? Or do i need to hard code my array.

var qst = new Array
trace(questions.length)
for(i=0;i>questions.length;i++){
qst[i] = questions.items.length
trace(qst[i])
}

Thanks
Josh

Scroll Bar Show Up If Needed And Only Scroll To Dynamic Text Input Bottom... HOW
I have attached a copy of my scroll bar that i am currently using how can i make the scroll bar not show up unless needed (really not all that important but would be nice.)

The important thing is that i can setup a dynamic text box inside my item_holder movie clip but my scroller always scrolls to the bottom of the scroll box not matter if inside my scroll box i have on line of text loaded dynamicly or i have 100. So if i have 1 line of text and a large dynamic text box the scroll bar will scroll to the bottom of the scroll box even though it only has one line. See attachment and see if anyone can help. Thanks in advance. Brian

Scroll Text > Button > Load Txt File > Reset Scroll Bar...?
Hi i am looking for a tutorial or an explanation of how you can load an external text file into a text field and have...let's say 3 buttons that load the .txt files...when they are loaded...i want the scroll bar to be reset to the top of the text field/box....

any help...welcome...

ta...tiger...

Linking Text Buttons In Scroll To Image Outside Scroll Area
Hi,
I am desperately hitting my head against a brick wall - so please help me!

I have created a flash area that is divided up with an image on top and a scroll area under.

I am trying to get the text buttons in the scroll area to each change the image above and cant seem to get it to work because of the masking.

I have tried heaps and heaps of different ways and am going crazy!

PLEASE HELP ME!!!!


thanks,
kova

Make The Browser Scroll Bar Scroll A Flash Text Box?
Is there anyway that javascript can detect when and which scroll bar button is clicked? I want to use javascript to make the browser scrollbar scroll a flash textbox.

Change Vert Scroll Script To Horiz Scroll
I found this tutorial for a scrollbar. It works great for vertical scrolling (ex:http://www.matthewterry.net/safetyguide.html click any section), but I want to change it to scroll horizontally, for another project.

Can someone help me change it to affect horizontal scrolling?

On the content's movie:

onClipEvent(load){
goY = this._y;
myY = this._y;
ySpeed = 0;
clicked = false;
delay = 2;
barDis = 380;
barPercent = 0;
}
onClipEvent(enterFrame){
if(math.round(myY) != math.round(goY) || clicked == true){
barPercent = (_parent.scroller.scrolllever._y/barDis)*100;goY = 116.7 - ((340/100)*barPercent);
myY = this.setonescroll._y;
ySpeed = (myY-goY)/delay;
this.setonescroll._y -= ySpeed;
}
}

On the scroller:

on(press){
startDrag(this,0,0,0,0,_parent._parent.setone.barD is);
_parent._parent.setone.clicked = true;
}
on(release, releaseOutside){
stopDrag();
_parent._parent.setone.clicked = true;
}

Thanks,
Matt

Please Help Me Place The Arrows Of My ScrollPane Scroll Bar Together On One End Of The Scroll Track
I have a scrollpane component with a movie clip of some thumbnail images.

I just want to have its scrollbar arrows together on one end of the track (or together ANYwhere) instead of having them at opposite ends of the scroll track.

I have been able to customize the appearance of the scrollpane and its scrollbar using the HaloTheme library, but that approach has so far been of no use in getting the arrows together.

I cannot tell you how deeply any help will be appreciated. I will probably sob and mewl with gratitude, the way I imagine someone lost in a vast rain forest for many weeks mewls when rescued. I am desperate. I am going insane. Please, please help me.

Modifying Position Of Scroll Arrows In Scroll Pane
Does anyone out there know how to modify the code of the standard Flash component scroll pane to allow you to place the arrows anywhere you want on the page? I was able to go in and assign x and y coordinates for them, but they seem to be linked to the bounding box somehow and whenever I raise or lower them the box follows suit, which ends up cutting of the content inside the box...

I didn't post any code because there is so **** much of it and I can't figure out where it is that the position of the arrows is linked to the position of that ****ed box (this is what I suspect the problem is, but please tell me if you know different!)!!!

HELP!!!!

Modifying Position Of Scroll Arrows In Scroll Pane
Does anyone out there know how to modify the code of the standard Flash component scroll pane to allow you to place the arrows anywhere you want on the page? I was able to go in and assign x and y coordinates for them, but they seem to be linked to the bounding box somehow and whenever I raise or lower them the box follows suit, which ends up cutting of the content inside the box...

I didn't post any code because there is so **** much of it and I can't figure out where it is that the position of the arrows is linked to the position of that ****ed box (this is what I suspect the problem is, but please tell me if you know different!)!!!

HELP!!!!

Scroll Bar Component Doesn't Scroll When Dynamic Txt Is Used?
I have a dynamic text box with the Flash UI component "Scroll Bar" attached to it. It works and scrolls fine when you enter text directelly into the dynamic box but when you use the loadVariables command to load an external txt file into it, it fails to scroll the text?
Is there a way to get it to scroll?

thx Bk9

Text + Image Scroll Function With Scroll Bar. Help
Hi, tring to create a scrollable text window that can also include different text colours, styles, links and images. I have tried a few tutorials but they only seem to work with dynamic text without different colours, styles, links and images. is there an easier solution i can use..

Please help

Scroll Page Scroll Bars/boarder
anyone have idea how to change the scrollpane scroll bars in 2004 and how to get wride of the border?

Scroll Gallery [doesn't Scroll After Particular Point]
Hello guys,

I have got this script from one of the opensource files on flashkit and want to use it for one of my requirements. Basically all I want to do is, scroll images vertically based on mouse movement. I've done that already but the issue is that when I have over 10-15 images, it doesn't scroll as there is no place left for the mouse to go further down. If you have a look at the attached file, you'll know what exactly I am talking about. Ideally, if mouse is held downwards, the images should keep scrolling untill it reaches it's end.

Can anybody have a look at the fla and help me out.

Cheers,
D

Scroll Wheel - Control Page Scroll?
Alrightly... So I have a flash file that is 750 x 1000 px and is embedded into an html page. Since it's height is a 1000px in order to see the whole flash file one needs to scroll down on the page. This is fine except that when people are working with the flash file (have clicked on it) and then want to use the scroll wheel it won't scroll the html page..

I realize this is because in flash you can assign your own properties to the scroll wheel. But is there a way to have the scroll wheel perform it's normal function of scrolling the html page?

I'm not sure if there is an easy way or if I would have to write some code for flash to call javascript to scroll the page? I know people must have run into this problem before and probably have some good solutions.

Thanks in advance

Scroll Text With Image In Scroll Panel ? Help
Hi,

I m trying scroll pannnel to show image and dynamic text both in scroll panne but when i select dymanic text in text option it comes outer from scroll pannel but static text is coming.

I need help to show dynamic text also in scroll pannel.

Thanks

Changing Quality On Scroll :: Scroll Plane
Hi There,

Does anyone know a easy way of getting the flash movie to change quality when a scroll plane is scrolling... I have loads of content in the plane and need to set the quality to low whilst scolling to improve performance....

at the moment I have this code.

Code:
var dragQual:Object = new Object();
dragQual.scroll = function(eventObj){
_quality = "LOW"
}
tDragObject.addEventListener("scroll", dragQual);
but it only sets the quality to low, once the user has finnished scolling I want the quality to go back to best....

Any Ideas?

Scroll Large Image With Out Scroll Bars
Does anyone know how to do this, not profient in Flash.

This is the effect I am after

http://www.moochi.co.nz/collection.html

Thanks

Change Horizontal Scroll To Vertical Scroll
Hi,

I've flash source code that is having a horizontal scrolling. Anybody can help me to change this to a vertical scroll.

Pls check the attached file.

thanks in advance...

Scroll Text With Image In Scroll Panel ? Help
Hi,

I m trying scroll pannnel to show image and dynamic text both in scroll panne but when i select dymanic text in text option it comes outer from scroll pannel but static text is coming.

I need help to show dynamic text also in scroll pannel.

Thanks

Changing Quality On Scroll :: Scroll Plane
Hi There,

Does anyone know a easy way of getting the flash movie to change quality when a scroll plane is scrolling... I have loads of content in the plane and need to set the quality to low whilst scolling to improve performance....

at the moment I have this code.

Code:
var dragQual:Object = new Object();
dragQual.scroll = function(eventObj){
_quality = "LOW"
}
tDragObject.addEventListener("scroll", dragQual);
but it only sets the quality to low, once the user has finnished scolling I want the quality to go back to best....

Any Ideas?

Scroll Large Image With Out Scroll Bars
Does anyone know how to do this, not profient in Flash.

This is the effect I am after

http://www.moochi.co.nz/collection.html

Thanks

[scroll] Scroll That Reacts To The Mouse Wheel
Hy guys,

Do you know how can I make a scrollable text that reacts to the mouse wheel. Here you can see an example: link here

Look at the news section, or at the about us section.

The majority oh the text scrollers on the web didn't react at the mouse wheel. I found this site and I was surprised when I found that I can scroll with my mouse wheel.

Hope some one knows how they do that.

Thx.

Help, Items
And i want solicit you help with something that i'm trying to do. I
learning flash and i'd like to do a site for a restaurant, very nice,
history, rooms, maps, interactive menu... all this is ok.

I want that when you click a items from the menu list of the
entry,dessert and other... , with the name. code number, price and it go to a little bill with a total below and generate a bill number, to know how much cost a dinner a this restaurant and then print this little bill and go with it to the restaurant.

How do i do this - wen you click the list, these items go to this bill
and you can add a coffe or delete a sirloin because it's
expensive...by example.

What do i need? please.
I'll be eterny gratefully.
Thanx !

Items+
Ok I made items for my game but aint to sure how should use them.

here are the ideas of how we shoudl use them
1.assaing each "Item" to a button (a-l) and you could hit that button to use it during the level.

2.Buy the items and use it for the whole level.

3.find each item in the level and use it through the remaining of that level.
What one do you think
1 2 or 3

Interactive Items
(Hello to all, this is my first day and post.)
I can't figure out how to set up an "inventory system" for an adventure game, where you pick up items, use them, etc.

Can anyone give me some tips?

Dockable Items, How ? - Please
anyone know how to make dockable items ?

taking a icon docking it then it activates another area ?

cant seem to find anything on the site, maybe i missed it i dont know. maybe theres another site ? eh

anyhelp would be great

Export Items
When you export out of flash to a .swf file does flash only export the symbols used in the movie or everything within the library? Also, is there a way to "trim" down the library to only include what's needed in the movie without going through by hand and deleting symbols? Any help is much appreciated.Thanks.

Un-used Library Items
Do un-used library items still contribute to the final .SWF file?

Adding Items?
Please help! I have just started using MX, and was just wondering how to add items to certain frames but not the ones before it (and delete them when I'm done with them). Thanks!

Moving Several Items Together
Hello,
I have several items (buttons, graphic symbols) that I want to move on the stage at the same time, as if they were all tied together and placed on the same layer. The problem is that each item has to be on one particular layer to be able to motion tween them. How can do that? Thank you for your help.

Date And Items
OK I work for an interior design company as a flash designer. What I am doing is creating a web page for the company that has a photo slide show with many different sections (Tables, desks, lamps, etc). What I want to do is create a line of text under the pictures that says "Last updated 4/3/2003 - 216 Items online in this category" for each category but I want to actually have it write the date and number of items in the category instead of me having to write it in every time. The categories are all split into separate swf files. and all the pictures are split up within those swfs. How would I be able to do this? If I can't I'll just have to type it all in.

-= Greendog =-

Library Items
Hi,

I've got a clip, which contains 2 further clips (say 2 squares as clips, in different layers, same frame), they are not on the stage, but are setup with a name in the library ready exporting to the actionscript.

My question is, do I have to put the parent clip to the stage to be able to get the relative distances between the child square clips? or is there way of getting that data without making an instance out of the parent clip?

thanks for any help

phil.

Sum Array Items
how the hell do i simply sum all array (number) items ?

// convert each element of the array to a number
for (var i=0; i < my_arr.length; i++) {
my_arr[i] = parseInt(my_arr[i]);
}
trace(my_arr); // output: 1, 12, 34

// loop through each array element, display it's datatype
for (var i=0; i < my_arr.length; i++) {
trace(typeof my_arr[i]); // output: number
}

now i want to sum the array values (1, 12, 34)

how ???!!?!?!?!

Looping Certain Items And Not Others
I would like to make a navigation bar that has little shapes that float in the background, not even having a function, but to look good. i want it so i can have my buttons functional and staying in the same place, yet have things moving in the background, can anyone tell me how i loop certain things in a movie and leave other things so they look like they dont move once i animate them in and are functional?

Help With Menu Items
this maybe a little confusing, but ill try to explain.
i have a menu that is 5 little boxes, with smaller,lighter coloured box in the middle of each. when i rollover a menu item, i want the little box to move onto the mouse, but not exiting the bigger box (so the mouse has a magnetic effect on the smaller boxes only when rolled over the boxes they are contained in). then when i roll out i want the little box to snap back into centre with an elastic effect. i have seen this done before and would like to know how its done. its a shame i dont have an example to show you or anything decent of my site so you can get a better idea of what im after.
if any of you understand what i want, a solution would be very very very much appreciated.
cheers guys
jh

Counting Items
Hey, I need to know if this is possible with flash ... or do I need to use PHP or XML

Here is what I want to do ... I'm setting up a website for a client and they want to upload new pics when they want, to add to the site ... so I'm going to dynamically place all the pics on the site using XML ... but here is the problem .... I need to run a loop to place all the images ... but I won't know how many images are going to be in the folder at any given time ...

My question is ... can flash get the number items in a folder ... or do I have to use PHP to get the number and send that back to flash ...

If I have to that why ... could someone help me write the code ...

And if the flash way ... what are the commands ....

thanks for the help

Library Items
I have a large list of files in my library, and i've ben trying to organise them into folders. I've noticed that if i have a folder at the top and want to drag a file from the bottom up to it, it wont let me! i have to rename the file to make it go near the folder i want to put it into. surely theres a better way than this? have i missed something??

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