Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

loading external movies ondemand with counter?

Status
Not open for further replies.

09876

Programmer
Nov 29, 2001
10
US
I have a MC that loads external swf at user request, then the user can click on back and foward buttons to see the pictures. Well, now I have a problem if I'm going to use all the pictures in one file(swf), the file will be very large. With that in mind I have made several files (swf) with 06 pictures in wich one. Now how can I load pics (sfw with 06 pics in it)on demand, without losing the basic back and foward navigation buttons

take alook at this



Perhaps with a counter?

thanks,
 
Easy (i think) when you click for forward or backward just add to a variable and it should do it fine....

ie. mov1 pic1 to pic6

when you press forward starting from the first pic you add 1 to your variable. Then you either send the playhead to the frame label of the pic or load the next or previous movie.

You just need to work with variables, you could put your info in an array as well...





Have Fun...

Sharky99 >:):O>
 
I'm affaird I will have to ask you to be more specific if you please... Can you tell me exactelly what the variable will be

Thanks,
 
Hey Sharky99,
here is the codes for the MC and buttons

There is a button "pic" on the main movie with this action:
on (release) {
loadMovieNum ("pics.swf", 2);
}

and when user clicks on, it loads a empty MC called "msc, clipviewer pics"

with back and foward buttons:

back:
on (release) {
clipContainer.gotoAndStop(clipContainer._currentframe-1);
}

foward:
on (release) {
clipContainer.gotoAndStop(clipContainer._currentframe+1);
}
with these parameters:
titleField: pics1
clipUrl: pics1.swf

which will load this movie:
pics1.swf

and it will use the buttons above to go back and foward through the 06 pics

I try to get around with your directions but id does not load the next movie, which is:
pics2.swf (so on)

Also I'm wondering what should I do in order to load the prevews movie (from pics2.swf to pics1.swf) (so on)

Thanks a lot,
I hope I could explain what I need, if not please ask me
 
Ok you got a movie with a button that loads the .swf

first label your frames with the pics

ie. frame 1 (pics 1&2) label 1, frame 3 (pics 3&4) label 2

in the first frame of your main movie add a variable
ie. movno = 1
lab=1

in the button that calls the back & forward buttons and load the movie add:

_level2.gotoAndStop("1")(your first label)

in your back button add:

lab=lab-1
if (lab=0 or lab>=1 & lab<=3) {
loadMovieNum (&quot;pics1.swf&quot;, 2);
_level2.gotoAndStop(&quot;1&quot;);
} else if (lab>=4 & lab<=6) {
movno = &quot;2&quot;;
} else if (lab>=7 & lab<=9) {
movno = &quot;3&quot;;
} else if (lab>=10 & lab<=12) {
movno = &quot;4&quot;;
}
my_movie = &quot;pics&quot; + movno + &quot;.swf&quot;;
loadMovieNum (my_movie, 2);
_level2.gotoAndStop(lab);




in your forward button add:

lab=lab+1
if (lab>12) {
loadMovieNum (&quot;pics4.swf&quot;, 2);
_level2.gotoAndStop(&quot;12&quot;); 'change 12 for your last label
} else if (lab>=4 & lab<=6) {
movno = &quot;2&quot;;
} else if (lab>=7 & lab<=9) {
movno = &quot;3&quot;;
} else if (lab>=10 & lab<=12) {
movno = &quot;4&quot;;
}
my_movie = &quot;pics&quot; + movno + &quot;.swf&quot;;
loadMovieNum (my_movie, 2);
_level2.gotoAndStop(lab);



this should work but maybe you'll have to use the _root before all the variables

Have Fun...

Sharky99 >:):O>
 
Sure sharky___99@hotmail.com

(there's 3 underscore between the &quot;y&quot; and the &quot;9&quot;)


I can't promise a fast response (working on a site)




Have Fun...

Sharky99 >:):O>
 
Hey Sharky,

Please add .FLA on the PC files... Also please let me know if you have probelm opening the files

Thanks a lot.. This is a pending situation on a project that I've been working on :)

 
Like i said in my email if it's not an original .fla i won't open it...

Sorry

Have Fun...

Sharky99 >:):O>
 
Hey Sherky,

Did you get my zip files? are they ok

thanks,
 
Hey Sharky,
I'm wondering if you have the chance to look at those files I emailed to you


Thanks,
Salud
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top