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




Scrolling Dynamic Content



hello.

i'm semi-knowledgeable in actionscript, but not fluent, so i turn to you...

i'm working on a site for a jewelry designer who wanted to be able to update her inventory herself, so i prepared her site using a lot of xml documents. i was able to find a good tutorial online for making a gallery using xml, but now i'm having trouble scrolling the dynamic content. here's what i have in there to load the content:


Code:
myXML = new XML();
myXML.ignoreWhite = true;
myXML.onLoad = function(ok) {
if (ok) {
// process data
allGalleryData = this.firstChild.childNodes;
for (i=0; i<allGalleryData.length; i++) {
newPiece = sliderHolder_mc.slider_mc.attachMovie('template', 'piece'+i, i);
newPiece._y = i*newPiece._height;
newPiece.heading_txt.text = allGalleryData[i].firstChild.firstChild;
newPiece.desc_txt.text = allGalleryData[i].firstChild.nextSibling.firstChild;
newPiece.price_txt.text = allGalleryData[i].firstChild.nextSibling.nextSibling.firstChild;
newPiece.qty_txt.text = allGalleryData[i].firstChild.nextSibling.nextSibling.nextSibling.firstChild;
newPiece.load_btn.imageName = allGalleryData[i].firstChild.nextSibling.nextSibling.nextSibling.nextSibling.firstChild;
newPiece.holder_mc.loadMovie('earringthumbs/'+newPiece.load_btn.imageName);
newPiece.load_btn.onRelease = function() {
bigImage_mc.loadMovie('earrings/'+this.imageName);
};

}


} else {
trace("what file?");
}
};
myXML.load('xml/earrings.xml');
i hope that's enough info for a solution, let me know if should post something else. if anyone has a suggestion or a reference i can look at, i would greatly appreciate it. here is a link to the site in progress with a temporary solution for navigating the jewelry: http://www.lulubird.com/a/ in the jewlery section under either necklaces or earrings is where the galleries are. thanks in advance for any help!



ActionScript.org Forums > ActionScript Forums Group > ActionScript 1.0 (and below)
Posted on: 03-23-2006, 04:23 AM


View Complete Forum Thread with Replies

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

Scrolling Dynamic Content
hello.

i'm semi-knowledgeable in actionscript, but not fluent, so i turn to you...

i'm working on a site for a jewelry designer who wanted to be able to update her inventory herself, so i prepared her site using a lot of xml documents. i was able to find a good tutorial online for making a gallery using xml, but now i'm having trouble scrolling the dynamic content. i figured it should work fine using any of the ways to make a flash scroller, but it was being weird and not doing anything. in other sections of the site, it works just fine, but not with this stuff. here's what i have in there to load the content:


Code:
myXML = new XML();
myXML.ignoreWhite = true;
myXML.onLoad = function(ok) {
if (ok) {
// process data
allGalleryData = this.firstChild.childNodes;
for (i=0; i<allGalleryData.length; i++) {
newPiece = sliderHolder_mc.slider_mc.attachMovie('template', 'piece'+i, i);
newPiece._y = i*newPiece._height;
newPiece.heading_txt.text = allGalleryData[i].firstChild.firstChild;
newPiece.desc_txt.text = allGalleryData[i].firstChild.nextSibling.firstChild;
newPiece.price_txt.text = allGalleryData[i].firstChild.nextSibling.nextSibling.firstChild;
newPiece.qty_txt.text = allGalleryData[i].firstChild.nextSibling.nextSibling.nextSibling.firstChild;
newPiece.load_btn.imageName = allGalleryData[i].firstChild.nextSibling.nextSibling.nextSibling.nextSibling.firstChild;
newPiece.holder_mc.loadMovie('earringthumbs/'+newPiece.load_btn.imageName);
newPiece.load_btn.onRelease = function() {
bigImage_mc.loadMovie('earrings/'+this.imageName);
};

}


} else {
trace("what file?");
}
};
myXML.load('xml/earrings.xml');


ok i guess i should explain a little? its attaching a new instance of a movieclip that has the info from the xml, and putting it in the clip. the instances are loaded into a blank clip called slider_mc and that plus the scrolling stuff is in sliderHolder_mc. inside sliderHolder_mc there is also a button to attach a larger version on an image into a seperate blank clip. of course.

and this is the code for the scroll up as an example:


Code:
currentScroll = _parent.slider_mc.scroll;
max = _parent.slider_mc.maxscroll;
if (currentScroll>1) {
_parent.slider_mc.scroll = currentScroll-1;
}

_parent.scroll.slider._y = (currentScroll-1)/(max-1)*_parent.balkheight;



i hope that's enough info for a solution, let me know if should post something else. if anyone has a suggestion or a reference i can look at, i would greatly appreciate it. here is a link to the site in progress with a temporary solution for navigating the jewelry: http://www.lulubird.com/a/ in the jewlery section under either necklaces or earrings is where the galleries are. that crazy scrolly thing was used in the tutorial for loading the gallery, but it's not that appropriate here, i dont think. thanks in advance for any help!

Help With Scrolling Dynamic Content
i posted in another forum, but didnt get much of a response, so i thought maybe i should try over here.

i'm working on a site for a jewelry designer who wanted to be able to update her inventory herself, so i prepared her site in flash mx using a lot of xml documents. i was able to find a good tutorial online for making a gallery using xml, but now i'm having trouble scrolling the dynamic content. i figured it should work fine using any of the ways to make a flash scroller, but it was being weird and not doing anything. in other sections of the site, it works just fine, but not with this stuff. here's what i have in there to load the content:


