Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Turning On And Off - Quite Simple



Hi i am trying to turn visibilty of a movie clip on if off and vice versa.

On the first frame of the scene i have put:

suit._visible = false;

I have attached this to a button:

on(release){
if(suit._visible = true){
suit._visible = false;
} else if(suit._visible = false){
suit._visible = true;
}
}

i have also tried this with _root infront off "suit".

Whats the problem?



FlashKit > Flash Help > Flash Newbies
Posted on: 05-24-2003, 12:33 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Turning Off Navigation, Simple Question
Can somebody indicate how to turn off navigation for a movie? Currently, the user can click Enter to play or pause the movie, rewind the movie or even loop it, but my movie is is completely self contained and need to be able to dictate all the navigation.

Thanks in advance for any help

Turning Around
im trying to get my one attached mc "zombie", to flip over or turn around when the oter MC "guy", is on the other side of it.i had this code on the zombie when i didn't attach it.

Code:
onClipEvent (enterFrame) {
if (_root.guy._x < _x) {
_xscale = Math.abs(_xscale);
} else {
_xscale = -Math.abs(_xscale);
}
}
but when i use this code after i attached it,

Code:
_root.zombie.onEnterFrame = function() {
if (_root.guy._x < _x) {
_xscale = Math.abs(_xscale);
} else {
_xscale = -Math.abs(_xscale);
}
};
it doesn't work....can anyone help?

Turning SWF's Into FLA's
Anyone one know where I can get the programme that does this? I know it's about as I used to have one, before I reformated my harddrive and lost it!

Turning Off An .mp3
I have a secondary .swf loading into a master .swf. I am loading an .mp3 into the secondary .swf dynamically by creating a new sound and a new sound channel (here's my vars):


ActionScript Code:
var musicPiece:Sound = new Sound(new URLRequest("mp3s/intro.mp3"));
var mySoundChannel:SoundChannel;
var isPlaying:Boolean = false;
var pos:Number = 0;

I just have a pause button in the secondary .swf and everything works fine, the problem is that I have 3 more secondary .swfs that will load when called from buttons on the master .swf. I'm unloading the new loaders that carry the .swf childern on the main timeline of the master .swf, but the sound, of course, doesn't stop. I tried just addressing the sound channel var I made:


ActionScript Code:
this.swfIntroLoader.mySoundChannel.stop();

swfIntroLoader is the loader that I created in the master .swf that loads the child .swf (secondary .swf) with the mp3 player in it.

I've also tried to cast "swfIntroLoader" as a MovieClip and that didn't work either.

Any suggestions?

Turning
How can i turn an object around with motion tween?

Turning
How can i turn an object around with motion tween?

Turning .swf Int .fla
Hi,
 I have a very Big problem....I created a website for a friend of mine...It is the first one I made...I have lost all data on my computer including all the .fla's that made up the website...it is a tattoo website and every jpeg and thumbnail on the website were made up of .swf's...I can get all of my .swf's back if I download them from the server onto my comp. but is there a way to somehow turn the .swf back into an .fla??? Please say yes!!! I have sothink .swf decompiler but I do not think that will work...If you would like to check out the site the address is www.MikeRubendallTattoo.com (i dont know if the url is allowed in the forum, if it isnt please let me know) as you can see it is not the greatest website so I really need these files to make it better...the time it will take to build again for me will set me back alot...also if I have to make any updated pics on the site I will surely have to make all of that all over again...I will if i have to, but figured id take a shot with this...any help is GREATLY appreciated....
Thanks,
 Mike C.

Turning Something ...
Howdy flash people.

I can't work out how to do this, I have a MC called "dial" and I have centered it in the MC.

Now when I press on it I want it to turn with the cursor like a real dial so if I press it and turn it left it will turn left and it will turn to whereever my cursor it on the stage.

Any help would be great :D

Turning MC's Into Buttons?
Hello and thank you for coming! I have a question. I am dynamically loading Movieclips depending on what button a user clicks. Once these MC's are loaded, when a user rolls over this clip it is supposed to load the same MC but a larger display of it into another Movieclip. I am pretty sure I am suppose to turn these dynamic MC's into buttons. But how do I do this not knowing exactly what Movie clips will be loaded since it is based on what button the user clicks? (By the way if this helps, the SWF files are being loaded into the dynamic duplicated Movie clips.)

Turning Off Music
would i be using action script to turn off music in my flash movie? ie do if i have a button to turn off music, how would i code it to turn off the music.

thanks

Turning Hittest Off And On...
i have a little game i'm making (just a shooty one) and when a baddie movie clip gets hit, he goes into an explosion. when the baddie is moving down the screen he is on frame 1 of his own movie clip and the hittest sends him to frame 2 and plays for 4 frames which is the graphic of him exploding.... i want the hit detect to be turned off on frame 2 of his movie so if he is exploding and hits your ship that you don't lose energy and also because as a laser hits the baddies, they goto and play frame 2 as well, but if you shoot them while they are exploding, they keep going back to and playing frame 2 which means you can keep shooting the same enemy and getting points as long as you are quick...

here is the script for the hit detection:
(spaceship is the goodie, enemy is the baddie, laser is the goodie shots at the baddie)

on the enemy:
onClipEvent (enterFrame) {
if (this.hitTest(_root.spaceship)) {
_root.hits--;
gotoAndPlay (2);
if (_root.hits==0) {
_root.gotoAndStop("gameOver");
}
}
}

on the laser:
onClipEvent (enterFrame) {
for (i=1; i<=_root.numEnemy; i++) {
if (this.hitTest(_root["enemy"+i])) {
_root.score += 100;
_root["enemy"+i].gotoAndPlay(2);
_root.spaceship.laserCounter--;
this.removeMovieClip();
}
}
}

please help cos its got me stumped... if i wasn't very clear up there, basicaly i want frame 2 of an enemy movie to take off the hittest that the onclipevent of that movie turned on...

ask me if you want to know anything that will help you help me

thanks in advance...

Turning A Scene Into Its Own .fla
I have a .FLA file that has about 40 scenes in it. I need to break each scene up into an individual movie so I can set a preloader up for it.

Whats the easiest way to take a scene and make it into its own .fla file? I tried highlighting all the layer names and timelines then copy and pasting and that didn't work.

Can someone help me out?

Thanks a lot!

Turning Var On Main TL To
Hi,

I have been succesful in sending var values from HTML to flash the "myMovie.swf?myVar=myValue" way

These vars exist on the main timeline.

Now I converted the stuf on the main timeline to a MC.
Hence, the variables are not set on that level.

So I tried two ways to convert these to:

1.) global vars:

