Topic: request for a 3rd textbox under main image

subject line says it all



or give me a hint where to duplicate captions textbox wink


Richard

Richard

in order to better assist you, please provide a url, relevant code and details about your problem.
Thanks!

Re: request for a 3rd textbox under main image

Using SimpleViewer-PRO, you can add an xtra text box by duplicating this line in StageManager.as:

mCaption_mc = mClip_mc.attachMovie("Caption","mcCaption",mClip_mc.getNextHighestDepth());

Give the movieClip a new name. Then search for all references to mCaption_mc in StageManager.as, and duplicate the code for your new textbox.

Felix Turner
SimpleViewer Support Team.

Re: request for a 3rd textbox under main image

Wow, that's easy, errrrrr   I mean  simple.

Thanks!

Richard

in order to better assist you, please provide a url, relevant code and details about your problem.
Thanks!

Re: request for a 3rd textbox under main image

I need another hint -
The new text box comes up as expected, but reads the text of captions.
I'm adding to the xml like this

<image><NAME>01.jpg</NAME><CAPTION><!&#91;CDATA&#91;<A href="attendees/LG/01.jpg" target="_blank">CLICK HERE to open LARGE image to save or print     IMAGE # - attendees_01</A>&#93;&#93;></CAPTION></image>

The other problem, I'd like the Y position to be dynamic  relative to the image ht.
something like this

mCaption2_mc._y =mImageArea.mBackBtn.setBtnPosn&#40;imgx -fw + btnW,imgy + h  + btnW &#41;;    //this would be ideal, but ImageArea is private

Thanks!

Richard

in order to better assist you, please provide a url, relevant code and details about your problem.
Thanks!

Re: request for a 3rd textbox under main image

Disregard this post about the text showing, the code above is not what i used. I had a typo in the code, duh.

thx

Richard

in order to better assist you, please provide a url, relevant code and details about your problem.
Thanks!

Re: request for a 3rd textbox under main image

I couldn't make it...  :cry:

mCaption_mc = mClip_mc.attachMovie("Caption","mcCaption",mClip_mc.getNextHighestDepth());
Give the movieClip a new name. Then search for all references to mCaption_mc in StageManager.as, and duplicate the code for your new textbox.

could you please explain a little more? or give me an example for each file i should chage smth in it... tnx

It will be used in this site: http://www.gerstein-art.com/index.php?o … p;Itemid=4

Re: request for a 3rd textbox under main image

//The code below creates a new instance of Caption textbox mc, names the instance mcCaption2
mCaption_mc = mClip_mc.attachMovie&#40;"Caption","mcCaption",mClip_mc.getNextHighestDepth&#40;&#41;&#41;;
            mCaption2_mc = mClip_mc.attachMovie&#40;"Caption","mcCaption2",mClip_mc.getNextHighestDepth&#40;&#41;&#41;;


//The code below tells both instances of Caption to use wordWrap, so every where you see mCaption,
//duplicate the code for mCaption2_mc
mCaption_mc.txtText.wordWrap = true;
mCaption2_mc.txtText.wordWrap = true;

//and an example line from your gallery.xml will look like this
<image><NAME>19.jpg</NAME><CAPTION><!&#91;CDATA&#91;This is your text under thumbs&#93;&#93;></CAPTION><CAPTION2><!&#91;CDATA&#91;this is your text under main image&#93;&#93;></CAPTION2></image>


//to locate it under the main image
//try this, this works for thumbs on left, haven't test other set ups. I'd like it to be located dynamically based //on main image, but haven't firgured that out yet &#40; hint to felix&#41; This aslo locates it 100 px to left edge of //image, you may want to center it, based on image width
//around line 260
mCaption_mc.txtText._width = mThumbArea.width;
mCaption_mc._x = thumbX;
mCaption_mc._y = thumbY + mThumbArea.height +mThumbArea.navHeight + Thumb.padding;
mCaption2_mc.txtText._width = mImageArea.width - 100;
mCaption2_mc._x = thumbX  + mThumbArea.width  + Thumb.padding + 100;
mCaption2_mc._y = imgY + imgH;

//use text pad or similar editor to find all the  mCaption_mc movie clips and after your done, publish //simpleviewer.fla and paste your new viewer.swf into your web folder


    

and that's it!
hth
Richard

Richard

in order to better assist you, please provide a url, relevant code and details about your problem.
Thanks!

Re: request for a 3rd textbox under main image

big_smile

Re: request for a 3rd textbox under main image

Q1: Is there any chance that the SimpleViewerAdmin will open a second line in the "edit caption" window, and write it to the second caption line in the XML file?

I'll Explain: I want to let the artist the option to upload the picture and add a caption which contains 4 or 5 lines, without the need to add HTML code... he's an artist...
that creates the need of X lines on the simpleViewerAdmin...

is there a better way (more simple) way to do that :?:

Re: request for a 3rd textbox under main image

Hi,
Does SimpleViewerAdmin support v1.8?

Maybe you could e mail the Admin guy with your question
http://www.redsplash.de/projects/simplevieweradmin/

Not elegant, but your artist could up load a form which would be the new xml file. He would fill in his caption in the caption tag. You could create the form using the file reference in flash. see pm


Maybe Felix will have a suggestion.

Richard

