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




AttachMovie And Scrolling, Errr Help?



Hi,

I have made a dynamically created thumbnail list using the attachMovie method.
I load a string from an external txt file, split it into an array and based on the number of items in the array, attach a movieclip from the library.

The array stores the foldername that holds the contents.

There is a button in the attached mc's which "onRelease" should load the appropriate Content.swf (called "cont.swf") one level up.

My first problem is:

How do I tell the button to load the according cont.swf on a higher level?

My second (bigger) problem is:

How can I load all the thumbnails into a scrollable movieclip (rather not using the scrollPane, so I can maybe add easing to the scroller later)? When the swf is first loaded, I want 3 thumbnails to show per default, and if there are more than 3 items, I want to scroll them into view...

This is the code I have so far:

Keyframe 1:


ActionScript Code:
projectArray = new Array();stop();my_var = new LoadVars();my_var.onLoad = function(success) {    if (success) {        projectsArray = this.projectsArray.split(",");        gotoAndPlay(2);    }};my_var.load("content/projectsContents.txt");aStyle = new TextField.StyleSheet();aStyle.load("css/opmaak.css");

Keyframe_2:


ActionScript Code:
stop();this.container.myText.html = true;this.container.myText.wordWrap = true;this.container.myText.multiline = true;this.container.myText.label.condenseWhite = true;//this.container._visible = 0;for (var i = 0; i<projectsArray.length; i++) {    var item = this.container.attachMovie("clip", "clip"+i, i);    //var item = daTarget_mc.contentTarget.duplicateMovieClip("contar"+i, i);    item._y = (item._height+5)*i;    item.id = i;    getXML(item, i);    item.myTarget.loadMovie("content/"+projectsArray[i]+"/preview/thumb.jpg");}function getXML(clip, d) {    clip.aContent = new XML();    clip.aContent.ignoreWhite = true;    clip.aContent.load("content/"+projectsArray[d]+"/preview/text.xml");    clip.aContent.onLoad = function(success) {        if (success) {            clip.myText.styleSheet = aStyle;            clip.myText.text = clip.aContent;        }    };}/*clip.myBtn.onRelease = function() {    loadMovie("content/"+projectsArray[d]+"/content/cont.swf", 2);};*/



Any help on this is really appreciated, my deadline is getting kinda close...

Thanks for any input,

Gene



Ultrashock Forums > Flash > ActionScript
Posted on: 2005-04-08


View Complete Forum Thread with Replies

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

AttachMovie And Scrolling, Errr Help?
Hi,

I have made a dynamically created thumbnail list using the attachMovie method.
I load a string from an external txt file, split it into an array and based on the number of items in the array, attach a movieclip from the library.

The array stores the foldername that holds the contents.

There is a button in the attached mc's which "onRelease" should load the appropriate Content.swf (called "cont.swf") one level up.

My first problem is:

How do I tell the button to load the according cont.swf on a higher level?

My second (bigger) problem is:

How can I load all the thumbnails into a scrollable movieclip (rather not using the scrollPane, so I can maybe add easing to the scroller later)? When the swf is first loaded, I want 3 thumbnails to show per default, and if there are more than 3 items, I want to scroll them into view...

In the attached zip file is waht I have so far...

Any help on this is really appreciated, my deadline is getting kinda close...

Thanks for any input,

Gene

AttachMovie And Scrolling, Errr Help?
Hi,

I have made a dynamically created thumbnail list using the attachMovie method (Scotty helped me out there...Thanks Scotty!!!).
I load a string from an external txt file, split it into an array and based on the number of items in the array, attach a movieclip from the library.The array stores the foldername that holds the contents.There is a button in the attached mc's which "onRelease" should load the appropriate Content.swf (called "cont.swf") one level up.
My first problem is:
How do I tell the button to load the according cont.swf on a higher level?

My second (bigger) problem is:

How can I load all the thumbnails into a scrollable movieclip (rather not using the scrollPane, so I can maybe add easing to the scroller later)? When the swf is first loaded, I want 3 thumbnails to show per default, and if there are more than 3 items, I want to scroll them into view...

In the attached zip file is waht I have so far...

Any help on this is really appreciated, my deadline is getting kinda close...

Thanks for any input,

Rufus

AttachMovie And Scrolling, Errr Help?
Hi,

I have made a dynamically created thumbnail list using the attachMovie method (Scotty helped me out there...Thanks Scotty!!!).
I load a string from an external txt file, split it into an array and based on the number of items in the array, attach a movieclip from the library.The array stores the foldername that holds the contents.There is a button in the attached mc's which "onRelease" should load the appropriate Content.swf (called "cont.swf") one level up.
My first problem is:
How do I tell the button to load the according cont.swf on a higher level?

My second (bigger) problem is:

How can I load all the thumbnails into a scrollable movieclip (rather not using the scrollPane, so I can maybe add easing to the scroller later)? When the swf is first loaded, I want 3 thumbnails to show per default, and if there are more than 3 items, I want to scroll them into view...

In the attached zip file is waht I have so far...

Any help on this is really appreciated, my deadline is getting kinda close...

Thanks for any input,

Rufus

Flash 8 Or Php Errr
www.lx.tv


Hi.
I wanna build a website similiar to lx.tv
It would be faster for me to do the layout in flash but when it comes to the xml solutions...im not there yet...(play most recent video/view certain category...ect,,like lx.tv)

But i can do it in html and PHP...php to update site....BUT i rather have it in flash...

help?
how much?
What would you chose?

AttachMovie / Scrolling Problem
Hello all,