Code:
var myVar;
Object.prototype.myVar;
2.) MC- specific vars:
('a' is the name of the MC instance)

Code:
var myVar;
a.myVar=myVar;
But when I trace() the values, nothing is there.

What am I doing wrong?

Turning Gif Into Button?
I am trying to make an animated gif into a button. When that image is clicked, I want it to go to a certain url. When I try to make it a button, the animation doesnt play, it just shows the first frame. It does link however. How do I make it animate, and do I need to make it into a movie clip?

Turning MC's To Buttons
Hi,

i have a movie clip that uses actionscript to randomly change its opacity (thanks sinfiniti). how would i alter this to use as a button?

thanks

Turning Problems
Alright I am trying to make a ship that can "turn". My current coding is this

onClipEvent (load) {
movespeed=10
}
onClipEvent (enterframe) {
if (Key.isDown(Key.RIGHT)) {
this._rotation += movespeed;
}
if (Key.isDown(Key.LEFT)) {
this._rotation -= movespeed;
}
if (Key.isDown(Key.DOWN)) {
this._y += moveSpeed;
} else if (Key.isDown(Key.UP)) {
this._y -= moveSpeed;
}
}

but all this does is rotate the ship and make it go up and down, I want to make its so the ship can turn and change direction.

For example: If the ship is facing north I want to be able to use up arrow key to make the ship go north. But If I rotate the ship so it faces east I want the up arrow key to make it go east.

Turning Off A Button
Anyone know a way of turning off a Button?

The only thing i can thing of is putting something Hidden above it. I think that will work, havn't tried it yet.

Turning Sounds Off And On
Hello all..I have a problem. I made a button..like a speaker and want the sound on the page to go off..which is fine.. but how do you turn it back on... and off again? It's a character talking..dialog..so if it can stream and be turned off...would be good. I have the dialog in a layer..and the button. What do I do? Thx.

Turning A Key On His Spine
i have a mc. not a shape.
how can i rotate the key on his spine?
i cant add shape hints couse its not a shape
the FreeTransform tool didnt gave me any results

