This is a discussion on "movement parameters..... ARGH" within the Flash & Multimedia Forum section. This forum, and the thread "movement parameters..... ARGH are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
movement parameters..... ARGH
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
movement parameters..... ARGH
I'm trying to limit the scroll of a movie with dynamically loaded images in it to between its ends. (so i dont scroll into blank space).
I can't seem to make the clip scroll only as far as its length, it keeps going further! The problem lies with the movie length changing when it loads a differing number of images. The movie loads the images like so on frame 1: Code: var varurl:String = ""; myData = new LoadVars(); myData.load("picsno.txt",0); myData.onLoad = function(succes) { if (succes) { varurl = this.NumberOfImages; no_ofpics.Text = this.NumberOfImages; nPics = this.NumberOfImages; trace(varurl) gotoAndPlay(9); //holder.loadMovie(this.Image); } else { trace("Error loading data"); } }; So... _root.npics = number of images loaded into the "thumbnails" movie to be scrolled. Then in frame 9 i have thumbnails movie, which loads the images onto the stage. (i want them 6 pixels apart - hence the plus 6 on line 4 below). on the thumbnails movie i have the following script: Code: onClipEvent(load){ minXMouseValue = 85; maxXMouseValue = 766; minXMovieValue = thumbnails._x maxXMovieValue = -(_root.npics*((_root.thumbnails._width)+6)); spanMouse = maxXMouseValue + minXMouseValue; spanMovie = maxXMovieValue + minXMovieValue; } minXMouseValue & maxXMouseValue are the ends of my scroll bar background. minXMovieValue & maxXMovieValue should be the max and min the movie thumbnails can scroll to... but I can't make them relate sensibly to the original dimension, which is the loaded image width, (90pixels). Heeeeeelp! |
|
|
|
|||
|
Re: movement parameters..... ARGH
You're on the right track - where to you designate how wide each image is?
If you defined that somewhere(which you sort of do by just telling it how many pictures there are but not the size from what I am seeing) that would mayb e take care of it? Just a thought...
Last Blog Entry: Yay!? (Oct 8th, 2007)
Last edited by Sgaspar11; May 23rd, 2007 at 21:34. |
|
|||
|
Re: movement parameters..... ARGH
Hmm
thats exactly what i am trying now. (sorry was away for a bit there!) I am fiddling with lines like... maxXMovieValue = -(_root.npics*(_root.thumbnails._width)/_root.npics)+(6*_root.npics); Where the plus 6 is the gap between the images. But this is the button, not the pic width. but not succeeding as yet. thanks for the pointer. C |
|
|||
|
Re: movement parameters..... ARGH
A thought,
Could you define the picture width and height in the xml document (or .txt since that is what you are using) and then flash can figure it out from there because is references the pictures width? Not sure if it'll work but you can give it a whirl.
Last Blog Entry: Yay!? (Oct 8th, 2007)
|
|
|||
|
Re: movement parameters..... ARGH
I was trying to avoid adding individual pic widths to the xml/txt file as i hoped the flash could add images on the fly and not demand extra input from the user. bit tedious adding all image widths if they are differing.
But i may have to resort to that! thanks again. |
|
|||
|
Re: movement parameters..... ARGH
I cant get the 'dam-ned' parameters right somehow the scrolled distance and the mouse moved distance are not relating in the right way. The images move too much, or are not correctly positioned.
I have been editing formulae and trying to use differing source reference points for the movement. Been trying static numbers, dynamically called dimensions, the lot.... no joy. It's so close, but it wont play ball! I think the problem lies with the A.S. on the thumbnails movieclip in the 10th frame. |
|
|||
|
Re: movement parameters..... ARGH
Now the goal posts have moved and it all needs to be defined in an xml file.
The image names and the url's they link to. I may have to tender this out if i cant get it together soon! any source pointers out there? nothing i have found is really similar. |
![]() |
| Tags |
| dynamic images, scroll |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| movement problem | popescuradhoo | Flash & Multimedia Forum | 5 | Feb 11th, 2008 09:42 |
| Div layout - argh! | semantics | Web Page Design | 5 | Jul 6th, 2007 20:33 |
| jump to marker using parameters | Smokie | Flash & Multimedia Forum | 5 | Jan 14th, 2005 08:39 |