Code:
myXML = new XML();
myXML.ignoreWhite = true;
myXML.onLoad = function(ok) {
if (ok) {
// process data
allGalleryData = this.firstChild.childNodes;
for (i=0; i<allGalleryData.length; i++) {
newPiece = sliderHolder_mc.slider_mc.attachMovie('template', 'piece'+i, i);
newPiece._y = i*newPiece._height;
newPiece.heading_txt.text = allGalleryData[i].firstChild.firstChild;
newPiece.desc_txt.text = allGalleryData[i].firstChild.nextSibling.firstChild;
newPiece.price_txt.text = allGalleryData[i].firstChild.nextSibling.nextSibling.firstChild;
newPiece.qty_txt.text = allGalleryData[i].firstChild.nextSibling.nextSibling.nextSibling.fi rstChild;
newPiece.load_btn.imageName = allGalleryData[i].firstChild.nextSibling.nextSibling.nextSibling.ne xtSibling.firstChild;
newPiece.holder_mc.loadMovie('earringthumbs/'+newPiece.load_btn.imageName);
newPiece.load_btn.onRelease = function() {
bigImage_mc.loadMovie('earrings/'+this.imageName);
};

}


} else {
trace("what file?");
}
};
myXML.load('xml/earrings.xml');


ok i guess i should explain a little? its attaching a new instance of a movieclip that has the info from the xml, and putting it in the clip. the instances are loaded into a blank clip called slider_mc and that plus the scrolling stuff is in sliderHolder_mc. inside sliderHolder_mc there is also a button to attach a larger version on an image into a seperate blank clip. of course.

and this is the code for the scroll up as an example:


Code:
currentScroll = _parent.slider_mc.scroll;
max = _parent.slider_mc.maxscroll;
if (currentScroll>1) {
_parent.slider_mc.scroll = currentScroll-1;
}

_parent.scroll.slider._y = (currentScroll-1)/(max-1)*_parent.balkheight;


i hope that's enough info for a solution, please let me know if should post something else. if anyone has a suggestion or a reference i can look at, i would greatly appreciate it. here is a link to the site in progress with a temporary solution for navigating the jewelry: http://www.lulubird.com/a/ in the jewlery section under either necklaces or earrings is where the galleries are. that crazy scrolly thing was used in the tutorial for loading the gallery, but it's not that appropriate here, i dont think. thanks in advance for any help!

Scrolling Dynamic Content
Hi--

I have a scrollBar(from scratch) which works fine with content within the movie(ie on the stage --nothing dynamic). However, how would I get it to work with dynamically loaded content, either attachMovie or loadMovie (as external swf)?

Here is the code(working, nothing dynamic):


ActionScript Code:
//scrollBar-----------------------------------------------------------------------
// define scroll gutter boundaries
gutterLeft = scrollGutter._x;
gutterTop = scrollGutter._y;
gutterRight = scrollGutter._x + scrollGutter._width - scrollBar._width;
gutterBottom = scrollGutter._y + scrollGutter._height - scrollBar._height;

// define content boundaries
contentTop = scrollGutter._y + scrollGutter._height - myContent._height;
contentBottom = myContent._y;

scrollBar.useHandCursor = true;

scrollBar.onRollOver = function(){
    this._alpha = 65;
}
scrollBar.onRollOut = function(){
    this._alpha = 100;
}

scrollBar.onPress = function () {
    // lockcenter (true or false), left, top, right, bottom
    this.startDrag(false, gutterLeft, gutterTop, gutterRight, gutterBottom);

    this.onMouseMove = function () {
        // moves the content
        //trace(myContent._y);
        var percent = (this._y-gutterTop)/(gutterBottom-gutterTop);
        myContent._y = percent*(contentTop-contentBottom)+contentBottom;
        //pageLoad_mc.myContent._y +=10;
        //trace(contentBottom);
        //trace(contentTop);
    }
}

scrollBar.onRelease = function () {
    this.stopDrag();
    // kill mouse movement
    this.onMouseMove = null;
    //this.onMouseMove = undefined;
}

scrollBar.onReleaseOutside = function () {
    this.stopDrag();
    // kill mouse movement
    this.onMouseMove = null;
    //this.onMouseMove = undefined;
}

When I try to load dynamically, I am calling it by:

contentBottom = dynamicContent.myContent._y;
etc

and the scrollBottom and scrollTop trace as undefined and NaN. But I can trace it by trace(dynamicContent.myContent._y);

Any help would be appreciated.

Thanks

Dynamic XML Scrolling Content: Help?
I'm trying to build a news page in Flash MX. I figured it would be best to build it using the wonders of XML fed text boxes.

I'm very inexperienced with Actionscript and XML. Does anyone know of a tutorial out there that would show me how to load XML data via the user clicking a button AND when that data is loaded, if it has more lines than the textbox, it would trigger a custom scroll bar to appear???

Any ideas?

I've looked through the tutorials on Kirupa about XML but they seem to end at loading one string of XML. My attempts at button controlled XML feeds have been highly UNsuccessful!

Can anyone help please?

Here something similar to what I'm looking for:
http://www.arch.auburn.edu/

Thanks!

Scrolling Dynamic Content
hi there, i have some code, and for some reason it will only scroll if a text-box is static, and i need it to scroll for dynamic content, the content is externally loaded.
Code:
fscommand("allowscale", "false");
bar.useHandCursor = dragger.useHandCursor=false;
space = 20;
friction = 0.9;
speed = 4;
y = dragger._y;
top = main._y;
bottom = main._y+mask_mc._height-main._height-space;