I was wondering if someone could help point out where I'm going wrong here. I've attached a movieclip to a scrollpane and then I've duplicated a movieclip a number of times depending on the xml data being imported. That all works fine. My problem is that the scrollpane isn't scrolling when the data exceeds it's boundaries, and the data is visible outside of those boundaries.


Here's a part of my code:

PHP Code:



    attachMovie("FScrollPaneSymbol", "myPane", 5, {hScroll:false, vScroll:true, dragContent:false});
    myPane.setScrollContent("projectItem");
    myPane._x = 5;
    myPane._y = 35;
    myPane.setSize(355, 100);
    var projectItem = myPane.getScrollContent();
    // LOAD PROJECT ITEMS INTO DUPLICATED MOVIECLIP
    for (child2=0; child2<count2; child2++) {
     projectItem = projectItem.duplicateMovieClip("projectItem"+(_root.child1Count+child2), (_root.child1Count+child2));
     projectItem.itemNum = mainTag.childNodes[childNum].childNodes[child2].attributes.num;
     projectItem.itemClient = mainTag.childNodes[childNum].childNodes[child2].attributes.client;
     projectItem.itemTitle = mainTag.childNodes[childNum].childNodes[child2].attributes.title;
     projectItem.itemYear = mainTag.childNodes[childNum].childNodes[child2].attributes.year;
     projectItem.itemRole = mainTag.childNodes[childNum].childNodes[child2].attributes.role;
     projectItem.itemLink = mainTag.childNodes[childNum].childNodes[child2].attributes.link;
     projectItem.itemImage = mainTag.childNodes[childNum].childNodes[child2].attributes.image;
     projectItem.childNum = child2;
     projectItem._y = child2*14;     
     };
    myPane.refreshPane();




Any help would be greatly appreciated.

Advanced Loop (errr)
I've just started to learn basic animation, and need some help with loops.

This is what I'm trying: I have 4 buttons which each run different 'films' (sets of frames). I want one of these films to loop 3 times, and then advance to the end of its section:

Frame 275->345
Frame 275->345
Frame 275->345
Frame 345->400

I found this code in a tutorial:
Set Variable: "n" = 1
Loop While (n<=3)
--- other statements will go here ----
Set Variable: "n" = n+1
End Loop

But I cannot fin the word Loop in the actions panel, just 'While' under the 'loop' section. And when I set it up, it crashes!

Could anyone help with this, even spoonfeed the code here?

p.s. My first post here, like the smilies!

Errr, Mp3 Player Problem
well my mp3 player works fine, but here is my problem:

i have many scenes in my movie. once i got the mp3 player working, i copy and pasted it on each scene so the user always sees it. However, the mp3 player is programmed to call the music from scene HOME. So everytime u switch tracks it jumps back to scene HOME. To prevent this, I created a seperate MP3 player loadMovieNum code for each scene so now it doesn't jump back to home if a person changes track from a dif scene. Unfortunately, the music now restarts if a person selects a dif scene.

What i basically need is some kind of code to prevent music loading on the other scenes when switching scenes, having the music continue playing from scene HOME, and having the user maintain the possibility to change tracks on any scene without going back to scene HOME. Here is my script.

2 keyframes on timeline:
1st keyframe named music1 and has code: loadMovieNum("music1.swf", 2)
(same for key frame 2, but diff variable names.)

back button:

on (press) {
gotoAndStop("music1");
}
on (release) {musicbar.play(9);}

forward button:
on (release) {
gotoAndStop("music4");
}
on (release) {musicbar.play(9);}

Errr....Array Problem
I am trying to assign buttons their text labels dynamically in a loop like this:


ActionScript Code:
var btn:Array = new Array();
for (i=0; i<6; i++) {
    // if I try to set it non-dynamically it works
             //nav_mc.btn1.btn_text.text = 'shoot'
   
             // this is how I want to do it but it is not working
             // make the array equal to the scope and name of the btn
             btnName = 'nav_mc.btn'+[i];

             //set the .text of the btn...navText[i] traces correctly
             btnName.btn_text.text = navText[i];
}

Anyone know the problem?

Errr On RollOut + On RollOver..........
ooooooooooooooook

soooooooooo i have this mc, withhhhhhhhh

PHP Code:



