FORUMS: list search recent posts

thumbnail to larger image

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
eamon white
thumbnail to larger image
on Mar 15, 2013 at 7:21:41 am

5650_untitledfolder2.zip

how do i get my thumbnail to load and larger image when clicked? and then when clicked of the larger image the larger image is remove and you can see my scroller again?

thanks
eamon


Return to posts index

demetri tashie
Re: thumbnail to larger image
on Mar 18, 2013 at 2:43:16 am

eamon - i am away and can't work with cs6 on this system. if you convert it down to cs5, i would look at it for you.


Return to posts index

eamon white
Re: thumbnail to larger image
on Mar 18, 2013 at 5:26:49 am

5663_untitledfolder3.zip

cs5


Return to posts index


eamon white
Re: thumbnail to larger image
on Mar 18, 2013 at 1:03:29 pm

HOW WOULD DO THE SAME WITH VIDEO THROUGH XML ? MAY THE THUMBNAIL LOAD A VIDEO THEN REMOVE THE VIDEO AND STOP PLAY WHEN CLICK OFF?


Return to posts index

demetri tashie
Re: thumbnail to larger image
on Mar 18, 2013 at 8:57:44 pm

same thing. you just need to take into account the video, and be sure to stop it, and unload it, etc


Return to posts index

eamon white
Re: thumbnail to larger image
on Mar 19, 2013 at 2:43:33 am

How do I stop and upload ?


Return to posts index


demetri tashie
Re: thumbnail to larger image
on Mar 19, 2013 at 1:34:26 pm

unloading, of course, depends on how you are loading the video.

one of the most frequently asked questions is ' how come when i ....blah...blah...blah..... the video's sound keeps playing?' so paying attention to actually stopping the video ( or music) before trying to remove the player( or the external swf that contains the player) first is a good idea.


if you are just using a playback component, direct it to stop before moving on. if you are using a componetn, and just changing the source, you could be ok, but remembering to keep 'stop the playback' in your workflow will help when your app gets more complicated

if you are using netstream/net connection, close the stream and connection

if using a loader , you can use unoadAndStop() of course, but it won' hurt to stop playback first.


Return to posts index

demetri tashie
Re: thumbnail to larger image
on Mar 18, 2013 at 8:41:08 pm

there are several ways to do this. this is just one way

your task lies in working with the 'clickScrollerItem' function. it is there that you can do, or initiate, all the changes that you want made. it necessitates removing the previous eventlisteners, and adding a new one for the click on the larger image, which its new function would then restore the original size of the image, as well as add back the necessary eventlisteners. sample code follows.

function clickScrollerItem(e:MouseEvent):void {
trace("clicked item " + e.currentTarget.itemNum + " - visit url: " + e.currentTarget.link + " - title: " + e.currentTarget.title);
e.currentTarget.width=e.currentTarget.width *2;
e.currentTarget.height=e.currentTarget.height *2;
scroller.removeEventListener(Event.ENTER_FRAME, moveScrollerThumbs);
e.currentTarget.removeEventListener(MouseEvent.MOUSE_OVER, overScrollerItem);
e.currentTarget.removeEventListener(MouseEvent.MOUSE_OUT, outScrollerItem);
e.currentTarget.removeEventListener(MouseEvent.CLICK, clickScrollerItem);

e.currentTarget.addEventListener(MouseEvent.CLICK, clickScrollerItem2);
function clickScrollerItem2(e:MouseEvent):void {
e.currentTarget.width=e.currentTarget.width *.5;
e.currentTarget.height=e.currentTarget.height *.5;
scroller.addEventListener(Event.ENTER_FRAME, moveScrollerThumbs);
e.currentTarget.addEventListener(MouseEvent.MOUSE_OVER, overScrollerItem);
e.currentTarget.addEventListener(MouseEvent.MOUSE_OUT, outScrollerItem);
//e.currentTarget.removeEventListener(MouseEvent.CLICK, clickScrollerItem);

}
}


another way might be easier, to just code he click to load the lager image into a loader on top of the scroller ( like a light box) which hides or oat least prevents further clicks and rollovers onthe scroller. then the next click unloads and removes that loader.


Return to posts index

eamon white
Re: thumbnail to larger image
on Mar 22, 2013 at 6:36:15 pm

how would i code a lightbox of the scoller?


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]