moveDragger = function (d) {
if ((dragger._y>=y+bar._height-dragger._height && d == 1) || (dragger._y<=y && d == -1)) {
clearInterval(myInterval);
} else {
dragger._y += d;
dragger.scrollEase();
updateAfterEvent();
}
};
up_btn.onPress = function() {
myInterval = setInterval(moveDragger, 18, -1);
};
down_btn.onPress = function() {
myInterval = setInterval(moveDragger, 18, 1);
};
up_btn.onMouseUp = down_btn.onMouseUp=function () {
clearInterval(myInterval);
};
MovieClip.prototype.scrollEase = function() {
this.onEnterFrame = function() {
if (Math.abs(dy) == 0 && drag == false) {
delete this.onEnterFrame;
}
r = (this._y-y)/(bar._height-this._height);
dy = Math.round((((top-(top-bottom)*r)-main._y)/speed)*friction);
main._y += dy;
};
};

Scrolling With Dynamic Content
Hi,

what is the best way to do scrolling list which is looping down to up? I have a movieclip and I load images into it then I want to make scroll which never stop. The problem is how to use duplicatemovieclip to make it endless?

Thanks

Scrolling A Dynamic Text Content
Hi!

Does anyone has a solution for a scrollable dynamic text? The text would be loaded from an external source and it's length is various.

I've used the "text area" component till now but I don't like it's design and it is too big for my movie.

Thanks,
Peter

[ Populating Dynamic Scrolling Content ]
Hi,

I am using a scrolling script for a movie clip "myMovie" that contains a dynamic textfield and other clips and elements which are scrolled with custom scrollbar based on the height of the myMove which is masked.

The scrolling ration is based on the size/height of that main MovieClip which contains all these elemets of course so that if I put more elements the height changes and readjusts the scrolling ratio.

The problem I am having is that for example my scrolling movie clip contains dynamically created buttons , now the script only detects the height of the movie based on the static elements inside the clip. And all scripts I found use the same method .height()

If I load buttons or any other elemets dynamically the myMove.height can't dettect that the size of the movie clip is now bigger. Dynamic elements don't seem to be detected at all when it comes to detecting the size of the clip that contains them ... so my scrolling height does not readjust to match the correct scrolling ratio ...

Same works for dynamic textfield what ever the original height was set that's how much it will scroll ...If I want to add text I need to change height of the textfield to match it manually ..which is pain

Is there a way to overcome this ???

thanks

Scrolling Movieclip With Dynamic Content
Hello,

