• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Can you help me how to make invisible a movieclip after i pressed on it in every layers?

New Here ,
Jul 19, 2018 Jul 19, 2018

Copy link to clipboard

Copied

Hello i am newbie with action script 2 and i am develop a escape game in flash cs5 with action script 2.The problem is that i have created some variables on layer named action script to make invisible a movieclip when its clicked.

action script layer code:

var mymovieclip=0;

if (mymovielip==1)

{

_root.mymovieclip._visible=false;

}

and movieclip code:

onPress()

{

_root.mymovieclip._visible=false;

}

if (mymoviclip==1)

{

_root.mymovieclip._visible=false;

}

after all that , when i click the movieclip its being invisible but!!! when i change another layer that movie clips appears again."I could not find permanently hide this movieclip when its clicked".Sorry for my english and my codes works as well (i mean i can be write them wrong here but they works well in flash) can you help me please?

TOPICS
ActionScript

Views

970

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 20, 2018 Jul 20, 2018

Copy link to clipboard

Copied

this is the only code that's meaningful (unless you assign mymovieclip or mymovielip or mymoviclip to 1 someplace not shown),

onPress()

{

_root.mymovieclip._visible=false;

}

p.s.  - and i assume some of those are typos -

p.s.s. if _root.mymovieclip disappears and then reappears there's either coding making it do so or it appears on another keyframe and is another instance

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 20, 2018 Jul 20, 2018

Copy link to clipboard

Copied

first of all thank you for your answer theres no variable movielip or movieclip with that..this is my fault i used this code in my previous flash games but i lost the codes.I remember how i blocked reapperance of movieclip when every change of frames.

Just open flash and create 5 different keyframe than put a movieclip there and make it invisible with the code.After that when you go to another keyframe (gotoandstop code) you will see this movieclip reappears! i cant find a way to block it appear 😕

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 20, 2018 Jul 20, 2018

Copy link to clipboard

Copied

yes its appears on another keyframe..i put gotoandstop code soo when i go to another keyframe this movieclip appears and appears..i think i have to tell it to flash with some variables for making invisible permanently.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 20, 2018 Jul 20, 2018

Copy link to clipboard

Copied

remove all instances of mymovieclip

add mymovieclip to the first keyframe where you want it to appear

add the following to whatever object you want to be clickable 

onPress()

{

_root.mymovieclip._visible=false;

}

add your other keyframes on the layer that contains mymovieclip where you want mymovieclip to change properties (eg, position).

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 20, 2018 Jul 20, 2018

Copy link to clipboard

Copied

thank you for help my friend i will try that today and if i cant i can upload the .fla file and thanks again.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 20, 2018 Jul 20, 2018

Copy link to clipboard

Copied

you're welcome.

(p.s when using the adobe forums, please mark helpful/correct responses, if there are any.)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 21, 2018 Jul 21, 2018

Copy link to clipboard

Copied

my friend i have uploaded the file for you can you check the .fla please i wrote instruction in it and you will see..:(

https://ufile.io/r63fa

(its trusted no worry)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 21, 2018 Jul 21, 2018

Copy link to clipboard

Copied

when i go back main stage that box is being visible again i tried everyway

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 21, 2018 Jul 21, 2018

Copy link to clipboard

Copied

i don’t dl and fix files unless hired.  free help i only offer via the adobe forums.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 21, 2018 Jul 21, 2018

Copy link to clipboard

Copied

i dont want you fix the file and i am trying to show you its a basic problem and my english is not to explain you this and only a developer can fix it..

I am saying:_root.samplemovieclip._visible=false; >> this code is not enough to hide a movieclip permanently we have do this with variable..

all i want is when i click samplemovieclip "it must be invisible forever" no more appereance or repeat or anything.

thanks for help

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 22, 2018 Jul 22, 2018

Copy link to clipboard

Copied

up

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 22, 2018 Jul 22, 2018

Copy link to clipboard

Copied

you're welcome.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 22, 2018 Jul 22, 2018

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 22, 2018 Jul 22, 2018

Copy link to clipboard

Copied

1.png

2.png

3.png

4.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 22, 2018 Jul 22, 2018

Copy link to clipboard

Copied

did you follow these steps:

remove all instances of mymovieclip

add mymovieclip to the first keyframe where you want it to appear

add the following to whatever object you want to be clickable

onPress()

{

_root.mymovieclip._visible=false;

}

add your other keyframes on the layer that contains mymovieclip where you want mymovieclip to change properties (eg, position).

if so, put mymovieclip in its own labeled layer and attach a screenshot of your main timeline so i can that mymovieclip only exists in one keyframe.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 22, 2018 Jul 22, 2018

Copy link to clipboard

Copied

yes i followed your instructions but when i removed instance name , nothing worked.

1111.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 22, 2018 Jul 22, 2018

Copy link to clipboard

Copied

this is an escape game project my friend..i want that movieclip must be disappeared after clicked one time..

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 22, 2018 Jul 22, 2018

Copy link to clipboard

Copied

i will fail if player gets an item and if it appears again in his inventory..:)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 22, 2018 Jul 22, 2018

Copy link to clipboard

Copied

up

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 22, 2018 Jul 22, 2018

Copy link to clipboard

Copied

you did nothing that i suggested and you did things that i did not suggest.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 22, 2018 Jul 22, 2018

Copy link to clipboard

Copied

you said me remove instances of movieclip i did and i removed mymovieclip's instance name

i added mymovieclip on first keyframe as you requested

than i added my code in it:

onPress()

{

_root.mymovieclip._visible=false;

}

thats all i did.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 23, 2018 Jul 23, 2018

Copy link to clipboard

Copied

LATEST

i didn't say anything about removing any instance names

the code you showed was different

and you didn't place mymovieclip on its own layer.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines