externally loading jpgs via rollover for a beginner

This is a discussion on "externally loading jpgs via rollover for a beginner" within the Flash & Multimedia Forum section. This forum, and the thread "externally loading jpgs via rollover for a beginner are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Flash & Multimedia Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jul 29th, 2005, 04:49
New Member
Join Date: Jul 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
externally loading jpgs via rollover for a beginner

i have 4 swf gallery pages. each page contains an empty movie clip and a selection of thumbnails. what i would like to do is code the thumbnail images so that when the cursor is over a thumbnail, the larger version of that photo loads into the movie clip, and when the cursor is not over the thumbnail, the larger version unloads from the movie clip. if anyone knows of a good tutorial that covers this, or has any helpful advice along these lines, i'd appreciate hearing it.

thanks,
brandon
Reply With Quote

  #2 (permalink)  
Old Jul 29th, 2005, 10:06
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
I would suggest that this is impractical. If someone simply runs their cursoor over the images then you get a very quick succession of load and unload image functions, which isn't good for Flash or your server.

Instead consider making it on click.

Loading the right image shouldn't be difficult, you simply need to unload the previous clip using unloadMovie(), then use loadMovie() and target the movieclip you want it to load to. If you already have your gallery in place then this change should be trivial.
Reply With Quote
  #3 (permalink)  
Old Jul 29th, 2005, 17:47
New Member
Join Date: Jul 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
thanks for the reply.

even though the idea seems impractical, im still curious how to do this in flash.
Reply With Quote
  #4 (permalink)  
Old Jul 29th, 2005, 21:30
New Member
Join Date: Jul 2005
Location: Romania
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to morph
I'm not an Actionscript expert (in fact I script with the As Bible open ) but I sugest that you make the larger version of the thumb (in photoshop or other prog) and on every button (thumb img) use the action: "on (rollover) { loadMovie ("bla bla" , blabla); stop();} to make the pictures load to the movie that you use as holder. the thing is ... I don't know how to make the img unload after the cursor left the button... so I sugest that you let the img loaded since you move the cursor over another button and another img is loaded ... you also need to load the img from the first button when the page is loaded (this is just for estetical resons :P ) .... the code is from memory so... I'm not shure that is right ... and I'm shure that more experienced coders will give you a better solution!
Reply With Quote
  #5 (permalink)  
Old Jul 29th, 2005, 21:35
New Member
Join Date: Jul 2005
Location: Romania
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to morph
PS... I think that if you use IF... ELSE ( or something like this ) you can solve the unload problem
Reply With Quote
  #6 (permalink)  
Old Jul 29th, 2005, 21:41
New Member
Join Date: Jul 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
thanks much for the response. im beginning to see that there are several ways to do this. i actually just tried this and it seems to work fine.

on(rollOver){

_root.mc.loadMovie("Image1.jpg")

}

on(rollOut){

_root.mc.unloadMovie()

}
Reply With Quote
  #7 (permalink)  
Old Jul 29th, 2005, 22:51
New Member
Join Date: Jul 2005
Location: Romania
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to morph
yes! this is the code I was thinking so... have fun! and... optimise those images
Reply With Quote
  #8 (permalink)  
Old Aug 16th, 2005, 05:26
New Member
Join Date: Aug 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Renton
Hi, I'm having a similar problem.

I have a button and I would love to have text scroll from point A to point B when someone rolls on to the button.

I have a movie clip of the text scrolling, I just want to make sure it scrolls in the right place ( a bit below center). I have this:

on (rollOver) {loadMovie("Get Your Own Spray");}

Uh... please help. Get your own spray is the move clip. my AIM is matthewrenton :-).
Reply With Quote
  #9 (permalink)  
Old Aug 16th, 2005, 09:44
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
Firstly, it's customary to start a new thread for a new problem, but you're new so we'll let you off! 8)

loadMovie takes two parameters - the filename and where you want to load it to.

So firstly you need to use Get Your Own Spray.swf. On the web you really shouldn't be using spaces though, so remove the spaces or replace them with underscores.

Secondly - where to load it. You can specify either a level in Flash (you may not have come across this), or a movieclip to load the file into. If you're specifying a movieclip you need it's name in quotes:

loadMovie("GetYourOwnSpray.swf", "holderMC");
Reply With Quote
Reply

Tags
externally, loading, jpgs, via, rollover, beginner

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
accessing variables and actionscript in externally loaded Swf from main movie balaakrs Flash & Multimedia Forum 4 Sep 8th, 2007 17:19
loading jpgs mac master Flash & Multimedia Forum 1 May 29th, 2007 14:58
Why does Flash resize jpgs that are coppied into it? jbruso Flash & Multimedia Forum 3 May 7th, 2007 16:31
Help w/ rollover images not loading camcool21 JavaScript Forum 3 Jan 1st, 2007 01:22
Preload and caching of externally loaded JPGs hip Flash & Multimedia Forum 5 Nov 8th, 2006 13:49


All times are GMT. The time now is 22:20.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43