on (rollOver) {
    gotoAndStop(2);
}
on (rollOut) {
    gotoAndStop(1);





and all i want it to do is goto frame 2 on rollover and return to frame 1 on roll out..... anddddd what does it do, continually go from frame 1 to 2 when the cursor is over the mc..... lovely!!! oooooooor not

i have stop(); in each frame soooooooo i dunno :'(

any ideas, many thanks!!!

Errr Two Movie Clips
I have two movie clips on my main timeline, and when i hit play all i see is the main image of the two mc's and not the complete mc's playing


any idea on what the prob could be?

Errr.. Cant Figure This Out? (x,y) Issue
Hi, I have stage elements in my site showing up where they are supposed to with a FLUID Layout using the following code. Though there seems to be this strange gap all the way around my site in the html page. I want the horizontal bar to be attached to the top like in the www.eepmon.com flash site. Anyone know why mine is not working?

ps. the shinny black band in the attached pic is called "topstretch" in the code below.

Thanks.

// ***Stage aligned top left
Stage.align = "TL";
// *** Stop the stage from scaling with the browser window.
Stage.scaleMode = "noScale";
stop ();
// initiate postitions and scaling values for objects
fluid._x = (Stage.width)/2
fluid._y = Stage.height/2
bottomstretch._height = Stage.height;
stagestretch._height = Stage.height;
stagestretch._width = Stage.width;
topstretch._width = Stage.width;
stagestretch._x=0;
stagestretch._y=0;
tutoriobutton._x = Stage.width - tutoriobutton._width
// end initial position setting

//create a listner that checks to see if the browser window is resized
sizeListener = new Object();
sizeListener.onResize = function() {
// change movieclip properties when the window is resized.
topstretch._width = Stage.width;
fluid._y = Stage.height/2;
fluid._x = (Stage.width)/2;
bottomstretch._height = Stage.height;
stagestretch._height = Stage.height;
stagestretch._width = Stage.width;
//*note* 200 is the width of the left column
tutoriobutton._x = Stage.width - tutoriobutton._width
};
Stage.addListener(sizeListener);

Errr Two Movie Clips
I have two movie clips on my main timeline, and when i hit play all i see is the main image of the two mc's and not the complete mc's playing


any idea on what the prob could be?

Errr...Net Stream/ Buffer Counting Down?
I'm loading an FLV into a custom player through progressive donwload. I have a script that tells the user what percent has loaded. The problem is, if the user tries to go to a part of the movie that hasn't been dowloaded (user catches up to buffer or uses video scrubber) the download percent re-appears but the numbers count DOWN and the count-down stays visible until the movie is over...yikes! Thanks in advance.








Code:
//*********** Net Stream***********************//

ns.onStatus = function(info) {
if(info.code =="NetStream.Play.Start") {
progressBar.onEnterFrame = videoUpdate;
}
if(info.code =="NetStream.Play.Stop") {
delete progressBar.onEnterFrame;
}
if(info.code == "NetStream.Buffer.Full"){
bufferClip._visible = false;
buffer_txt._visible = false;
emptyMC._visible = false;


}
if(info.code == "NetStream.Buffer.Empty"){
bufferClip._visible = true;
buffer_txt._visible = true;
emptyMC._visible = true;


}

}

ns.onMetaData = function(info) {
ns.duration = info.duration;
}

//-----------------------Buffer Timer--------------------
var buffer_interval:Number = setInterval(checkBufferTime,100,ns);
function checkBufferTime(ns:NetStream):Void {
var bufferPct:Number = (Math.ceil(ns.bufferLength/ns.bufferTime *100));
var output_str:String = "";
output_str += +bufferPct+"%";

buffer_txt.htmlText = output_str;


if(bufferPct >= "100"){
quote_txt._visible = false;
bufferClip._visible = false;
buffer_txt._visible = false;
emptyMC._visible = false;



}
if(bufferPct == "0"){
buffer_txt._visible = false;

}

Can I Use AttachMovie To Place A Scrolling Container On The Stage?
I need to place a container (that contains a scripted scroller) on the stage from an external file (preferably using attachMovie).

I can attach the movie to the stage NO PROBLEM and it plays great--EXCEPT for the fact that it doesn't scroll.

Note that the container itself is scripted (to make the scroller work).

How do I add the script to the MC to make it scroll?

THANX!!!

HELP Scrolling Dynamic Movie Loaded Via AttachMovie?
Ok, I'm just about ready to pull my hair out on this project. I've been working on this problem for 4 days and haven't come up with anything!

What I have is a news blogger that is loaded via xml which uses php to write to the xml file. I have my "blogger" movie clip that loads all of the different blogger info into it. It is loaded into a blank container movie clip via attachMovie and when the user adds a new blog it creates new instance of it and moves the rest down. All works great with that.

Now the problem is after the client creates more then 3 blogs, it begins to run off the site. So what I need to do is put it into a scroller. Now I have gotten it into the scroller but it seems that the scroller is not seeing the actual size of the container clip that is holding all of these instances of the "blog" movie that is loaded from attachMovie. The size will change depending on how many blogs there are and I need to figure out how to add script to calculate that. I figured an autoSize may work but there was no luck there! Does anyone know how to fix this. Please, I've really ran out of options and it is crunch time now to get this done!!!

Thanks in advance!!!

Here is the code I have to load the "blogitem" movie into the blank container movie.


Code:
var i = 0;
if (gateXML.hasChildNodes())
{
child = gateXML.firstChild;
while (child != null)
{
var name = "bl" + i;
var tmp = _root.main.holder.mc_content.attachMovie("blogitem", name, i);
tmp._x = 21;
tmp._y = 70 + 105 * i;
tmp.title = child.attributes.title;
tmp.date = child.attributes.date;
tmp.link = child.attributes.link;
tmp.body = child.attributes.body;
tmp.linktitle = child.attributes.linktitle;
child = child.nextSibling;
++i;
} // end while
} // end if
stop ();

Errr..MC Targeting Problem..Brain Fart?
Hiya,
I was getting ready to post some helpful targeting information for someone that need help, when I realized my actionscript was not functioning..

I have 3 scenes, on the 3rd scene is an MC with a button that targets the label start, in a movie clip named myMc in Scene2.

on (release){
_root.gotoAndStop("Scene2","hold");
_root.myMc.gotoAndPlay("start");
}

In the myMc clip there are 4 keyframes for testing purposes.. A blank keyframe with a stop action is the first, then one called start(the one Im targeting), then a blank keyframe, then a blank keframe with a gotoAndPlay("start"); Just needed a loop to test with.

I would imagine that the myMc wont run because when the button is pushed in the MC in scene3, myMc is not within its scope?

What is going wrong here? Ive been using flash for years and now I cant get simple targeting and goto actions to function...

3PRIMATES
LOL.. almost wanted to change my name to ask a question like this..(

ScrollPane Problem With AttachMovie - Pictures Disappers When Scrolling..
I finally got my scrollPane to work (well,... sort of) with my dynamically created MC's via attachMovie. But now as soon as you try and scroll, the pictures disappear. Also, it seems as though the masking isn't working properly on the scrollPane. It's actually kind of weird because it looks like the masking is working with the pictures (see attached swf to see what I'm talking about), but isn't working with the textfields.

If someone could take a look at the attached file and see if I've simply overlooked something, I'd be forever in your debt - as I've been working on this stupid problem forever! TIA

PreLoad Wont Load 'til Half Way Loaded... [errr.?]
I've read few of your forums regarding "preloading", but still I"m still confused. I had the same problem that JRSly had in one forum http://flashkit.com/board/showthread...hlight=preload -- It shows a white screen for few seconds before it starts showing the preload bar. I'm not a master of scripting, obviously... and I've went thru so many forums and Q&As here, but I'm still stuck. Help, please.

Here's my flash source that I uploaded, if you can please show me what I did wrong here. I appreciate ANY advice. Thank you!
www.dementress.com/home.fla

Mira

AttachMovie() Within Another AttachMovie() Created Instance?
I'm still struggling away on my web site, but I've made quite a bit of progress and I think my code has cleaned up quite a bit. I still have the issue of not being able to attach my new content box movie clip when the button is pressed. I am successfully able to load the data for that instance of the tab, and can access the variables. It also is able to run the newContentBox() function inside it with success, but when it tries to run attachMovie(), nothing happens. Could this be a problem with my depth? Or is it my nesting?

I have been thinking about making a global variable for depth that will increment each time anything is created, so every movie clip is guaranteed to be on its own depth. Would this be a solution?

The site can be viewed here.
The source can be viewed here.
All the data files are located in that directory as well.

This is really driving me nuts, and I want to get something solved so I can move onto the submenu creation.

AttachMovie Inside Another AttachMovie
is it possible to attach a movieclip, and then attach another inside of it? i'm trying to load in images via using loadMovie and XML (a little background) i want the image to be dropped in to have a mask applied to it so that the image appears as a rounded rectangle... here's my code for the for loop that attaches the movie clips...


PHP Code:



for (i=1; i<=totalImages; i++) {
                attachMovie("multiplebox", "box_"+i, i);
                movieNamer=_root["box_"+i];
}




is it possible to attach a movie inside of 'box_"+i'?

AttachMovie Within An AttachMovie? Not Working
So I've finished a project (let's call it Project Blue) where I use attachMovie which references a folder (of swf's) to place each page of the swf. It worked fine. Next, I made a master 'shell' to place this project (among others) into. To do that I used attachMovie again to place Project Blue in the shell.

But now my attachMovie pages for Project Blue won't show up. Does Flash have a problem with using an attachMovie within an attachMovie?

Thanks for any insight on this....

AttachMovie Nested AttachMovie...
I have in the root timeline an empty movie clip that loads other movies inside of it. Using the attachMovie function.

Inside one of these attachMovie clips I have a nest "attachMovie" clip as well but for some odd reason it's not working. Is there anything I should be aware of when nesting an attached movie?

Simple /:xpos Scrolling, However Load External .swf When Scrolling Stops
Hi guys I need some help with a simple horizontal slider. (See attached)
Basically I have a horizontal slider with 3 buttons which make the slider go to a specific position using:

on (release) {
/:xpos = -376;
}

Now what I want to happen is that when the button is pressed I want it to load an external .swf movie (say video.swf onto level 1)

I have tried just adding using:

on (release) {
/:xpos = 0;
loadMovieNum("video.swf", 1);
}


which just loads the movie and then scrolls. However I need it to be the other way around. It scrolls to the location and then loads the movie.

I would really like it to use some type of statement telling it that if xpos = -350 then load .swf onto level 1 and if xpos has not yet reached -350 to do nothing.

However the major principal is to get the scroll and then the load, rather than the other way around.

Cheers
Dom

Scrolling Text Field That Stays Scrolling On Rollover
on (rollOver) {
mytext.scroll--;
mytext.maxscroll = x;
}

Here is my code, you have to keep clicking the button to scroll the text field, how do I code it to just have the mouse rollover the button and the text field will continue to scroll automatically? Thanks.....

Fancy Scrolling, Need That Slidy Scrolling Effect For Text
Can anyone point me to a tutorial where the textbox speeds up and slows down the scrolling when u hit the arrows...kinda like www.jossstone.co.uk

On Press Scrolling Problem. Scrollbar. Scrolling. Button
How do I make this actually work for on press? It works fine for when you just click it, but the on press function doesnt work.

thanks for any help.




on (press) {
textbox.text._y += scrollVal;
if (textbox.text._y>upperLimit) {
textbox.text._y = upperLimit;
}
lineLoc = slider.line._x;
linelength = slider.line._width;
slider.handle._x = ((textbox.text._y/lowerLimit)*lineLength)+lineLoc;
}

Using Flash Scrolling Text Box To Create Scrolling Schedule
Hi All,

For work, I'm creating a PowerPoint presentation which needs to include a really long schedule. I wanted this schedule to crawl up the screen. I thought of doing this part in Flash and inserting it into the PPT. Has anyone had luck with this sort of thing using PPT and Flash? Is there a better strategy. I have CS3 Web and Production and will be doing this portion of the project this weekend and thought I'd ask some pros. Is there another CS3 product that might be better. I am more Familiar with After Effects but haven't used it for anything quite like this before.


Thanks!

Flash Script - Scrolling Menu With A Scrolling Background
This is a dedicated thread for discussing the SitePoint article 'Flash Script - Scrolling Menu With A Scrolling Background'

How To Smooth The Movement (scrolling Background And Scrolling Menu ) ?
hi! i'm new here and also a beginner in flash.. i need some help on how to smooth the movement in my flash project.. scrolling background with scrolling menu.. i got this script from a tutorial and i did some adjustment on it.. but somehow both the background and menu movement are not smooth as i want. its kept jerky along their movement. this is the script that i use to move both background and menu.. hope someone can help me to repair or to alter this script.. thanks! =)

//scrolling background with scrolling menu
//when mouse moves left, background and menu moves right

if ((_xmouse>-0.5) && (_xmouse<230) && (_ymouse>-0.1) && (_ymouse<450)) {
_root.back._x =_root.back._x +6 ;
_root.menu_mc._x =_root.menu_mc._x +10 ;
}

// when mouse moves right, background and menu moves left

if ((_xmouse>400) && (_xmouse<616) && (_ymouse>-0.1) && (_ymouse<450)) {

_root.back._x =_root.back._x -6 ;
_root.menu_mc._x =_root.menu_mc._x -10 ;
}
if (_root.back._x>1309.5) {
_root.back._x = -79;
}
if (_root.back._x<-697.8) {
_root.back._x =679;
}
//----------------------------------------------
if (_root.menu_mc._x>1200.5) {
_root.menu_mc._x = -99;
}
if (_root.menu_mc._x<-730) {
_root.menu_mc._x =569;
}[/size][/size][/size][/size]

(quickie) Scrolling HTML Field Not Scrolling To The End
Hey guys and girls,

I've got some data from a file displaying in a wrapped, HTML textfield. text is formatted and appears as expected but as i try to scroll, it only scrolls one line down and stops.

the maxscroll property returns 5, and the scroll goes down to 2 and for some reason won't go further down.

but, and here's the fun part driving me f*3%# nuts... if i select the field and then use arrows, i can scroll it that way... but then once i've done that, the buttons work too. I tried using the selection object .. but nothing... and i've turned off the HTML and seen that scroll (probably coincidently) would have a maxscroll of 2.

so question is... what the ****? how can i get thing to work? thanks world. peace.

Question: Text Scrolling Vs. Clip Scrolling
I'm working on a scrollbar right now, and have it working quite nicely for scrolling a movie clip. But I began to wonder, which is better, scrolling a clip with text or scrolling the text itself?

Any thoughts on this flash community?

Personally, I like the fact that you can implement easing and get a smooth scroll by scrolling the clip, but then again, with the scroll wheel now available for the text scrolling, that's cool too.

Anyway, just curious on everyone's thoughts on this. Which do you like to see when you visit a site?

Automatic Scrolling On Mouse Over For Text Scrolling
hi all, ive made a scrolling text box with an up and down button as listed in the tutorials. i know how to make it move 1,2,3,etc lines at a time when the mouse is over but what code/variable do i need to replace the number with to make the text scroll continously as long as the mouse is over it?

thanks
bast

Stopping A Scrolling Thumbnail Scrolling On Its Loadup?
Firstly hey all hope you can help me with what is hopefully an easy question.

Firstly I've made a vertical scrolling verison based on the actionscript of this Tutorial. However because of the lopped motion Tween it begins scrolling instantly after its loaded. I want it to load frozen until the mouse is rolled-on is there anyway in actionscript or by editting the tweens to make it this possible???

This link is an example of my thumbnail scroller (sorry for the shameless self promo of my website!)
http://seantooley.com/pages/Scars&Sp...sGallery15.htm

This is a link to the tutorial I used (tutvid.com) Though it was good!.
http://www.youtube.com/watch?v=2TrIQ...1DBDD6&index=5

Lastly the actionscript if it helps. which I hope someone can! I would be a very grateful man to whoever can provide the answer !!

_root.onEnterFrame = function(){
if(_root._xmouse<240) {
myVar=false;
}
if(_root._xmouse>2) {
myVar=true;
}

if(_root._ymouse<13 and myVar==true) {
ImageBar.prevFrame();
}
if(_root._ymouse>445and myVar==true) {
ImageBar.nextFrame();
}
}

Thanks again Sean Tooley

Scrolling Flash Pane On Scrolling Web Page
This is a repost, but I've still not figured out a solution.

I have a Flash movie that appears on a webpage. The Flash contains scrolling content ( scrollpane, text field, whatever).

The containing webpage is tall, and therefore also has scrollbars.

My Problem: When users try to use the MouseWheel to scroll through my Flash scrolling data, the browser page scrolls as well. It's very annoying.

I would like to be able to have the MouseWheel scroll my Flash scrolling content when it's over the flash, but scroll the webpage when it's not over the Flash.

Does anybody know a way to supress wheel-based browser page-scrolling while my mouse is over a Flash movie??? Is there a way to eat/stop propagation, whatever, of the wheel event in the brwoser, either from Flash or from Javascript?

Scrolling A Dynamically Created Mc (rollover Scrolling)
I've been trying to find a way to do this for a while...

Anyone have any good tutes, examples on creating the horizontal scrolling menu with dynamically attached clips? the style where if the user mouses over the right hand side of the menu it slides left, etc?

there's lots of tutes out there for simple scrolling but not much that take a dynamically sized clip into consideration!

thanks for any input.

Scrolling Photo Gallery But Not Flat Scrolling, Please Help Out
Hey everyone...

First off all, I thank you all to read my first thread in this website and also thanks Kirupa to give me chance to learn from you all masters.

As I am designing a website in which I am stuck where there is a flash script required. I am looking for a script which makes a small 5 to 6 Image scrolling photo gallery.

My problem is I don’t want flat gallery I am looking for a gallery which shows the perspective image coming from a deeper wall (e.g. image attached). In this Image below asume gray is a piller and the image have to scroll from the deep part of the piller in perspective.

Hope you guys and gals can help me.. I'm really stuck here.

Thanks
Rupesh

My Scrolling Pane Won't Stop Scrolling OnRollOut...
I'm having trouble getting the scroll to stop, and can't find a problem in the code. It's in a movie clip called "timeline."


Code:

panel.onRollOver = panelOver;
function panelOver() {
   this.onEnterFrame = scrollPanel;
   delete this.onRollOver;
}
var b = stroke.getBounds(timeline);
function scrollPanel(){
   if(_xmouse<b.xMin || _xmouse>b.xMax || _ymouse<b.yMin || _ymouse>b.yMax){
      this.onRollOver = panelOver;
      delete this.onEnterFrame;
   }
   if (panel._x>=-900) {
      panel._x = -900;
   }
   if (panel._x<=-3100) {
      panel._x = -3100;
   }
   var xdist = _xmouse-0;
   panel._x += Math.round(-xdist/7);
}


You might notice that I have timeline specified in the var b bit of code, which was the only way I could get it to scroll smoothly - otherwise, it scroll jerky and only a few hundred pixels.

Scrolling Nav Versus Scrolling Textbox...who Will Win?
'ello boardsters...

problem: i have a movie, we'll call it Movie1.

Movie1 contains a scrolling navigation bar.

Movie1 also contains a blank movieclip- Holder- into which are loaded other, content, movies.

One of which- we'll call it Content1- contains a textScroller movieclip for updateable news- the text is loaded in from a .txt file.

the PROBLEM is... when Content1 is loaded into Movie1 and you use the scrollbar on Content1's textScroller, the scrolling navigation bar back in Movie1 gets stuck on one speed- too fast to make it useable.

why's it doing this? are the two in conflict somehow? i'm no programmer, i get my code on..well, flashkit actually! so i'd appreciate some help.

love ya all (particularly the helpful ones)
delilah

Difference Between Scrolling A MC And Scrolling A Textfield?
Hi there,

What is the difference from scrolling a textfield and scrolling a movieclip?
My scrollbar resizes automatically with textfields,
and I don't know how to scroll movieclips within the same scroller. Do I only have to change some names or something?

Thanks Already

Vertical Scrolling Menu Not Scrolling
i'm using flash mx

i inserted this code from a friend who had a horizontally scrolling menu and altered it slightly to suit my vertical menu. when i test it nothing moves.

i have this action placed in frame 3 of my movie:

center = 220.5;
reelPos = reel._y;
topStop = -360;
bottomStop = 360;

and in frame 4 i have this action:

if (_xmouse<774 & _xmouse>10) {
reelSpeed = (_ymouse-center)/10;
reelPos = Math.round (reelPos+reelSpeed);
if (reelPos<topStop) {
reelPos = topStop;
}
if (reelPos>bottomStop) {
reelPos = bottomStop;
}
reel._y = reelPos;
}

what am i missing here?

Scrolling Text Stops Scrolling
i just finished a messing with a site somebody wanted me to update. Since i really am new at flash, i am still learning about action scripting. I entered the content into a text box that has some scrpiting to scroll down under a mask. It scrolls just fine, but it stops before the entire field is seen. No matter how long the text field gets, it always stops at the same place when viewing the movie.It does this with all the fields at the same point...here is what it says in the "positioning movie" what is this saying?...any help woud be great
*the problem is this isnt something i made, so it makes it that much more difficult.

y = getProperty("../movie", _y);
if (y<70) {
gotoAndStop(10);
} else {
setProperty("../movie", _y, y-6);
}

[F8] Scrolling Thumbnails - Not Scrolling - Involves Xml
Howdy,

I have been working on a site that will display a portfolio for a friend of mine who is a photographer. I want to have thumbnails that can be scrolled on the bottom of the page, and an area where the thumbnail is presented when selected. I have the thumbnails appearing. I have them loading, however, I can't get them to scroll when the mouse moves to the left or right of the row of images.



The file can be viewed at... http:www.prestigeinteractive.com/anneliephotography



Here is the code I used for the slideshow:




Code:

var slideshow_mc:MovieClip = this;

var image_Array:Array = new Array();
var description_Array:Array = new Array();
var thumbnails_Array:Array = new Array();

var currentPicture:Number = 0;

function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild; //here "this" refers to the XML object. This should be okay, I think
total = xmlNode.childNodes.length;

for (i=0; i<total; i++) {
image_Array[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
description_Array[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
thumbnails_Array[i] = xmlNode.childNodes[i].childNodes[2].firstChild.nodeValue;
thumbnails_fn(i);
}

firstImage();

} else {
content = "file not loaded!";
//added this so that it shows in your thumbnails
desc_txt.text = "file not loaded!";
}

}

xmlData = new XML(); //prepare XML object
xmlData.ignoreWhite = true; //tell XML to ignore empties (unnecessary in this application b/c XML is well-formed
xmlData.onLoad = loadXML; //function to load when XML loads.
//I had to change this line to make sure that it's loading from the correct location, because you're loading the
//file from one level up
xmlData.load("./flash_files/images.xml"); //load XML data; when loaded, run loadXML

/////////////////////////////////////

listen = new Object();

listen.onKeyDown = function() {
if (Key.getCode() == Key.LEFT) {
prevImage();
} else if (Key.getCode() == Key.RIGHT) {
nextImage();
}
};

Key.addListener(listen);

previous_btn.onRelease = function() {
prevImage();
};

next_btn.onRelease = function() {
nextImage();
};

/////////////////////////////////////

currentPicture = 0;

slideshow_mc.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 (currentPicture<(total-1)) {
currentPicture++;
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image_Array[currentPicture], 1);
desc_txt.text = description_Array[currentPicture];
picture_num();
}
}
}

