Image loader problem!

This is a discussion on "Image loader problem!" within the Flash & Multimedia Forum section. This forum, and the thread "Image loader problem! are both part of the Design Your Website category.


 Subscribe in a reader

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

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Sep 5th, 2007, 11:45
Junior Member
Join Date: Sep 2007
Location: Bristol, UK
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Image loader problem!

Hi there guys,

I'm having a real headache problem and I can't work out a solution! I am building a flash site where I have gallery sections. I have created a thumbnail button as a movieclip that basically changes its alpha value as you roll over it. I have then created an invisible button to house the script. Fine. I then want to drag this movieclip onto the main stage and use the loader compontent to dynamically load the images from the movieclip thumbnails. I have named the component "myloader" and the code I am using is as follows:
Code: Select all
on(release){
myloader.contentPath="image1.swf";
}
However, this meets with no reaction! The Image1.swf file is in the right directory, and when I assign this code to a simple button it works fine, but this removes my ability to have a nice interactive button. Help! I am fairly new to actionscript and programming in general so am probably missing something really simple, but any guidance would be greatly appreciated!

Thank you.

Last edited by karinne; Sep 6th, 2007 at 15:28. Reason: Please use [ code ]...[ /code ] tags when displaying code.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Sep 5th, 2007, 15:23
Multimedia Specialist
Join Date: Apr 2007
Location: Arizona
Age: 25
Posts: 666
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Image loader problem!

You'll want it to look more like this....granted you are using AS2..
Code: Select all
on(release){
myloader.loadMovie=("image1.swf");
}
Last Blog Entry: Yay!? (Oct 8th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Sep 5th, 2007, 15:38
Junior Member
Join Date: Sep 2007
Location: Bristol, UK
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Image loader problem!

Hi There,

Thanks so much for the reply. That doesn't seem to work for me either! I have experimented with putting the following code on the main timeline;

Code: Select all
  myBtn.onRelease = function() {
              myloader.contentPath="image1.swf";
  }
I gave the movieclip and instance name of myBtn and this works. I does however seem to stop the functionality of my movie clip! This is a fade in / fade out button that has the following code attached to the "invisible button";
Code: Select all
on (rollOver) {
    gotoAndPlay(2);
}
on (rollOut) {
    gotoAndPlay(11);
}
I guess these two pieces of code are fighting with each other, but I don't know how to rectify the problem! Any suggestions would be greatly appreciated.

Thanks,

Tom.

Last edited by karinne; Sep 6th, 2007 at 15:28. Reason: Please use [ code ]...[ /code ] tags when displaying code.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Sep 5th, 2007, 15:41
Multimedia Specialist
Join Date: Apr 2007
Location: Arizona
Age: 25
Posts: 666
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Image loader problem!

Whoops take out the = sign...it's early and I missed that...

on(release){
myloader.loadMovie("image1.swf");
}
Last Blog Entry: Yay!? (Oct 8th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Sep 5th, 2007, 15:43
Multimedia Specialist
Join Date: Apr 2007
Location: Arizona
Age: 25
Posts: 666
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Image loader problem!

myBtn.onRelease = function() {
myloader.loadMovie("image1.swf");
}

You need this code for the button states:
Code: Select all
myBtn.onEnterFrame = function(){ 
if(rewind == true){ 
prevFrame(); 
} 
} 
 
myBtn.onRollOver = function(){ 
rewind = false; 
play(); 
} 
 
myBtn.onRollOut = function(){ 
rewind = true; 
}
Last Blog Entry: Yay!? (Oct 8th, 2007)

Last edited by Sgaspar11; Sep 5th, 2007 at 15:48.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Sep 5th, 2007, 16:05
Junior Member
Join Date: Sep 2007
Location: Bristol, UK
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Image loader problem!

Hi there,

Thanks again!

I'm just a bit confused as to where I put the code for the button state. On the same frame as the rest of the code, or somewhere else?

Sorry if this sounds like a dumb question! But I'm fairly new to this.

Thanks again.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old Sep 5th, 2007, 16:08
Multimedia Specialist
Join Date: Apr 2007
Location: Arizona
Age: 25
Posts: 666
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Image loader problem!

you can put it in it's own layer above the buttons....I usually create an actions layer and put all my code there for easier sorting...
Last Blog Entry: Yay!? (Oct 8th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
Old Sep 5th, 2007, 16:27
Junior Member
Join Date: Sep 2007
Location: Bristol, UK
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Image loader problem!

Hi ,

Thanks again. The code for the component works great but I am still having probs with my rollover states. I could send my experiment Fla. if that would help? If not, thanks for all of your time.

Tom.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9  
Old Sep 5th, 2007, 18:10
Multimedia Specialist
Join Date: Apr 2007
Location: Arizona
Age: 25
Posts: 666
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Image loader problem!

Did you use the code supplied above? Make sure it is on its own layer above the "button"

One thing to change that might work is to change "myBtn" to "this".

See what that does.
Last Blog Entry: Yay!? (Oct 8th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #10  
Old Sep 6th, 2007, 08:10
Junior Member
Join Date: Sep 2007
Location: Bristol, UK
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Image loader problem!

Hi there,

Following on from my previous thread, I have a much simpler way of doing it!;
Code: Select all
on (rollOver) {
    gotoAndPlay(2);
}
on (rollOut) {
    gotoAndPlay(11);
}

on (release) {

    loadMovie("image1.swf", "_root.myloader");
}
That works just fine! Much simpler. I do like to make things hard for myself!

Thanks again.

Tom.

Last edited by karinne; Sep 6th, 2007 at 15:29. Reason: Added code tags
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
button, invisible button, loader component, movieclip

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
Pre loader problem monkeygraphik Flash & Multimedia Forum 1 Jan 25th, 2008 15:45
First image problem and inline list problem konnor5092 Web Page Design 8 Dec 1st, 2007 09:08
Need help with Pre-loader GFXology Flash & Multimedia Forum 3 Aug 13th, 2007 15:45
Random swf movie loader (continuous) markmod1 Flash & Multimedia Forum 1 Jul 3rd, 2007 14:49
How can I create a Flash Movie Loader JohnMitch Flash & Multimedia Forum 19 Mar 12th, 2005 04:01


All times are GMT. The time now is 11:05.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization 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