Removing previous Portfolio Item Image (RemoveChild)

Post all questions about the Sycamore site here

Removing previous Portfolio Item Image (RemoveChild)

Postby ollwoll » Tue Jun 16, 2009 7:36 pm

Hi there
I have a portfolio item which has images of varying heights. On click, the previous image is not removed, it loads in on top.
e.g. Image 1 is 540px wide, 600px high; Image 2 is 540px wide, 400px high.

When you click on image 1, image 2 loads on top and because of the 200px difference, the bottom of image 1 is still visible.

Can you tell me how to alter the code to remove the previous image. (I'm guessing its a case of altering the RemoveChildAt function in PotfolioItem.as??) I have some AS knowledge so would be confident of editing as you instruct.

Many thanks in advance
ollwoll
 
Posts: 1
Joined: Tue Jun 16, 2009 7:26 pm

Re: Removing previous Portfolio Item Image (RemoveChild)

Postby warmforest » Tue Jun 16, 2009 7:55 pm

Hello. You should be able to achieve that by adding the following code below line 571 in "PortfolioItem.as":

_images.removeChildAt(0);

Hope that helps.

-Jay
warmforest
Site Admin
 
Posts: 344
Joined: Wed Nov 05, 2008 5:12 pm
Location: Washington, DC

Re: Removing previous Portfolio Item Image (RemoveChild)

Postby carlos » Sun Mar 07, 2010 7:59 am

I am experimenting the same problem. I've tried editing the file just as just said, but it does nothing. In fact, anything I do (even removing it) in the whole "scr" file makes no difference at all. What am I doing wrong? Am I editing the wrong files or...?
carlos
 
Posts: 5
Joined: Sun Mar 07, 2010 7:54 am

Re: Removing previous Portfolio Item Image (RemoveChild)

Postby warmforest » Sun Mar 07, 2010 6:11 pm

Hello. You need to republish the FLA files after making changes to the AS files. Hope that helps.

-J
warmforest
Site Admin
 
Posts: 344
Joined: Wed Nov 05, 2008 5:12 pm
Location: Washington, DC

Re: Removing previous Portfolio Item Image (RemoveChild)

Postby carlos » Sun Mar 07, 2010 7:58 pm

I can't open/edit the .FLA file using Macromedia FLash 8. Am I using the wrong program or?
carlos
 
Posts: 5
Joined: Sun Mar 07, 2010 7:54 am

Re: Removing previous Portfolio Item Image (RemoveChild)

Postby warmforest » Mon Mar 08, 2010 10:49 pm

Hello. You will need Adobe Flash CS3 or later if you want to customize the source files.

-J
warmforest
Site Admin
 
Posts: 344
Joined: Wed Nov 05, 2008 5:12 pm
Location: Washington, DC

Re: Removing previous Portfolio Item Image (RemoveChild)

Postby carlos » Tue Mar 09, 2010 11:25 am

Ok, Now I can edit the .FLA files. After I edit the line you said in the PortfolioItem.as (NOT editing anything else) and save it, and then go to the .FLA and publish it, I get this error:
http://img705.imageshack.us/img705/4678/errorqo.jpg
Would you know how to fix it? As I said I haven't touched the Main.as file
carlos
 
Posts: 5
Joined: Sun Mar 07, 2010 7:54 am

Re: Removing previous Portfolio Item Image (RemoveChild)

Postby warmforest » Wed Mar 10, 2010 11:16 pm

That's because you are republishing without having the correct font on your system. Search the board for more info on changing the fonts. I'm really not able to provide any support for source code customizations unfortunately.

-J
warmforest
Site Admin
 
Posts: 344
Joined: Wed Nov 05, 2008 5:12 pm
Location: Washington, DC

Re: Removing previous Portfolio Item Image (RemoveChild)

Postby carlos » Thu Mar 11, 2010 9:15 am

Honestly I think you should fix this or atleast help me with it, because it's not really a code modification but a bug. I'm a photographer and I need to display different orientated pictures (vertical and horizontal) and I can't because of this bug...
carlos
 
Posts: 5
Joined: Sun Mar 07, 2010 7:54 am

Re: Removing previous Portfolio Item Image (RemoveChild)

Postby warmforest » Thu Mar 11, 2010 11:24 pm

It's not a bug. It was designed with the fade effect to have each set of images be the same size.

-J
warmforest
Site Admin
 
Posts: 344
Joined: Wed Nov 05, 2008 5:12 pm
Location: Washington, DC


Return to Sycamore

cron