dcsimg
A Flash Developer Resource Site

Page 1 of 2 12 LastLast
Results 1 to 20 of 25

Thread: Turning a Dymanic image into a link??

  1. #1
    davidbyrne.net.au
    Join Date
    Dec 2000
    Location
    Perth, Australia
    Posts
    63

    Turning a Dymanic image into a link??

    Hey guys,

    hope this is an easy one to sort out. I have a blank movie clip which loads in an image to it. That all works sweet. Now I want to set that Movieclip(the problem could be here) to act like a button and I want to click on it (with the link of another xml string - again i have traced this and know this works fine). Now i just think I have the wrong function trying to do this?


    Code:
    					thumbButton1.onPress = function (){
    						loaderClip = item.image1;
    					}
    I bet I am miles out.

    So thumbButton1 is the thumbnail i want to act like a button but is a movie click (only way i can see to load dymanic content into it). loaderClip is the blank Movie Clip I want the Image1 to load into.

    Please help.

    Thanks in advance

  2. #2

  3. #3
    davidbyrne.net.au
    Join Date
    Dec 2000
    Location
    Perth, Australia
    Posts
    63
    Yer that doesnt work either?
    The thumbnail displays fine and I know the image that is to go into LoaderClip is imported right but i just cant make the movie clip clickable?

  4. #4

  5. #5
    davidbyrne.net.au
    Join Date
    Dec 2000
    Location
    Perth, Australia
    Posts
    63
    lol yer i was just looking at that
    wil attach it in a sec

  6. #6
    davidbyrne.net.au
    Join Date
    Dec 2000
    Location
    Perth, Australia
    Posts
    63

  7. #7
    up to my .as in code Chris_Seahorn's Avatar
    Join Date
    Dec 2004
    Posts
    4,389
    I'm having one of those night budgi. I see you are using xml with attributes.....could you post the xml structure so I don't have to guess? I can use local images to test, I just need the layout of the xml. Thanks.

  8. #8
    davidbyrne.net.au
    Join Date
    Dec 2000
    Location
    Perth, Australia
    Posts
    63
    ok I will put the whole zip file up there for you with everything i am using.

    Cheers again mate

  9. #9
    up to my .as in code Chris_Seahorn's Avatar
    Join Date
    Dec 2004
    Posts
    4,389
    Thanks man...I should have asked in the first place but I'm running four or five threads at a time and screwed up. Sorry

  10. #10
    davidbyrne.net.au
    Join Date
    Dec 2000
    Location
    Perth, Australia
    Posts
    63
    ok will put it up in a minute, same link as before just .zip instead of .swf

  11. #11
    davidbyrne.net.au
    Join Date
    Dec 2000
    Location
    Perth, Australia
    Posts
    63
    ok its up there now

  12. #12

  13. #13
    davidbyrne.net.au
    Join Date
    Dec 2000
    Location
    Perth, Australia
    Posts
    63

  14. #14

  15. #15
    up to my .as in code Chris_Seahorn's Avatar
    Join Date
    Dec 2004
    Posts
    4,389
    OK man...this is pretty confusing. You have two versions of each image...a thumb and a large. Each node of your xml attributes all of them (odd in itself) and onstage you have a slider sliding in from the left with the three (well, as delivered it's three instances of the same image) images and on press it's sending all three to the thumb buttons (why displayed twice onstage..even if they are different sizes?) and ultimately you want those thumbs on the right (stacked top to bottom) to be buttons. What attribute in the xml is supposed to be the link they fire or is it supposed to once again load one of the two sizes (which would make three of the same image onstage at once)?


    This xml seems very oddly constructed (and definitely inefficient):

    Code:
    <Section sectionName="wine">
    	<myItem 
    		thumbNail="images/image1Thumbnail.jpg" 
    		heading="title1" 
    		description="description1" 
    		design="design1" 
    		image1Thumbnail="images/image1Thumbnail.jpg" 
    		image1="images/image1.jpg" 
    		image2Thumbnail="images/image2Thumbnail.jpg" 
    		image2="images/image2.jpg" 
    		image3Thumbnail="images/image3Thumbnail.jpg" 
    		image3="images/image3.jpg"
    	/>
    	
    	<myItem 
    		thumbNail="images/image1Thumbnail.jpg" 
    		heading="title2" 
    		description="description2" 
    		design="design2" 				                image1Thumbnail="images/image1Thumbnail.jpg" 
    		image1="images/image1.jpg" 
    		image2Thumbnail="images/image2Thumbnail.jpg" 
    		image2="images/image2.jpg" 
    		image3Thumbnail="images/image3Thumbnail.jpg" 
    		image3="images/image3.jpg"
    	/>
    	
    	<myItem 
    		thumbNail="images/image1Thumbnail.jpg" 
    		heading="title3" 
    		description="description3" 
    		design="design3" 
    	             image1Thumbnail="images/image1Thumbnail.jpg" 
    		image1="images/image1.jpg" 
    		image2Thumbnail="images/image2Thumbnail.jpg" 
    		image2="images/image2.jpg" 
    		image3Thumbnail="images/image3Thumbnail.jpg" 
    		image3="images/image3.jpg"
    	/>
    </Section>

    Where did you get this routine?

  16. #16
    up to my .as in code Chris_Seahorn's Avatar
    Join Date
    Dec 2004
    Posts
    4,389
    The reason I ask is this. I was recoding it to just slide the images from the left and on press of one of those sliding images load the large image into the loaderclip and then thought "well maybe I better ask him before I recode this to make sense".

    Why do we need those buttons on the right when we have the slider clips we can attach the links to and on click of those populate not only your loaderclip but also the description fields?

  17. #17
    davidbyrne.net.au
    Join Date
    Dec 2000
    Location
    Perth, Australia
    Posts
    63
    ok what happens is the 3 sliding images in the scroller are actually meant to be text later one (different headings for each project) so project 1 project 2 project 3 etc. Then when you click on that a large image should appear on loaderclip and 3 thumbnails should appear on the right side that are clickable to see the larger version in the loaderClip. make sense. Does that help?

    So you click on project 1 and you see Project image 1 and project thumbnail 2, 3 and 4. and then you click on thumbail 2 to see project image 2 as the main pic.

  18. #18
    davidbyrne.net.au
    Join Date
    Dec 2000
    Location
    Perth, Australia
    Posts
    63
    Sorry i cut corners with the images to make it quicker for me to build i should have named them all and stuff so it all makes sense

  19. #19

  20. #20
    davidbyrne.net.au
    Join Date
    Dec 2000
    Location
    Perth, Australia
    Posts
    63
    sweet cheers dude

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center