function prevImage() {
if (currentPicture>0) {
currentPicture--;
picture._alpha = 0;
picture.loadMovie(image_Array[currentPicture], 1);
desc_txt.text = description_Array[currentPicture];
picture_num();
}
}

function firstImage() {
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image_Array[0], 1);
desc_txt.text = description_Array[0];
picture_num();
}
}

function picture_num() {
current_pos = currentPicture+1;
pos_txt.text = current_pos+" / "+total;
}

//I think I know what this function is doing, but I'm not sure exactly how it works
function thumbNailScroller() {

// thumbnail code!

slideshow_mc.createEmptyMovieClip("tscroller", 1000);
scroll_speed = 10;

tscroller.onEnterFrame = function() {

if ((_root._ymouse>=thumbnail_mc._y) && (_root._ymouse<=thumbnail_mc._y+thumbnail_mc._height)) {
if ((_root._xmouse>=(hit_right._x-40)) && (thumbnail_mc.hitTest(hit_right))) {
thumbnail_mc._x -= scroll_speed;
} else if ((_root._xmouse<=40) && (thumbnail_mc.hitTest(hit_left))) {
thumbnail_mc._x += scroll_speed;
}

} else {
delete tscroller.onEnterFrame;
}
};
}

function thumbnails_fn(thumbnailNumber) {

thumbnail_mc.createEmptyMovieClip("t"+thumbnailNumber, thumbnail_mc.getNextHighestDepth());
tlistener = new Object();

tlistener.onLoadInit = function(target_mc) {

//target_mc is the thumbnail that was just loaded
target_mc._x = hit_left._x+(eval("thumbnail_mc.t"+thumbnailNumber)._width+5)*thumbnailNumber;
target_mc.pictureValue = thumbnailNumber; //here you're assigning a value to the thumbnail object

target_mc.onRelease = function() {
//target_mc is the thumbnail that was just loaded
//"this" should be okay below, but it COULD be problematic, depending on the scope
//when the click is evaluated; here could be a problem area, but I'm not sure
currentPicture = this.pictureValue-1;
nextImage();
};

target_mc.onRollOver = function() {
//target_mc is the thumbnail that was just loaded
//"this" should be okay below, but it COULD be problematic, depending on the scope
//when the click is evaluated; here could be a problem area, but I'm not sure
this._alpha = 50; //here "this" refers to the target_mc MovieClip; it can stay
thumbNailScroller();
};

target_mc.onRollOut = function() {
//"this" should be okay below, but it COULD be problematic, depending on the scope
//when the click is evaluated; here could be a problem area, but I'm not sure
this._alpha = 100;
};
};

image_mcl = new MovieClipLoader();
image_mcl.addListener(tlistener); //listener to see when thumbnail is loaded
image_mcl.loadClip(thumbnails_Array[thumbnailNumber], "thumbnail_mc.t"+thumbnailNumber);

}