in order to better assist you, please provide a url, relevant code and details about your problem.
Thanks!

Re: request for a 3rd textbox under main image

Flash Ho you could try this! I figure it out!

In statemanager.as

mCaption_mc._x = Options.captionX;
            mCaption_mc._y = Options.captionY;
            mCaption_mc.txtText._width = Options.captionWidth;
            mCaption_mc.txtText._height = Options.captionHeight;
            mCaption2_mc._x = Options.caption2X;
            mCaption2_mc._y = Options.caption2Y;
            mCaption2_mc.txtText._width = Options.caption2Width;
            mCaption2_mc.txtText._height = Options.caption2Height;
            mCaption3_mc._x = Options.caption3X;
            mCaption3_mc._y = Options.caption3Y;
            mCaption3_mc.txtText._width = Options.caption3Width;
            mCaption3_mc.txtText._height = Options.caption3Height;

and in option.as

    static var captionX:Number = 10; //X posn of Title text
    static var captionY:Number = 0; ///Y posn of Title text
    static var caption2X:Number = 0; //X posn of Title text
    static var caption2Y:Number = 0; ///Y posn of Title text
    static var caption3X:Number = 295; //X posn of Title text
    static var caption3Y:Number = 0; ///Y posn of Title text
    static var captionWidth:Number = 295; //width of Title text
    static var captionHeight:Number = 150; //height of Title text   
    static var caption2Width:Number = 0; //width of Title text
    static var caption2Height:Number = 0; //height of Title text   
    static var caption3Width:Number = 295; //width of Title text
    static var caption3Height:Number = 150; //height of Title text

Re: request for a 3rd textbox under main image

Hi New One.
Thanks, Do you have an example of a gallery using this? a url?
Thanks

Richard

in order to better assist you, please provide a url, relevant code and details about your problem.
Thanks!

Re: request for a 3rd textbox under main image

and another problem, all 3 caption showning the same info! I changed xml
<caption> some code</caption>
<caption2> some code</caption2>
<caption3> some code</caption3>

it seems like caption2 and caption3 are not there!

Who know to resolve this??

about url, not yet, it under construction!

Re: request for a 3rd textbox under main image

They are all showing the text "some code" ?
You lost me, did you try my example above?

Richard

in order to better assist you, please provide a url, relevant code and details about your problem.
Thanks!

Re: request for a 3rd textbox under main image

Yes, i guess i did, but i`m not sure about

//use text pad or similar editor to find all the  mCaption_mc movie clips// what movie clips?

Re: request for a 3rd textbox under main image

"mCaption_mc"   is a movie clip

Richard

in order to better assist you, please provide a url, relevant code and details about your problem.
Thanks!

Re: request for a 3rd textbox under main image

I think this is the problem: in statemanager, line 290   

public function showCaption(index:Number){
        var cap = mXMLManager.imageCaptions[index];
        if (cap == undefined) cap = "";
        mCaption_mc.txtText.htmlText = cap;
        mCaption2_mc.txtText.htmlText = cap;
        mCaption3_mc.txtText.htmlText = cap;
    }

is this the corect code?

flash ho please can you send me your statemanager.as, i want to knnow where is the problem!
Thx!!!

Re: request for a 3rd textbox under main image

ok, see ur pm

Richard

in order to better assist you, please provide a url, relevant code and details about your problem.
Thanks!

Re: request for a 3rd textbox under main image

Finally, i made it, thx Flash Ho for your help! That section was the problem!
THX again!!!

Re: request for a 3rd textbox under main image

ok I edited StageManager.as exactly as flash ho decribes too, and I keep seeing the same caption the only time it changes is when I add another childnode in XMLManager.as but that just makes the second picture the second caption. heres my xml data:
<image>
    <filename>115-1503_IMG.jpg</filename>
    <caption>test first caption</caption>   
    <caption2>second caption test</caption2>   
</image>
Ive dont this for a week and Im missing something driving me nuts
can I get a copy of StageManager.as with a working extra text box sent to me to? thx

PS.is StageManager.as the olny area that needs to be edited?
nothin in fla? correct?

Re: request for a 3rd textbox under main image

I'll go thru this tomorrow and make a list of what needs changing, too tired tonight.

Richard

in order to better assist you, please provide a url, relevant code and details about your problem.
Thanks!

Re: request for a 3rd textbox under main image

I'll go thru this tomorrow and make a list of what needs changing, too tired tonight.

Hello. Any update on this?

I'm doing exactly what Flash ho said, I don't know what's happening.

Please help.

Re: request for a 3rd textbox under main image

I think this is the problem: in statemanager, line 290   

public function showCaption(index:Number){
        var cap = mXMLManager.imageCaptions[index];
        if (cap == undefined) cap = "";
        mCaption_mc.txtText.htmlText = cap;
        mCaption2_mc.txtText.htmlText = cap;
        mCaption3_mc.txtText.htmlText = cap;
    }

is this the corect code?

flash ho please can you send me your statemanager.as, i want to knnow where is the problem!
Thx!!!

Hi newone,

I have almost similar problem only that I can't get my second caption (mCaption2) to appear together with caption1. I think the problem is at the same line as yours.

Since u've successfully solved ur problem, can u send me your stagemanager.as so dat i can find the problem?

Many thx!