attach please find a screen shot

tnx a lot
me

Page Turning
I have this flash movie that I'm using, but am having problems with!!
http://www.actionscript.org/showMovie.php?id=459
Whenever I add new pages, even with maxPages set to 10 (i want 10 pages), they don't show up. If someone could tell me how to get it working, it would be greatly appreciated!!

Pages Turning?
hey,

does anyone know how this could be accomplished??

http://www.ae.com/aestyle/

it looks like it could be pretty complex, i mean with all the shadows and stuff. plus, the turning pages and all that crap. thanks to anyone who could help me out. ive seen this done a couple times, but this was the fastest loading. thanks.

-jake

Turning Logo
Is it possible to create a turning logo, but only turning horizontally, so the edges of my logo won't make a greater circle then the actual logo??? Is this understandable? Pleez help!!!

Music - Turning On/Off
Hi

Ok i'll try not to confuse anyone with what im gonna ask so here goes.

Ive got a button called 'toogle' on a layer called 'toggle' that allows me to turn some music on and off - the music is in a sepearte movieclip called 'soundtrack' on a layer called 'soundtrack - and it works fine.

However if i turn it off, it begins to play again after one of the movieclips called 'background' within the site loops??

Below is the ActionScript im using on the button to control the music:

on (release) {
if (music == true) {
music = false;
stopAllSounds();
} else if (music == false) {
music = true;
Soundtrack.gotoAndPlay(1);
}
}

I cant understand why it begins to play again after i've turned it off? any help with this would be greatly appreciated!!

also i have a layer named actions that initialises the load sequence to the whole flash movie that includes the script:

music = true

again if anyone can help its appreciated

THANX

Ben.

Turning Pages
Anyone know of a good tute on turning pages of a book forward AND backward??????

Turning Sound Off.
I added a button that turn sound off. However, when I click onto another scene, the new sound comes on. How do you make a master sound button that turn sound off throughout a show?

I know this is probably very simple, but bear with me, I'm a newbie.

Thanks.

Turning Layers Off And On
Can you user actionscript to turn layers off and on or turn the visibitly off and on?

Turning Page
Hello,

I'm woking on a school project and I'm looking for a flash script that can flip your pag.
I mean a script like can be seen on http://innercity.id-t.com/

I can't find it on the tutorlials part. So if sombody can tell me where I can find sutch a script i will me verry happy.

greatz

Turning 86 Into 86,00 In A String... Please Help
Hi,

I'm designing an order form and use the following code to make an outcome of a calculation of "86.5" into "86.50". But how do I adjust that code to make an outcome of "86" into "86,00"? So, with both 00's AND a comma?

var myString = String(((myvar+myvar2+myvar3)*myvar5));
var Temp = myString.charAt(myString.length-2);
if (Temp == ".") {
MyString += "0";
}
perMonth.text = myString;

Thanx a lot!

Product Turning
does anybody know the best way to do a product turning 360 in flash. the product will be a car rim. And do you know the code for the mouse to move left or right depeding where the users mouse is

Turning A Pc Into A Web Server
ello people

Can anyone give me some tips/pointers or maybe a link or two on some info on how I can turn my home computer into a webserver?

I've got htis link:

www.firepages.com.au

which offers a free download package of I think apache and php

All I really want to do is serve a placeholder page and a few images. I'm running win 2k pro, can I run a server on that? I can't really install another o/s at the moment

Thanks all

[edit]what is apache btw?[/edit]

Turning GetCode Off?
Hey,

PHP Code:




this.onEnterFrame = function() {
  c = Key.getCode();
  if(c>=65){
    type(c);
    c = 0;
  }
}






I cant see what's wrong with this code

It seems like that when I press a Key, C keeps getting the same value every time, but I only want to get that value one time when pressed...

Turning Off Sound
This might be posted in the wrong place - sorry!

I'm using Flash.ocx and I'd like to know if there's a way to mute all sounds in a movie using something like TSetProperty?

Many thanks,

peetm

Page Turning
Anyone know a tutorial or place to learn how to animate a "turning page" ??

Turning Movie Into B/W
hi
can i load in an external swf into a parent movie and set it to load color as B/W, regardless if they are saved as color?