Thanks for your help,



Greg

Vertical Scrolling To Horizontal Scrolling...HELP
So I created a movie with 6 thumbnails on the left side which, when clicked, scroll the full-sized images on the right to show the respective image. However, with the current code, the large images scroll vertically. I want them to scroll horizontally (and then I can move my thumbs to the bottom so as not to be in the way). I'm pasting the code I used below, can someone help me with what changes I would need to make to the code to switch from vertical to horizontal scrolling? Thanks!!

this.createEmptyMovieClip("images", 100);
this.attachMovie("mask","mask", 101);
mask._x = images._x = 550;
mask._y = target = 311.8;
images._y = -1000;
images.setMask(mask);
speed = 7;

for (var i=1; i<7; i++) {
var img = images.attachMovie("image"+i, "image"+i, i);
img._y = img._height*i;
var thumb = this["thumb"+i];
thumb._alpha = 60;
thumb.pos = target+(i*-img._height);
thumb.onPress = function() {
target = this.pos;
};
thumb.onRollOver = function() {
this._alpha = 100;
};
thumb.onRollOut = function() {
this._alpha = 60;
};
}
this.onEnterFrame = function() {
images._y += (target-images._y)/speed;
};

Instead Of Scrolling Text - Scrolling Image
Ive learned how to add a scroll bar to my text boxes - but since I cant make the text in the textboxes do actionscript - I was thinking I could replace the text with an image of the text - and then add buttons to the words.

