Topic: ImageArea.as File Customizations...New Buttons & MClips

Hello I will try to make this short and clear.

I'm modifying the ImageArea.as file to add in a button that will "popup" a new  text area displaying info about the image.

I have tried many approaches and can't get it so it must be a misunderstanding of the logic on my part.

What I do have working is that i have incorporated this photo info into the right click context menu so now you have a menu item in the right click menu that you can click on and it will set the visible of a movie clip to true so that the photo info appears.  I inserted code into the context menu area:

image_cm.customItems.push(new ContextMenuItem("Show Image Details", Delegate.create(this,openImageInfo)));

and then added this function:

private function openImageInfo(){
        mInfoDisplay_mc._visible = true;
    }

and that works great but now I'm trying to get the same type behavior on a button rollover and rollout and I've tried this so many ways that it has to be something stupid im missing...

The two main ways I have tried are this....

#1: using a Movie Clip for my "button" trigger
#2 using a Button for my "button" trigger

Using #1 I have inserted this just after the //init error icon area:

//init info icon
           mInfo_mc = mClip_mc.attachMovie("ImageInfoButton","info",mClip_mc.getNextHighestDepth());
           mInfo_mc._visible = false;
           mInfoDisplay_mc = mClip_mc.attachMovie("ImageInfoDisplay","infodisplay",mClip_mc.getNextHighestDepth());
           mInfoDisplay_mc._visible = false;
        mInfo_mc.onRollOver = function(){
                    mInfoDisplay_mc._visible = true;
    }

and I have tried altering the function to this:

mInfo_mc.onRollOver = function(){
                    mInfoDisplay_mc.visible = true;
    }

and method #2 I have simply added action script to the button instance on the stage like this:

on(release) {
    ImageInfoDisplay._visibile = true;
}

and ive also tried this

on(release) {
    ImageInfoDisplay.visibile = true;
}

and then for both #1 and #2 I have tried putting _root.ImageInfoDisplay...and ive tried many other combos of things im sure....

i hope that makes sense and im hoping someone might be able to see my mistake or at least tell me how i would properly setup a movie clip rollover effect to rollover one movie clip and make another movie clip visible.....

if you need more of my code let me know....if all my attempts look good then maybe its a conflict in my naming or something??? i just dont know...any help would be appreciated....

thanks

Re: ImageArea.as File Customizations...New Buttons & MClips

sorry to bump...but i consider myself a fairly competent coder and this ones driving me crazy...i know php really well but am not as good at flash but its very similar.....

if anyone is looking for some fun feel free to code me up a working example of a new button that shows/hides a layer/object/sprite/movieclip or whatever its called.... smile

i will keep trying myself....my best guess is its something larger in maybe the order or the path or something

the reason im trying to do this with the imagearea.as file is bcs i am placing the button on the image frame border bottom right corner....and it just made sense to keep the info button and info display in with the image area....

thanks

Re: ImageArea.as File Customizations...New Buttons & MClips

hi...you ever feel like youre talking to yourself  smile ??

ok so to try to sort this out a little for any future beneficial use by others.....

NEW BUTTONS AND NEW MOVIE CLIPS

what i have found and i think might be true but could still stand to be verified by others.....

I got a new button to work.  I was mistakenly placing all my new objects on the load items frame #15 bcs this is where I see all the current movie assets are placed but really i needed to place them at frame #30 which is the main stage....

The logic being that all the items are dynamically loaded in frame 15 but not displayed until 30 so once i place my button and movie clip on the stage in frame 30 it all worked just peachy....

what i could never get to work was placing a on() type function on a movie clip and i think this is related to this whole load and generate on the stage thing....i found an adobe help doc that said something to that effect....

and finally i was able to mimic the existing rollover next and back buttons to add in a new info rollover button just copying and pasting and renaming everywhere i saw a "mBackBtn"....but this led to problems too with my desired functionality as i wanted this info button to be visible all the time....

dont know if this will be useful to anyone but figured i would post it up....have fun....