i have done this trick to load jpg images, saved as swf files, into a movie for display (a photgrapher's catalog) where they needed to be changed out regularly.

any help would help...


cs

Page Turning
Is there a way in this movie to make the first page turn on on its own when the movie is loaded, then after that you have to turn the pages?

Turning Pages
I've got this fla where you can turn the pages of the book. When the movie loads, instead of it going to the front cover I want it to autimatically go to the first page but I can't figure out which bit of the actionscript to change. Can anyone help me?

What Tha -Where Tha - How Tha - Turning Globe
Hi,

I've got a world globe and I would like to make it spin in an anti clockwise direction, on it axis point.

As I'm a newbie, is there a simple way to do this?

Any help much appreciated, thank you.

Slowly Turning.
Hey freinds.

I want to make an object slowly turn towards a direction. Ive seen many tutes and forum topics about this, but I want to know the best way to do it when associated with an object turning to look at a mouse.

And it doesnt need to be...
code:
_rotation = directiontoturntowards / 2


because that is a smooth rotation... I want more of a limit on turning speed, as opposed to instant snap rotation to look at the mouse.

a code more like more like

code:
if(mouseIsClockwiseOfObject){
_rotation++
}
if(mouseIsCounterClockwiseOfObject){
_rotation--
}


thanks freinds

Turning One Sound Off, But Not The Other
Hi there, I read you can only have one sound object. I have a demo that has a voiceover sound, and background music. I did:

voicey = new Sound();
voicey.attachSound("chapterone");
voicey.start();

And I then I threw the bgmusic in a MC and stop it with the button. SO I can get the background music to stop and the voiceover keeps going. But when I click the off button for the voiceover it stops all the sounds. Make sense? I want to have control over both sounds.

Thanks!

Turning Buttons On And Off
Hello all,
I'm thinking there should be a simple answer to this: I have menu with 10 buttons, each loads a movie. What I want to do is turn off the button action of the movie that is currently loaded and then turn it back on again when another movie is loaded.

For example, if your click on the Portfolio button, the Portfolio.swf loads into level 100. While you are in the Portfolio section you can't click on the Portfolio button and load it again.

Hope this is clear. Thank you in advance

RPF

Turning A Knob...
does anyone know the scripting to turning a round knob left and right, like a door knob or volume control type...?

need it asap..
thx...

Turning Layers On And Off?
I'm using Flash MX.

I have an interface set up so that when a user clicks on different colored blocks around the parameter, different patterns will show up in the middle. I'd like them to click on the button to turn it on, then click on the button again to turn it off.

I don't know how to even start this. Help.

Turning Character Around
I want my character to turn around when he looks left or right. What his actions are:

onClipEvent (load) {
speed = 6;
}
onClipEvent (enterFrame) {
if (key.isdown(key.RIGHT)) {
play();
_rotation = 0;
_x += speed;
}
if (key.isdown(key.LEFT)) {
play();
_rotation = 0;
_x -= speed;

Turning Allsounds Off
hi i have a button i made and some text grouped together and i want to us it to turn an infininate loop sound on or off how do i use the actionscript commads to toggle allsounds on or off and the button itself is in different scenes from the one that the sound starts in how would i do this?

Help On Turning Buttons
Hi, I saw this turning buttons at http://www.sghosting.net/ and would like to do something like that too. I have tried doing it using the free transform tool in Flash MX but it does not look natural. i have attached what I have done. Hope all of you can help. You can email me at meowhaz@yahoo.com.sg Thank you.

Turning Spaces Into +
i have a form that im making in flash that needs all " " entered to be changed to "+"'s. please help

Turning Pages
I am looking for a tutorial or advice on how to animate a book to give the impression of turning pages.

The concept is a photo album that will have different photos on each page, as it's flipped.

If anyone can help, or direct to where I might find help, it would be much appreciated.

Many thanks,

Jenny.

Turning Pages
I am looking for a tutorial or advice on how to animate a book to give the impression of turning pages.

The concept is a photo album that will have different photos on each page, as it's flipped.

If anyone can help, or direct to where I might find help, it would be much appreciated.

Many thanks,

Jenny

Turning Pages
Hi,

Can anyone help me? I would like to make a page turn really smootly, by the cursor dragging the top corner of each page and if You let go the page will fall back into position or if it has been turned over half way it will fall over to the next page. I have seen it done and it looks really effective.

Thanks.

Cb1

Copyright © 2005-08 www.BigResource.com, All rights reserved