Simply what im asking is - how can I make an image (it will be of text) scroll inside of a specified area so that it looks just like dynamically loaded text with a scrollbar?

Scrolling Thumbnails Not Scrolling Within Parent Fla
yes - yet another question regarding the popular and useful photogallery tutorial.

i've gotten it to work, and gotten the swf loaded into a movie clip in my parent fla - but the scroll feature doesn't seem to work...

any help is greatly appreciated.
thanks
zach

Scrolling Thumbnails - Not Scrolling - Involves Xml
Howdy,
I have been working on a site that will display a portfolio for a friend of mine who is a photographer. I want to have thumbnails that can be scrolled on the bottom of the page, and an area where the thumbnail is presented when selected. I have the thumbnails appearing. I have them loading, however, I can't get them to scroll when the mouse moves to the left or right of the row of images.

The file can be viewed at... http:www.prestigeinteractive.com/anneliephotography

Here is the code I used for the slideshow:


Code:
var slideshow_mc:MovieClip = this;
var image_Array:Array = new Array();
var description_Array:Array = new Array();
var thumbnails_Array:Array = new Array();
var currentPicture:Number = 0;
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild; //here "this" refers to the XML object. This should be okay, I think
total = xmlNode.childNodes.length;

for (i=0; i<total; i++) {
image_Array[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
description_Array[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
thumbnails_Array[i] = xmlNode.childNodes[i].childNodes[2].firstChild.nodeValue;
thumbnails_fn(i);
}

firstImage();

} else {
content = "file not loaded!";
//added this so that it shows in your thumbnails
desc_txt.text = "file not loaded!";
}
}
xmlData = new XML(); //prepare XML object
xmlData.ignoreWhite = true; //tell XML to ignore empties (unnecessary in this application b/c XML is well-formed
xmlData.onLoad = loadXML; //function to load when XML loads.
//I had to change this line to make sure that it's loading from the correct location, because you're loading the
//file from one level up
xmlData.load("./flash_files/images.xml"); //load XML data; when loaded, run loadXML
/////////////////////////////////////
listen = new Object();
listen.onKeyDown = function() {
if (Key.getCode() == Key.LEFT) {
prevImage();
} else if (Key.getCode() == Key.RIGHT) {
nextImage();
}
};
Key.addListener(listen);
previous_btn.onRelease = function() {
prevImage();
};
next_btn.onRelease = function() {
nextImage();
};
/////////////////////////////////////
currentPicture = 0;
slideshow_mc.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 (currentPicture<(total-1)) {
currentPicture++;
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image_Array[currentPicture], 1);
desc_txt.text = description_Array[currentPicture];
picture_num();
}
}
}
function prevImage() {
if (currentPicture>0) {
currentPicture--;
picture._alpha = 0;
picture.loadMovie(image_Array[currentPicture], 1);
desc_txt.text = description_Array[currentPicture];
picture_num();
}
}
function firstImage() {
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image_Array[0], 1);
desc_txt.text = description_Array[0];
picture_num();
}
}
function picture_num() {
current_pos = currentPicture+1;
pos_txt.text = current_pos+" / "+total;
}
//I think I know what this function is doing, but I'm not sure exactly how it works
function thumbNailScroller() {
// thumbnail code!

slideshow_mc.createEmptyMovieClip("tscroller", 1000);
scroll_speed = 10;

tscroller.onEnterFrame = function() {

if ((_root._ymouse>=thumbnail_mc._y) && (_root._ymouse<=thumbnail_mc._y+thumbnail_mc._height)) {
if ((_root._xmouse>=(hit_right._x-40)) && (thumbnail_mc.hitTest(hit_right))) {
thumbnail_mc._x -= scroll_speed;
} else if ((_root._xmouse<=40) && (thumbnail_mc.hitTest(hit_left))) {
thumbnail_mc._x += scroll_speed;
}

} else {
delete tscroller.onEnterFrame;
}
};
}
function thumbnails_fn(thumbnailNumber) {
thumbnail_mc.createEmptyMovieClip("t"+thumbnailNumber, thumbnail_mc.getNextHighestDepth());
tlistener = new Object();

tlistener.onLoadInit = function(target_mc) {

//target_mc is the thumbnail that was just loaded
target_mc._x = hit_left._x+(eval("thumbnail_mc.t"+thumbnailNumber)._width+5)*thumbnailNumber;
target_mc.pictureValue = thumbnailNumber; //here you're assigning a value to the thumbnail object
target_mc.onRelease = function() {
//target_mc is the thumbnail that was just loaded
//"this" should be okay below, but it COULD be problematic, depending on the scope
//when the click is evaluated; here could be a problem area, but I'm not sure
currentPicture = this.pictureValue-1;
nextImage();
};

target_mc.onRollOver = function() {
//target_mc is the thumbnail that was just loaded
//"this" should be okay below, but it COULD be problematic, depending on the scope
//when the click is evaluated; here could be a problem area, but I'm not sure
this._alpha = 50; //here "this" refers to the target_mc MovieClip; it can stay
thumbNailScroller();
};

target_mc.onRollOut = function() {
//"this" should be okay below, but it COULD be problematic, depending on the scope
//when the click is evaluated; here could be a problem area, but I'm not sure
this._alpha = 100;
};
};

image_mcl = new MovieClipLoader();
image_mcl.addListener(tlistener); //listener to see when thumbnail is loaded
image_mcl.loadClip(thumbnails_Array[thumbnailNumber], "thumbnail_mc.t"+thumbnailNumber);
}

Thanks for your help,

Greg

Instead Of Scrolling Text - Scrolling Image
Ive learned how to add a scroll bar to my text boxes - but since I cant make the text in the textboxes do actionscript - I was thinking I could replace the text with an image of the text - and then add buttons to the words.

Simply what im asking is - how can I make an image (it will be of text) scroll inside of a specified area so that it looks just like dynamically loaded text with a scrollbar?

AttachMovie
I’m using the attachMovie command and I need to remove the attached movie. I’ve tried unloadMovie, removeMovieClip, delete, and unloadMovie. I can get the clip to do anything else. A friend suggested I try to delete a layer but I don’t know how. Oh this is the important part I need the script to be in the Movie Clip.

Thanks in advance,
Slow21969

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