Here i've got a fla file i have made. It get's the variables from a html page (it normally gets the variables from an asp page but i have changed it for now just to a html page to see what's going on.) After that it puts a cross or a check mark in front of the person. But there are like 9 people who has a cross or a check mark infront of his name(teller is the counter it gives 9). But somehow i can't scroll down to see the rest of it. Does someone know how to fix this problem?

Thanks in advance.

(i have used MX 2004)

Scrolling Movieclip With Dynamic Content
Hello,

Here i've got a fla file i have made. It get's the variables from a html page (it normally gets the variables from an asp page but i have changed it for now just to a html page to see what's going on.) After that it puts a cross or a check mark in front of the person. But there are like 9 people who has a cross or a check mark infront of his name(teller is the counter it gives 9). But somehow i can't scroll down to see the rest of it. Does someone know how to fix this problem?

Thanks in advance.

(i have used MX 2004)

[ Populating Dynamic Scrolling Content ]
Hi,

I am using a scrolling script for a movie clip "myMovie" that contains a dynamic textfield and other clips and elements which are scrolled with custom scrollbar based on the height of the myMove which is masked.

The scrolling ration is based on the size/height of that main MovieClip which contains all these elemets of course so that if I put more elements the height changes and readjusts the scrolling ratio.

The problem I am having is that for example my scrolling movie clip contains dynamically created buttons , now the script only detects the height of the movie based on the static elements inside the clip. And all scripts I found use the same method .height()

If I load buttons or any other elemets dynamically the myMove.height can't dettect that the size of the movie clip is now bigger. Dynamic elements don't seem to be detected at all when it comes to detecting the size of the clip that contains them ... so my scrolling height does not readjust to match the correct scrolling ratio ...

So for example if I am building dynamic scrolling list of buttons which I want to easilly update how can I make scroll height detect these dynamically created buttons so that it know how much to scroll ?

Is there a way to overcome this ???

thanks

Auto Sizing Dynamic Scrolling Content
Hi I am using AMFPHP to populate some scrolling content ...

The problem is my textfields and in general the content doesn't autosize to match the scrolling height ...

I've tried using textfield.autoSize = "true" but it didn't work ...

any tips or suggestions how can I do this ???

thanks

Trouble Scrolling Dynamic, Xml Generated Content
I had scroll functionality working with the following code:


Code:
scrolling = function () {
var scrollHeight:Number = scrollTrack._height;
var contentHeight:Number = contentMain._height + 85;
var scrollFaceHeight:Number = scrollFace._height;
var maskHeight:Number = maskedView._height;
var initPosition:Number = scrollFace._y=scrollTrack._y;
var initContentPos:Number = contentMain._y;
var finalContentPos:Number = maskHeight-contentHeight+initContentPos;
var left:Number = scrollTrack._x;
var top:Number = scrollTrack._y;
var right:Number = scrollTrack._x;
var bottom:Number = scrollTrack._height-scrollFaceHeight+scrollTrack._y;
var dy:Number = 0;
var speed:Number = 10;
var moveVal:Number = (contentHeight-maskHeight)/(scrollHeight-scrollFaceHeight);

scrollFace.onPress = function() {
var currPos:Number = this._y;
startDrag(this, false, left, top, right, bottom);
this.onMouseMove = function() {
dy = Math.abs(initPosition-this._y);
contentMain._y = Math.round(dy*-1*moveVal+initContentPos);
};
};
scrollFace.onMouseUp = function() {
stopDrag();
delete this.onMouseMove;
};
btnUp.onPress = function() {
this.onEnterFrame = function() {
if (contentMain._y+speed<maskedView._y) {
if (scrollFace._y<=top) {
scrollFace._y = top;
} else {
scrollFace._y -= speed/moveVal;
}
contentMain._y += speed;
} else {
scrollFace._y = top;
contentMain._y = maskedView._y;
delete this.onEnterFrame;
}
};
};
btnUp.onDragOut = function() {
delete this.onEnterFrame;
};
btnUp.onRelease = function() {
delete this.onEnterFrame;
};
btnDown.onPress = function() {
this.onEnterFrame = function() {
if (contentMain._y-speed>finalContentPos) {
if (scrollFace._y>=bottom) {
scrollFace._y = bottom;
} else {
scrollFace._y += speed/moveVal;
}
contentMain._y -= speed;
} else {
scrollFace._y = bottom;
contentMain._y = finalContentPos;
delete this.onEnterFrame;
}
};
};
btnDown.onRelease = function() {
delete this.onEnterFrame;
};
btnDown.onDragOut = function() {
delete this.onEnterFrame;
};

if (contentHeight<maskHeight) {
scrollFace._visible = false;
btnUp.enabled = false;
btnDown.enabled = false;
} else {
scrollFace._visible = true;
btnUp.enabled = true;
btnDown.enabled = true;
}
};
scrolling();
Then the client wanted to be able to update content via an external XML file. Here is the code that parses the XML:


Code:
var my_xml = new XML();
my_xml.ignoreWhite = true;
my_xml.onLoad = function(success) {
// has XML loaded
if (success) {
var recInfo = my_xml.firstChild.childNodes;
var itemCount = 0;
var yCount = 0;
for (var i = 0; i<recInfo.length; i++) {
var recLink = recInfo[i].attributes.link;
var recTitle = recInfo[i].attributes.title;
var recDesc = recInfo[i].attributes.description;
var item = _root.contentBox.contentMain.attachMovie("recipeEntry_mc", "item"+itemCount, itemCount);
item.titleBox.text = recTitle;
item.descBox.text = recDesc;
item.link = recLink;
item.linkSymbol.onRelease = function() {
getURL(this._parent.link, "_blank");
};
item.descBox._height = item.descBox.textHeight + 8;
item._y = yCount;
yCount += item._height + 10;
itemCount++;

}

}

};
// load XML file
my_xml.load("sample.xml");
The problem is that the scroll functionality does not work with the XML derived content because for some reason it is not recognizing the height of the contentMain movie clip.

I've tried placing a fixed height object inside contentMain and the scrolling works based on the height of that object--but this does not solve anything as the height will change when recipes are added or taken away. I've tried sizing contentMain manually, which only stretches the data inside, and still is not recognized by the scrolling function. I would like the make sure that when contentHeight is defined in the scrolling function, that it regognizes the combined height of all instances of recipeEntry_mc that are generated within contentMain, thus allowing me to scroll this content as I could before when it was static.

Can anyone help, please?

Scrolling Dynamic LoadMovie Content (Iso: Paladin)
Hey yall,

I used Paladin's PHP/Flash tutorial that automaticaly parsed news stories in flash. In my modification, I switched the stories with image URL's, and made the dynamic text boxes into Movie clips. I then set it so that the movie clips load the thumbnail URL, and upon release, they load the larger image. You can see it in action at www.goodfellaz.com/flashtest/image/image.html

Currently, I wish to make it so that the horizontal display of images becomes a horizontal scroll bar (no vertical) when the width of the movie is reached. Idealy, i'd like to be able to set the max width myself, rather than have it be a percentage of the movie.

Does anyone know how I can do this? I have the FLA available if anyone would like me to PM the address to them.

Masking And Scrolling A Text Field Filled With Dynamic Content (FL 5)
*help*
I have a text field that must scroll horizontally. It is filled with content read from an external txt file.
I need to scroll the content within the field cause it is longer than the width of the text box.
this is a single line text field that must scroll a varying distance depending on the length of the imported txt line.
PLEASE help.

If anyone can help i will bake you cookies!
Thanks,

Dynamic Mask Over Dynamic Content Loses Content
I have come across a problem that so far I have no solutions for at all. I have a movieclip which has a dynamic jpeg loaded into it, then the movieclip is being masked. The issue is I need to have the mask that is on top of the movieclip change, but once I make any change to the mask I completely lose the dynamic jpeg that was loaded into the masked movieclip. Is there a way around this at all?

Dynamic Content Presented Over All Normal Content
I have a bunch of generated movie clips that I am creating using the duplicate movie clip function.

The problem I am having is the generated clips are covering up content. Are there any options....(I really don't feel like creating both layer a and b dynamically.)


this is how the movie is publishing:

-----layer A----- (generated content)
-----layer B----- (normal non-generated content)
-----layer C----- (normal non-generated content)


this is how i want the movie to publish:


-----layer A----- (normal non-generated content)
-----layer B----- (generated content)
-----layer C----- (normal non-generated content)


thanks for your help,
Reid

Scrolling Content Help
Hi,

I have huge problem with trying to scroll content.

The text and images are in a movie clip but i cant get the action scripting to work so it makes it move up and down with the buttons i have made!

I have been pullin out my hair for days with this so please could someone download my file that i have linked on the bottom and sort out the coding for me and then send it on to marekuk@gmail.com

this would help me out tons. all i need is someone to put the actionscript put into the buttons so it scrolls the content

http://s8.yousendit.com/d.aspx?id=1F...DDACC8B9A78618

Many Thanks
Marek

Scrolling Content
http://www.saturn.com/saturn/detour/...s_cw_052506_go

As you can see on the left, you can scroll through the images. How do I create a scrollbar using images or mc's and not just dynamic text. I haven't had much luck finding a tutorial. Gracias.

Scrolling XML Content
Hello there.

I've taken over development of a website and need help!

I'm trying to scroll dynamically loaded content from XML which is integrated with CMS.

have a look here (from the menu, navigate to 'artists', then to 'bio' to see what I mean...);

http://www.sophiegannongallery.com.au/



As you can see, all of the bio's scroll down the same distance, Even though the content for each bio changes significantly in length.

The code I have to setup the scrollbar is as follows:

function setupScroller():Void {
// set up content_mc info
contentBottom = _parent.content_mc._y;
//this was set at 0-80;
contentTop = (bg_mc._y+bg_mc._height)-_parent.content_mc._height-0-80;
trace("_parent.content_mc._height "+_parent.content_mc._height);
// set up gutter info
gutterTop = bg_mc._y;
gutterBottom = bg_mc._y+bg_mc._height-scroller_mc._height;
//


// if the content is smaller than the scroll height, hide scroller
if (bg_mc._height>_parent.content_mc._height) {
this._visible = false;
}


}
would it be something i would have to change within here?

I have attached the .fla file if you fancy a peek.

If you need more info, let me know!

Thanks

B

Scrolling Content
Firstly, I'm brand-spankin' new to Flash, so forgive me if I sound ignorant.

I've browsed topics in here and while portions of my question have been answered, I still don't quite understand how to go about achieving what I'm going for. I'm trying to make a scrolling box containing both text and images. I know how to make a scrollable text area, but I'm not sure how to include images. I saw something that said that this is possible using html formated text and entering the image with the <img> tags, but I'm not clear on how this works. I have clicked the 'render text as html' option in the properties inspector and have the image located in my library. How do I contain the image with in the scrollable text field?

Also, is there a way to have a single scroll bar effect all content within a certain area? For example, the scroll bar within an internet browser scrolls all content within the viewing area. I'm wondering if I can have differently formatted and located blocks of text, images and design all deignated to scroll by a single scroll bar.

I hope I'm making sense, and thank you!

Scrolling Content
Firstly, I'm brand-spankin' new to Flash, so forgive me if I sound ignorant.

I've browsed topics in here and while portions of my question have been answered, I still don't quite understand how to go about achieving what I'm going for. I'm trying to make a scrolling box containing both text and images. I know how to make a scrollable text area, but I'm not sure how to include images. I thoroughly read the help file located here that said that this is possible using html formated text and entering the image with the <img> tags, but I'm not clear on how this works. I have clicked the 'render text as html' option in the properties inspector and have the image located in my library. I have tried writing the HTML directly in to the box and also within a separate actions layer within the actionscript box.
I've seen that in order to have text show you enter the following "textbox.htmlText =". Is there something other than the basic <img> tag that must be entered to make a picture show up?? This is all very confusing to me! If this were possible without ActionScript it'd be a heckuva lot more convenient.

Also, is there a way to have a single scroll bar effect all content within a certain area? For example, the scroll bar within an internet browser scrolls all content within the viewing area. I'm wondering if I can have differently formatted and located blocks of text, images and design all designated to scroll by a single scroll bar.

Kinda got thrown in to designing the company website in flash and I've got to get this live by tomorrow. I hope I'm making sense, and thank you!

Scrolling Content
Hello

I have tried scrolling text in kirupas tutorial and found it very good i would like to know is it possible to scroll more then just text id like to be able to create a biography page and a pictures page but as its in flash id like the content to be scrolling in a flash movie.

if so how do i begin to do this ?

Scrolling XML Content.
I am pretty new to actionscript, I have been looking all over the forums for an answer on how to create a flash file capable of displaying multiple texts loaded from XML, that automatically expands when the amount of elements exceeds the give screen size or mask. Can anyone tell me where I can find such a tutorial with a working fla.?

Many thanks


BonWhis

Too Much Scrolling Content?
I have a homemade movieclip scroller that I made and I have a lot of content that is going into this one particular section of this Web site I'm working on. It's making the scrollable clip over 2000 pixels high. And what's happening is my content is disappearing after so many pixels of height. It's like it will only show content that's a certain amount high and everything after that it just clips. Has anyone ever experienced this or have a solution? Thanks.

Scrolling Content
Hello all,

I have a movieclip entitled "scrollme" contaning all my "pages" which scroll onto the stage when I press a button.


On my actions layer I have the following code to set up the parameters of the scroll:

// move function
MovieClip.prototype.goto = function(pos, speed) {
this.onEnterFrame = function() {
this._x += (pos-this._x)/speed;
if (Math.abs(pos-this._x)<0.5) {
this._x = pos;
delete this.onEnterFrame;
}
};
};
stop();


Now, lets take the code from one of my buttons:

on (release) {
onRelease = _root.scrollme.goto(0, 7);
}


This works absolutely fine, but I got stuck when I tried to add a _y possition equation, nothing worked. Any ideas how I can combine both _x and _y in the same script, every variation I try just makes it go insane.

Thanks

[AS] Scrolling Content...help
Last edited by ernande : 2005-07-14 at 21:05.
























So I've modified a scrollbar from Josh Davis' book to scroll vertically instead of horizontally. I'm having trouble getting the bottom of my content clip to line up FLUSH with the bottom of my scrollpane gutter clip.

I can't quite wrap my head around what variables to adjust to make it so that the bottom of my content lines up with the bottom of my scrollpane. Could somebody point me in the right direction?

My FLA is set up with 3 movieclips on the stage:

- scrollbarGutter_mc
- scrollbar_mc
- content_mc

I've attached the following code to the first frame of the actions layer in the scrollbar_mc clip...


Code:
//sets up content info
contentBottom = _root.content_mc._y;
contentTop = _root.scrollbarGutter_mc._height-_root.content_mc._height;




//sets up gutter pane info for the scrollbar
gutterTop = _root.scrollbarGutter_mc._y+1;
gutterBottom = _root.scrollbarGutter_mc._y+_root.scrollbarGutter_mc._height-this._height-1;




//setting initial variables
FRICTION = .5;
RATIO = .5;
dragging = false;




//dont use hand icon
this.useHandCursor = false;




//handle press event
this.onPress = function(){
this.startDrag (false, this._x, gutterTop, this._x, gutterBottom);
dragging = true;
this.onMouseMove = function(){
updateAfterEvent();
};
};




//handle release event
this.onRelease = this.onReleaseOutside = function(){
this.onMouseMove = undefined;
this.stopDrag();
dragging = false;
ySpeed = (newypos-oldypos)*RATIO;
};




//handle onEnterFrame event
this.onEnterFrame = function(){
if(!dragging){
oldypos = this._y;
newypos = oldypos+ySpeed;
ySpeed *= FRICTION;
if(newypos>gutterBottom || newypos<gutterTop){
ySpeed *= -FRICTION;
newypos = oldypos;
}
this._y = newypos;
//always move content whether dragging or not
var percent = (this._y-gutterTop)/(gutterBottom-gutterTop);
this._parent.content_mc._y = percent*(contentTop-contentBottom)+contentBottom;
}else{
oldypos = newypos;
newypos = this._y;
//always move content whether dragging or not
var percent = (this._y-gutterTop)/(gutterBottom-gutterTop);
this._parent.content_mc._y = percent*(contentTop-contentBottom)+contentBottom;
}
};
Example
Source File

Thanks!

Scrolling XML Content
Hello there.

I've taken over development of a website and need help!

I'm trying to scroll dynamically loaded content from XML which is integrated with CMS.

have a look here (from the menu, navigate to 'artists', then to 'bio' to see what I mean...);

http://www.sophiegannongallery.com.au/



As you can see, all of the bio's scroll down the same distance, Even though the content for each bio changes significantly in length.

The code I have to setup the scrollbar is as follows:

function setupScroller():Void {
// set up content_mc info
contentBottom = _parent.content_mc._y;
//this was set at 0-80;
contentTop = (bg_mc._y+bg_mc._height)-_parent.content_mc._height-0-80;
trace("_parent.content_mc._height "+_parent.content_mc._height);
// set up gutter info
gutterTop = bg_mc._y;
gutterBottom = bg_mc._y+bg_mc._height-scroller_mc._height;
//


// if the content is smaller than the scroll height, hide scroller
if (bg_mc._height>_parent.content_mc._height) {
this._visible = false;
}


}
would it be something i would have to change within here?

If you need more info, let me know!

Thanks

B

Scrolling Content Window?
Does anyone know of a .fla or good tutorial on scrolling the content area when a nav. button is clicked?

I've seen this nav. system alot lately (most recently on webagent007,Onyro,and alot of praystation/Kioken sites)and just wondering how it's done.

Pretty slick I think

Ryan

Scrolling Content Other Than Text
Hey all;

Wondering how you can vertically scroll jpeg images. The images are in an externally loaded swf, called into a "container" MC via loadMovie();. Any help is appreciated.
---
bryce

MX: Scrolling Content Without Using MX Components
Hello all,

Basically, I'm trying to create a scrolling interface like you would have in a Command and Conquer or Warcraft type game. I have a 1500x1500 bitmap and my flash movie is 650x400. When the user's cursor hits an edge (this could be a very thin MC or button) I want to scroll continuously in that direction. I would like this to work for left,right,up and down. At the moment, I have it working very simply using two buttons (left and right) and when you mouseover on one it subtracts 50pixels from the _x value of the img and the other adds 50 pixels. What I'm trying to get working is a method to continuously scroll in one direction without having to remove the mouse cursor from the button and replace it. I'd also like to have the scrolling "stop" when it reaches the end of the background image but that is simple enough if I could get the continuous scrolling to work. Any ideas?

Scrolling Content Help With Actionscript
Hi,

I have huge problem with trying to scroll content.

The text and images are in a movie clip but i cant get the action scripting to work so it makes it move up and down with the buttons i have made!

I have been pullin out my hair for days with this so please could someone download my file that i have linked on the bottom and sort out the coding for me and then send it on to marekuk@gmail.com

this would help me out tons. all i need is someone to put the actionscript put into the buttons so it scrolls the content

Many Thanks
Marek

Scrolling Content - Quickie
I found this code that allows me to scroll content inside of a MC using a custom scroller. But what I need to change is this. I am going to have multiple frames inside of the MC with different content and I want the scroller to be able to determine how far to scroll based on that height. Here is the code

onClipEvent(load){
goY = this._y;
myY = this._y;
ySpeed = 0;
clicked = false;
delay = 20;
//I need to change barDis to equal the hieght of my movie.
barDis = 119;
barPercent = 0;
}
onClipEvent(enterFrame){
if(math.round(myY) != math.round(goY) || clicked == true){
barPercent = (_parent.scrollbar.bar._y/barDis)*100;
goY = -153.1 - ((155/100)*barPercent);
myY = this.movies._y;
ySpeed = (myY-goY)/delay;
this.movies._y -= ySpeed;
}
}

I need barDis to set the scrollable area based on the ._height of the mc. Once again this will change depending on which frame you are on.

Any help would be appreciated.

ScrollPane Not Scrolling My Content
Code:
System.security.allowDomain("http://www.helpexamples.com");
this.createClassObject(mx.containers.ScrollPane, "my_sp", 20);
my_sp.move(50, 30);
my_sp.setSize(180, 160);
my_sp.contentPath = "http://www.helpexamples.com/flash/images/image2.jpg";
my_sp.createTextField("txt",10,10,10,100,100);
my_sp.txt.text="asdasdas";


This code is scrolling the picture but is not scrolling the text field! Please hel me!

[F8] Scrolling Content - I'm So Frusterated
Hi all,

I want to create a fairly simple website, where the content scrolls into place when you press the navigation buttons. I know it has to do with x/y pos scrolling, but I don't have a clue how to make it work!!!


There's a good example of this online here: http://www.skichute4.com.au/
and I found this file here: http://www.flashkit.com/movies/Anima...1724/index.php


Can anyone explain it to me, or point me to a tutorial or another forum thread??

I'd really appreciate it!

Thanks very much!

Scrolling Content With Links?
Is it possible to scroll invisible buttons in a window?

I have a window with scrollable content (images and text, both laid out in Flash, not HTML). I'd like the images to link to another site in a new window using getURL and the only way I can think of doing this is to use invisible buttons over the images.

BUT, the invisible buttons wont scroll with the rest of the content. When the user scrolls the content up or down, the invisible buttons don't move so the links "come off" the images. How can I make this work?
Should I being trying to solve this another way?

Any help is really appreciated!!

Continuously Scrolling Content
Again I cant think of how to do this. But basically I want to take pieces of art that are loopable end to end and have them move from left to right continuously at different speeds. the speeds being determined at runtime simple random stuff.

think of a scene with grass scrolling from left ot right automatically repeating and never breaking.

how would one accomplish this easily. thanks

drew

Horizontal Scrolling Content
Had a friend I'm doing a site for forward this site to me as an example. How's the scrolling of the content areas done and the transitions so smooth from one area to the other? Any pointers or links to the proper resources would be much appreciated!

http://kennylattimore.com/

Scrolling Content On Kirupa
Hey!

Has anyone used the tutorial on the scrolling content? I used it but for some reason when you click the UP arrow it thinks there is more content at the top of the screen. Does anyone know why that happens?

My mask is only around my movie clip and the movie clip is exactly the size i need it to be.

has anyone else had this similar glitch?

Any help is much appreciated

the file is : http://www.online-redefined.com/diwebsite/

Bluring Scrolling Content...
I have seen this a couple of times on various places (that i can't remember off the top of my head) but basically when you use the scroll bar on a text box the text in side has a motion blur and then eases back to normal when you stop.

Does this make sense?

Im trying to figure out how to achieve this for a project im working on.

Scrolling Content Troubles
Hey guys, I've got a quick question that I know all you hotshot Actionscript programmers can help me out with.

I recently created a custom scrollbar using a tutorial from kirupa.com for reference. You can find the kirupa stuff at

http://www.kirupa.com/developer/flash8/scrollbar.htm

I'm trying to put a crapton of text into a static textbox for the scrolling content. My problem is this: the content area won't dispaly what it's supposed to once the text reaches a certain amount inside the textbox. In other words, it looks like the static text field will only scroll properly for a certain amount of text...when I try to add more text, the content either squishes together (thus becoming unreadable), or simply won't display (in which case, blank space appears at the bottom of the scrollable area). I know there's probably a better way to do scrolling than what I'm doing (like NOT using a huge amount of raw text in a textbox), but unfortunately I'm still very new to actionscript and am trying to take the easiest way out.

Soooo, any suggestions? I'd be MOST appreciative. Thanks dudes!

[AS/components] Content Scrolling.
I've been trying to find ways to scroll multiple dynamic text fields with one scrollbar. Also I'd like to scroll a movie clip, or group of images and text fields together - The scroller can not simply be up and down buttons that the user clicks, I want a drag bar for like the midsection and the mousewheel must work also. I sort of need the same effect that one gets using a scrollpane. I WOULD just use scrollpanes for each page that I want to scroll, but using a scrollpane to scroll through dynamic text fields is awkward and unneccessary. The problem comes in when I need all the scrollbars to look and act the same. If anyone has some suggestions, useful components, script segments - anything - please reply. Thanks for all your help. A very basic preview of what I'm working on is available at:

http://dyn.surreal-media.com/e/mfair2.htm

-edi0t/mike

Scrolling Content (parameters)
Ok I have a xml loading image gallery. It has a back story if you are interested.
Todd Lajoie is resposible for the success of it. I have gotten to a good spot with it the problem I'm having right now is getting it to scroll. I am trying to make this as dynamic as possible and I can't find out the equation that will work.

Code:

scrollUp.onRelease = function():Void
      {
         scrollDirection = "down";
         scrollBlocks();
      };
      scrollDn.onRelease = function():Void
      {
         scrollDirection = "up";
         scrollBlocks();
      };
      scrollDn.onPress = function():Void
      {
         //scrollText();
         //scrollBlocks();
      };
      scrollUp.onPress = function():Void
      {
         //scrollBlocks();
         //scrollText();
      };
      function scrollBlocks():Void
      {
         if (scrollDirection == "up")
         {
            if (holder_mc._y <= 95)
            {
               holder_mc._y -= 55;
            }
            if (holder_mc._y >= 95)
            {
               holder_mc._y = 90;
            }
         }
         else if (scrollDirection == "down")
         {
            if (holder_mc._y >= 95)
            {
               holder_mc._y += 55;
            }
            if (holder_mc._y <= 95)
            {
               holder_mc._y = 90;
            }
         }
      }
      function scrollText():Void
      {
         _root.onEnterFrame = function():Void
         {
            if (scrollDirection == "up")
            {
               holder_mc._y -= 1;
            }
            else if (scrollDirection == "down")
            {
               holder_mc._y += 1;
            }
         };
      }
      defaulter.onRelease = function():Void
      {
         holder_mc._y = 90;
         delete x;
      };

I'm thinking if an equation can scroll up to the last row no matter how many rows that is that would be awesome so there is no changing the swf when the xml increases. Does that make sense?

If any one has any answers or ideas that would be great.

http://www.madonnelly.com/new/galleryScroll.zip

Relative Scrolling Content And Navigation
I'm trying to use a navigation where there is 5 scenes that scroll when clicked by a nav button. everything is fine but the first picture is all blurred with streaks. check it out

what do i do?

O4.html

Relative Scrolling Content And Navigation
I found a tutorial at:
http://www.actionscript.org/tutorial..._scrol_1.shtml

and copied it. However, I made my mask a lot longer. Theirs is 160px wide, whereas I made mine 700px wide. I made a filled rectangle about 1800px in length and used that as the scrolling image. Once it was all working I imported an image I had created which is extremely long. I tried to use this but it doesn't work... the image doesn't start where it is supposed to and half the image is missing when you preview it.

I put the old filled rectangle back (which isn't as long as my image) and it worked fine again. Does anyone have any idea what the problem could be ? Is there a limit to how long images can be that you import ?

Sorry if I haven't explained it very well... it's hard to ! lol.

Req: Scrolling Mixed Content Suggestions
Hi there,

I've got a multi-lingual movie that is using xml to fill dynamic textfields. These textfields are dynamic textfields that reside in a main MC container and are presently displaying UTF-8 content perfectly, and I've got some text-only textfields scrolling with a nice custom scrollbar. However, here is the new situation which I need some opinions and help with:

I've got to make some tables that I've created using a combination of MC blocks and positioned dynamic textfields, scrollable. Generally, I'd embed the font so as to scroll the text and table as an MC under a mask layer, but have heard about how embedding fonts can hinder the display of foreign characters, let alone the inconsistency that anti-aliased text would introduce to the movie - using a pixel-font is no longer an option either, as the client is happy with the Verdana font.

Is anyone familiar with the ScrollPane component? The first thing that cautions me away, is the inability to remove the border from it - as previously mentioned, the client is insistant that the scrollbar (ScrollPane) appear identical to my text-only scrollbar. I tried it quickly by setting the path to an exported instance of the table MC, but the ScrollPane was big, empty, and white.

I am also pondering the old method of placing the MC under a mask, but am unsure about the limitations of embedding a font for a multi-lingual movie. Is there anything I need to look out for?

I'm using Flash 8 with ActionScript 1.0, and am looking to publish for Flash Player 7 using ActionScript 1.0.

Any help would be very much appreciated.

Relative Scrolling Content And Navigation
I have a main movie which uses actionscript 2.0

then i load a movie which contains a gallery using actionscript 1.0

the gallery movie uses the reletive scroll technique to browse through images
with the code:

/bar:target = 1;
/bar:direction = "f";

etc

Anyway
when I use unload movie
the bar code must be still running beacuse my main movie starts jumping frames

also I tried using a butonon the main movie to send the loaded movie (gallery to a frame with no code)

the loaded movie goes to a frame with no code but the main movie starts playing through frames again

is there a way I can stop the releative scroll from messing everything up when i unload the movie

or send it to frame to cancle the bar function

IF SO PLEASE TELL ME, AM GOING CRAZY HERE !!!!!

[ Scrolling Content With Scroll Button ]
Hi,

I have used various scrolling scripts but most seem out of date nowdays ...
I am hoping if someone has nice scrolling script with easing (for custom scroll content images and text) that can also be used with the mouse scroll button
and is portable easy to drop in to the page without having to adjust tons of parameters.

I found one script which is not all that flexible as it seem to be relevant to the top left corner ... most issues arise when I mask the text ... so I wont go into that unless there are no good solutions out there...

something like oringe.com just so that it can be used anywhere in the page not just full screen ....

Thanks

[F8] Stop Scrolling External Content
hello everybody, here's my question:
i figured how to get xml external file to load external contents in my swf. that's is already a lot for my actionscript knowledge level!
Now i want to scroll the contents (basically text and images) which it could be any size, i mean i can constantly update it with new stuff.

the problem is that so far i can scroll but i can't make it stop when the content is finished. and that happens in both ways: up and down.
i want it to stop scrolling when i get at top and stop when it gets at the end
how could i do?

here's the scroll down button script

on (press, release) {
setProperty("home", _y, getProperty("home", _y)-20);
}

i hope this was clear enough
anyone could help me?

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