_visible Property Resets After Scene Redraws
Hi,
I have a button on a scene. I make it invisible onrelease and goto a different scene. When I come back it is visible again.
What can I do besides not leave the current scene?
ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 03-30-2006, 01:59 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
_visible Property?
In my main timeline i have a movie clip instance called "menu_mc" that consists of 4 buttons that animate. So when i first load the my swf or whatever i want it so 3 of the 4 buttons dont show. I tried going "_root.menu_mc.buttonName._visible=false; but it doesnt seem to work. Am i doing something wrong or what? plz help thanks!!
[F8]using _visible Property
I'm creating a standalone .exe file in Flash. Instead of loading external swf's (the whole file needs to be completely self-contained if possible) I'm trying to use the _visible property to turn a slide show on and off. However, when I assign a "_visible = true" property to a button, the movie only stays visible for one frame then blinks off again.
Complicating this somewhat is that I'm using a scroll pane component. The button which turns on the _visible property is inside the scrolling content, and the slide show plays on a layer in front of the scroll panel. So the end result I'm looking for is being able to make the slide show visible from inside the scrolling content, then turning it off again with a button that is either inside the slide show or a separate mc.
Thanks for any help!
Gerry
_visible Property
I am loading external swfs as my webpages, but when i roll over them and go over a location where i have buttons on my homepage behind the external swf i still get the little hand pointer, but there is no button in the swf just on the homepage(parent swf) behind it. I thought of trying to make the buttons not visible when i load an external swf but that was no help because then they go away before the page is loaded. Is there an alternative to this problem. Please Help!
Help With Text._visible Property
In my movie when I get to a certian key frame I want to make 2 text fields that are in the next frame invisible. But I don't seem to understand the syntax correctly.
Would not do something like this in the keyframe before you get to the frame with the text? I need to control it from one frame ahead.
Code:
evelutionText1._visible=false;
evelutionText2._visible=false;
Problem With _visible Property
i got this as error
**Error** Symbol=Clock, layer=a, frame=1:Line 6: Syntax error.
clock_mc.0_mc._visible =false
this is the code
clock_mc.0_mc._visible =false
0_mc is a movie clip that is inside clock_mc, another clip, WHATS WRONG :S this is driving me crazy
Please Explain _visible Property...
Can someone please explain how the _visible property works and how I can use it with loading external movies into my main.swf...
I have 3 movies loading into my main and I want to hide two of the movies until my main movie is preloaded. I am using a preloader for the main movie but I don't need it for the other two movies...
Any help is appreciated.
Help With _visible Property Onload...
Hi All,
I'm hoping someone can help me with this... I have 2 EXTERNAL movies being loaded with initial load of my site into my main.swf, one of which (movingbg.swf) is being loaded with a preloader. The problem is that my other movie (menubar.swf) is loaded before my first movie. I think I should use the _visible property to solve this and here is what I have so far...
On second.swf I have:
onClipEvent (load)
{
_y;
_y = 0;
this._visible = false;
}
On my preloader located in my main I have:
this.onEnterFrame = function ()
{
var _l1 = _root;
percent = _l1.empty.percent;
if (_l1.empty.percent == 100)
{
_l1.menubar._visible = true;
this._visible = false;
} // end if
};
I am stuck because I have no idea what to use in the first frame of my main movie. I think I am on the right track here... please let me know if I am not.
Any help is greatly appreciated.
Question On The _visible Property
As in, I want to load up a bunch of jpegs, but not display them on the stage.
Is there a way to load jpegs and swfs, into the library, and not even worry about killing their visibility on the stage?
thanks
Property Assignments Etc. Ignored (_visible And SwapDepths Mainly)
Hi!
I have a lot of functions which are called in an onClipEvent(enterFrame) based on a lot of boolean variables. One of the functions sets ._visible = true and .swapDepths(nDepth)
on a clip, but it doesnt happen. if I try to trace the ._visible property, it's true, but in the debugger it's still false. the clip doesn't show either. I even tried to call ONLY .swapDepths in one frame, but this results in some random behavior.
Seems like only 60% of my new settings is applied, but all of the code is correct. (believe me, I'm not green)
Is there some rules not described by Macromedia for those properties and methods? Like "this action must be executed in a frame for iteself".
I haven't found anything in the documentation.
please help!!
bonghead
_visible Property Not Displaying Correctly
I have a problem with programming a simple Memeroy game, where you have to find pairs. Only two cards can be revealed at a time. If it is a pair they will stay visible, if not they should be turned again after waiting some seconds. The pictures are the underlaying layer, the backside of the cards are in movieclips of which the visible property is changed and invisible buttons on top trigger the thing.
The SWF can be viewed at http://www.mhofele.de/Memory3.swf
The code should be fine, because all the trace prompts are correct, but somehow I can't see the visibility changing on the second cards. Can someone see what is wrong with it?
Here's the code of the buttons. (There is only a global variable in the framescript, no other scripts)
Code:
on (release) {
trace ("Beginn");
if (A2._visible == true) { // this script is only doing something, when card was not revealed
trace ("card is not yet revealed");
// 1. Click
if (aufgedeckt < 1) {
trace ("1. Click");
A2._visible = false; // reveal card
aufgedeckt++;
trace ("Variable 'aufgedeckt' was increased by 1");
k = A2;
trace ("movieclip is saved in global Variable k");
trace ("k = " + k);
}
// 2. Klick
else {
trace ("2. Click");
trace ("reveal card");
setProperty("A2", _visible, false); // reveal card
trace (" is partnercard already revealed?");
if (D2._visible == false) { // if partnercard (pair) is revealed
aufgedeckt = 0;
trace (" Card was already revealed, var 'aufgedeckt' is set to 0");
}
else { //if 1. Click was not the partnercard: wait and then turn the cards
//Timer
trace ("Timer for waiting: wait 3 seconds");
x = getTimer()/1000;
y = x+3;
while ((getTimer()/1000) < y){
trace ("Timerstart:" +x +"Timer plus 3 seconds" +y);
setProperty("A2", _visible, false); // Karte aufdecken
}
trace ("Timer finished, now turn cards again");
trace ("turn this card");
setProperty("A2", _visible, true);
trace ("now turn the card that was revealed first");
trace (" What is in k? " + k);
setProperty ("k", _visible, true);
aufgedeckt = 0;
trace ("cards are turned and 'aufgedeckt' was set back to 0");
}
}
}
}
[Edited by MoniH on 05-25-2002 at 05:28 AM]
Looping And Setting _visible Property
Hi everyone, I've been a lurker for awhile, but now I'm stuck myself.
I'm basically trying to load a given number of .swfs into new mc's and then turn the _visible = false but it's not working. I think I'm reference the mc's correctly since the positioning is working...here's the code. And it is getting in the if..then statemement. THe movies are loading and positioning, just not hiding. Thanks!
PHP Code:
for (x= 1; x <= maxSlide; x++) {
var sName = "slide" + x;
this.createEmptyMovieClip(sName,x+1);
this[sName]._x=0;
this[sName]._y=50;
var sPath = "content/" + sName + ".swf";
trace (sName + ", " + sPath);
if (x>1) {
trace ("in loop, " + sName);
this[sName]._visible = false;
}
loadMovie(sPath,sName);
}
CreateEmptyMovieClip() And Setting _visible Property
I am attempting to create a series of empty MCs, load an external .jpg into each created MC and then make the MCs invisible so I can have my way with them later in the file.
My code is as follows:
Code:
var slideCount = 1;
while (slideCount<=6) {
createEmptyMovieClip("slide"+slideCount, slideCount);
loadMovie("img/img"+slideCount+".jpg", "slide"+slideCount);
setProperty("slide"+slideCount, _visible, false);
slideCount++;
}
The creating and the loading are working fine. But it seems it is not possible for me to set the _visible property of the created movie to false. Strangely, any other property I attempt to manipulate this same way (_alpha, _x, _xscale, everything else I've tried) works. But not _visible. I've even tried using direct references in later frames to make these created clips invisible and it's not working.
What am I missing here? So baffled.
._visible Property True...only For Several Seconds?
Hi everyone,
I'm wondering if there is a way to make a movie clip only visible for several seconds. Instead of saying
Code:
this._visible = true;
Is there a way that "true" could be replaced with the amount of seconds somehow?
Thanks for any advice here.
Brian
Actions Frame Redraws Very Slowly
When I move a window in flash 9.0 it takes ages to redraw. Even when I use the keyboard to scroll throgh code-lines it redraws so slowly that it is actually useless.
Any hints how to getting around this problem? (I'm thinking about reinstalling the old version).
Edited: 12/02/2007 at 08:42:53 AM by andersduus
Does "_visible" Property Really Invisible?
A simple Question!
I have a movieClip with a lot of tweens... When I set the "_visible" property to FALSE, does my movieClip still running for my CPU??? Does my CPU still calculate the tweens of my Mc???
Thank's for lightning me???
???
Timer Resets?
hey people im having a bit of trouble on my movie.
i have a timer that goes like this
var startTime = getTimer();
this.onEnterFrame = function() {
var currentTime = getTimer();
var elapsedTime = Math.round((currentTime-startTime)/1000);
var remain = 60-elapsedTime;
timeRemain.text = remain;
if (remain<1) {
_level0.gotoandstop(433);
delete this.onEnterFrame;
}
};
and this will count down whilst penalty shots are taken against you these are done randomly with the
r = Math.round(Math.random()*10+1);
gotoAndPlay(r);
which is in the first frame of the scene then in the next 10 frames i have
gotoAndPlay("shot1");
etc for each of the shots
but every now and then the timer jumps back to the beginning and i have no idea why this is happening?
also there is one more problem i have a score box which tells you how many shots you have saved and you need to reach a defined amount before you go to the next level, all works well except from when you replay the game the orignal score is still there. is there some code to reset the score? in the text box?
Variable Resets To 1?
Code:
var receiver:LoadVars = new LoadVars();
receiver.onLoad = function(ok:Boolean):Void {
if (ok) {
_root.ttl = Number(receiver.total)+1;
for (n=0; n<_root.ttl; n++) {
_root["id_"+n] = receiver["id_"+n];
trace(_root["tn"+n]=receiver["tn"+n]);
trace(_root["sold"+n]=receiver["sold"+n]);
trace(_root["listing"+n]=receiver["listing"+n]);
trace(_root["description"+n]=receiver["description"+n]);
trace(_root["price"+n]=receiver["price"+n]);
trace(_root["address"+n]=receiver["address"+n]);
// Actions
}
} else {
_root.gotoAndStop(3);
}
if (_root.cpage=1 ) {
#include "1.as"
} else if (_root.cpage=2) {
#include "2.as"
}
};
receiver.load(_root.connect1);
stop();
In the first frame i have
Code:
_root.cpage=1
and a button that changes cpage to 2, goes to frame 4, and frame 4 goes back to frame 2 (the one with the actions)
Whenever the frame gets to frame 2 _root.cpage gets reser to 1, if i change my if statement it gets reset to something else, so i think the if statement on the bottom is the problem....
Can anyone help me correct this error?
Clock Resets To 0 At 12:00.
Hi there, I borrowed this script for a digital clock and calender. Everything works great except for one hang up. At 12:00 AM and possibly PM the clock resets to 0:00 (1 - 11 work just fine, and I'm purposely leaving off the 0 in the single digit hours).
How can I corrected this? Thanks and I appreciate any feedback.
var todayate = new Date();
days = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"];
months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
var hrs:String = ((today.getHours() % 12) < 10 ? "0" : "") + (today.getHours() % 12).toString();
var mins:String = (today.getMinutes() < 10 ? "0" : "") + today.getMinutes().toString();
var day:String = days[today.getDay() - 1];
var date = months[today.getMonth()] + " " + today.getDate().toString() + ", " + today.getFullYear().toString()
trace(hrs + ":" + mins);
trace(day);
trace(date);
Volume Controller Resets.
We have a controller (slider) to control the volume of sound in a movie. Since the movie has many scenes, each time the movie goes to another scene the volume control gets reset to the highest value.
Is there any method to avoid this and retain the sound setting from one scene to another ? Or is there another script which does that?
SetProperty Resets At End Of Animation
I'm trying to make a clip embeded in a clip visible. It is initially set as invisible. (_alpha = 0) It sets all right , but at the end of the animation it sets back to the default setting. I force the timeline to stop on the last frame, so the code isn't running again to reset it... (or is it)... I'm not sure where to go with this... Please Help
It seems to have something to do with the masking... when the masks come off then things work... please help
Derek
[Edited by dgavey on 09-12-2002 at 01:10 AM]
Switching Focus Resets MC?
Hi Guys
I am using the following code to try and re-select some text in a dynamic text area after a button in a MC is clicked. The button sends its MC to the next frame where the code is located:
Selection.setFocus("_root.templates.mc.statusbar") ;
Selection.setSelection(startSel, endSel);
When the code runs it sends the MC to frame 1
Anyone know why changing trhe focus has this effect?
Cheers
Ol
Masked Movieclip Resets Itself
Hi having a major flash crisis, with a deadline too soon,
In the main timeline I have a mask comprised of numerous keyframes. Within the mask is a movieclip. I have I pause function which holds half-way through the mask animation - when the pause has run it's course it plays the main timeline. The problem is that it also resets the masked movieclip (i.e. plays it from frame 1 again). It can only be a bug... has anyone come across this, or now of a fix or work around?
Please anyone...
SWFAddress Resets My Whole Application.
whenever I click on an anchor that targets a position on the same page like this:
HTML Code:
<a href="#faq_stones">How do I change stones?</a>
it resets my entire appication. so a person can set everything how they want, then click on that and it resets....
Note: they are not leaving the page...just being scrolled down.
is there a way to prevent this or do I need to remove all this help links?
Thanks!!
Masking Clip, Then Resets?
I've encountered an interesting problem....
I've created a MovieClip for my background. This MovieClip is AS'd to loop an Image in the background from left to right. Like a cloud scene. This MovieClip contains 10frames and the AS is on the 10th frame where it is also stopped.
On the main timeline I masked this MovieClip. The weird thing is that when I Motion Tween this MovieClip... it resets! Meaning it didn't stay on the 10th frame, but it jumped back to frame 1. Now, I know it's a Masking problem because if I removed my Mask, it doesn't Reset when it tweens.
Anyone encountered this problem before?
Flash Resets On Postback
I have an ASP.NET page with a flash map on it. When the user clicks an area on the flash map it loads the area into a listbox and marks the area on the map with a star. The issue is that on postback the flash resets and I lose my star. Does anybody have fix for this. Please advise. Thanks.
Button Resets When Masking
Hello!
I have one problem. I believe that it is easy to solve it I just can't figure out how..
So I have a button with on roll over, roll out functions and down state in my movie clip masked. When button is unmasked and pressed it shows down state. So far so good. But when mask hides this button and shows again it comes up in normal state so you can roll over and roll out again...
Well, maybe my english is not so clear but I've created a perfect example to show what I am talking about
Any help or hints much appreciated. Thanks in advace
-C
Rotation Resets After -180 Degrees?
I've got a circular object that I need to rotate to various preset rotations. All negative values. (although it seems to behave the same way with positive values as well). The problem is that I would like to ease the rotations, and whenever the rotation value for the movieclip goes below -180 it resets to a positive value! (i.e. -193 instantly becomes 167) This creates an infinitely spinning movieclip as it never reaches its intended rotation!
Does anyone know of any work arounds around this? I tried putting in this line of code:
ActionScript Code:
//spinDiff is the amount of rotation that the movieclip is about to rotate//spinFinal is the endpoint rotation value, where it should stop spinningif(movieClip.rotation+spinDiff<-180){ spinFinal = 360+spinDiff}
This code sort of works, but whenever it crosses over it does over 180 degrees of rotation to get to the final value, but at least it stops spinning.
I can't come up with a solution!
Any help or suggestions are appreciated!
Thanks,
iLan
A Clock Which Stops And Resets...
Ok, I am just putting the finishing touches to a platform ive been developing for the last while.
I have a game with 3 levels. I also have a clock which runs once the first level is executed. However, once the game start the clock runs continuously. I have the time it take to complete the level displaying in a dialog box along with a continue button.
However this is only effective for the first level. As it'll display the time it took to complete the first level in the dialog box however in the background the clock continues to run. Ideally once the first level is over I'd like the clock to stop and reset itself for the next level.
I'll display some of my code so you can see what i currently have: -
Code:
// Calculates the Time
public function clockTime(event:Event) {
// Milliseconds passed
var timePassed:int = getTimer()-startTime;
// Computes minutes and seconds
var seconds:int = Math.floor(timePassed/1000);
var minutes:int = Math.floor(seconds/60);
seconds -= minutes*60;
// Converts clock to string
var timeString:String = minutes+":"+String(seconds+100).substr(1,2);
// Display in text field
timeDisplay.text = timeString;
}
Thats basically my clock function. I also have a start level function (shown below), i thought maybe if i included clockTime(); into the function below then it would run the clock from the start every level. However whenever i put in that code i get an Error of "Incorrect number of arguments. Expected 1".
Code:
// Start Level
public function startGameLevel() {
// Create Characters
createKid();
addEnemies();
addSpikes();
// Examine level and note all objects
examineLevel();
// Add Event Listeners
this.addEventListener(Event.ENTER_FRAME,gameLoop);
stage.addEventListener(KeyboardEvent.KEY_DOWN,keyDownFunction);
stage.addEventListener(KeyboardEvent.KEY_UP,keyUpFunction);
stage.addEventListener(Event.ENTER_FRAME, clockTime);
// Game State
gameMode = "play";
addScore(0);
showLives();
}
If anyone thinks they can help i would very much appreciate it. I think i have the basics there but i'm just missing that one sections of the jigsaw.
Thanks again.
Kindest Regards
Tom
Delaying My Navigation Before It Resets To Default
I am creating a simple menu system and when the user scrolls over an item a thin bar slides across to underneath the item, but i want the bar to remain there for a couple of seconds before returning to the default item(the page they are currently at).
This is because I want the bar to continue from where it is on to another item if they move on in the menu system. The problem is I want to set the focus of the menu each time the user rolls over an item and when the focus runs out I want it to return to the default setting.
I have tried using setInterval() and find this function completely useless...
[F8] Paypal Cart Resets With New Frame
Hello, someone on this site helped me set up a simple Paypal cart. It works fine when all my items are contained within the same frame. However, if I have several frames which each have their own items for purchase, the cart gets reset each time the playhead advances to that new frame. Here is the code:
Code:
var lvSend:LoadVars = new LoadVars();//do not change
lvSend.business = "art@michaelphipps.net"; //your paypal email address here
lvSend.currency_code = "USD"; //the currency you would like to use
//define items, their prices, quantity in basket and there associated movieclips
var aItem:Array = new Array();
aItem["PGA Poster"] = {instance:mcPgaposter, price:12, quantity:0};
aItem["PGA Print"] = {instance:mcPgaprint, price:35, quantity:0};
aItem["PGA Shirt Med"] = {instance:mcPgamed, price:20, quantity:0};
aItem["PGA Shirt Lg"] = {instance:mcPgalarge, price:20, quantity:0};
aItem["PGA Shirt XL"] = {instance:mcPgaxlarge, price:20, quantity:0};
aItem["PGA Shirt XXL"] = {instance:mcPgaxxlarge, price:20, quantity:0};
//-----------------------DO NOT CHANGE UNLESS FAMILIAR WITH ACTIONSCRIPT--------------------//
var totalPrice:Number;
for (var i in aItem) {
var currentProduct:String = i;
aItem[i].instance.id = currentProduct;
aItem[i].instance.onRelease = function() {
//it has been added to basket so increase quantity in basket
aItem[this.id].quantity++;
//update datagrid
updateDatagrid();
};
}
//--------------------------------------- functions ----------------------------------------------//
function updateDatagrid():Void{
totalPrice = 0;
var aBasket:Array = new Array();
for (var i in aItem) {
if(aItem[i].quantity > 0 ){
aBasket.push({Product: aItem[i].instance.id, Quantity: aItem[i].quantity, Price: aItem[i].price * aItem[i].quantity });
totalPrice += aItem[i].quantity * aItem[i].price;
}
}
basketInfo.dataProvider = aBasket;
basketInfo.vScrollPolicy = "auto";
tTotal.text = totalPrice;
}
What do i do???
PS- there is also this code to send the info to Paypal but I didn't include it to increase legibility. Here it is just in case:
Code:
mcPaypal.onRelease = function():Void{
//send variables to paypal
//CONSTANTS
lvSend.cmd = "_cart";
lvSend.upload = "1";
var j:Number = 1;
for (var i in aItem) {
if(aItem[i].quantity > 0){
lvSend["item_name_"+j] = aItem[i].instance.id;
lvSend["amount_"+j] = aItem[i].price;
lvSend["quantity_"+j] = aItem[i].quantity;
j++;
}
}
lvSend.send("https://www.paypal.com/cgi-bin/webscr", "_self", "POST");
}
When A Button Is Pressed The 2nd Time It Resets
Let me try explain what I have and what i want it to do.
I have a button (a) that when you press it a box expands then in the box it has some text with button (b) in it, if you press buttons button (b) it plays a movie clip (which expands a white box)
the white box is still just sitting there and if I go back and press button (a) and then press (b) rather than replaying the movie clip of the white box expanding it just resets it back to if you havent pushed any buttons
then if I go and do it all again it plays as it should.
how do i get it to replay the clip
TextFormat Resets When Through Multiples Frames
Hello,
i have a color picker that i use to change the color of a text within a movie clip button.
The movie clip button has 2 frames. The first one is "roll out" and the other is "roll over".
I change the color of an "dynamic text" in the first frame, move the mouse over and when the first frame comes back again the format resets.
How can i solve this?
Thanks.
Volume Slider Resets When I Go To New Sceen.
This is how i have my sound set up. It works fine and stays when changing sceens. However, when i navigate to a new sceen the volume slider goes back to 100%. If i go to another frame marker in the same sceen it doen't reset. Only when i go to a new sceen. Has anyone run into this problem?
//To import streaming sound
var dynamic_sound:Sound= new Sound();
dynamic_sound.loadSound("http://www.krankd.com/orange.mp3",true);
dynamic_sound.onLoad = function() {
dynamic_sound.start(0,1);
}
play_btn.onRelease = function() {
dynamic_sound.start(0,1);
}
stop_btn.onRelease = function() {
dynamic_sound.stop();
}
//the code applied to symbol volume slider
top = vol._y;
left = vol._x;
right = vol._x;
bottom = vol._y+100;
level = 100;
//
vol.onPress = function() {
startDrag("vol", false, left, top, right, bottom);
dragging = true;
};
vol.onRelease = function() {
stopDrag();
dragging = false;
};
vol.onReleaseOutside = function() {
dragging = false;
};
//
this.onEnterFrame = function() {
if (dragging) {
level = 100-(vol._y-top);
} else {
if (level>100) {
level = 100;
} else if (level<0) {
level = 0;
} else {
vol._y = -level+100+top;
}
}
_root.dynamic_sound.setVolume(level);
};
Input Text Resets When Looped
how would i achieve that the text i entered in the input textbox in swf remained the same after the loop and wouldn't reset itself?
thanks
Button Doesn't Do As It Is Told And Resets
Hello Kirupa Forum,
I have attached the following to a button:
on (press) {
gotoAndPlay(1);
}
or
on (release) {
gotoAndPlay(1);
}
It is meant to take the user back to frame one where they can play a game again. The only problem is that it doesn't work. When you click the button it goes to the frame but quickly resets back to the frame where the button is located. I have put stop(); code where relevant.
I am unsure on what to do. I just want the user to be able to go to different frames but the button keeps reseting to the frame where it is originally located.
Any help? Thanks in advance!
Mp3Player-volume Resets For Each Track
Hi folks
I have successfully taken the mp3Player tut and it works beautifully. Great tutorial by the way.
I am having an issue I do not know how to fix. I was hoping someone could assist me.
If I turn the sound off on any track, when the track completes and the next track loads, the next track loads with the volume on again. I realize that users should just pause the track instead of relying on volume to kill the sound, but try explaining that to someone who doesnt care. LOL !
I need the volume to stay off regardless of the next track loading.
Thanks in advance to anyone who has time to help with this issue.
Menu Item Resets From Selected State?
Hi,
posted 24 hours ago, updating in hopes of getting some help.
Flash version is MX
when an item is selected on my menu it slides into position on the far right (first position). When selected it goes to a highlighted state.
It should stay in this state on the far right until a new item is selected and starts to slide right.
For some reason the item is reseting out of the highlighted selected state as it slides to the right.
Not always and not always in the same spot.
It is a bit hard to explain, so I have attached the .fla file. I have commented it as much possible. It is stripped down to just contain the menu
Please take a look. Just click menu items to th eleft a few times and you will see the bug happen, items will jump back to frame one.
Mark
P.S. I have been doing a little reading, should I be using "Button.trackAsMenu" in some way to do this?
Movieclip Resets On Scripted Alpha Fadeout
I'm using the code below on a button instance to trigger an alpha fade of a movieclip (fullcontainer) which holds an external swf (images.swf). The swf is a continuous loop of a few images, which functions as a sort of base page for the website. I want to fade out fullcontainer completely, remove it, then load some other swfs into leftcontainer and rightcontainer.
It is almost working perfectly, but when the alpha change starts to happen, the timeline of images.swf 'resets' itself and goes back to frame one, and then the fullcontainer mc fades out.
What I need is for the timeline of images.swf to either:
1. Pause at the current frame, then fade out.
2. Continue to play while fading out.
Doesn't bother me either way, but it looks terrible when it skips back to the beginning like that. Has anyone come across this before? I've done the obligatory searching etc, can't seem to find an answer.
Code:
on (release)
{
if (_root.currMovie == "images")
{
_root.fullcontainer.onEnterFrame = function ()
{
if (_root.fullcontainer._alpha>0)
{
_root.fullcontainer._alpha -= 5;
}
else
{
_root.fullcontainer.removeMovieClip();
_root.createEmptyMovieClip("fullcontainer", 20);
_root.fullcontainer._x = 0;
_root.fullcontainer._y = 80;
_root.currMovie = "news/practice";
_root.rightcontainer.loadMovie("news/practice.swf");
delete _root.fullcontainer.onEnterFrame
}
}
}
etc....
[CS3] Dynamic Text Resets To Default With Mask
ok so i have some dynamic text that is loaded externally, the dyn-text is mask, the fonts are embeded so i can see them, this works fine but...
the text is part of a menu that can be expanded, when the menu is expanded the mask width is increased to cover the extra text previously hidden. the problem is that when the shapetween on the mask runs it resets the dynamic text to the default (in this case 8888 used as filler). the dynamic text frame remains constant throughout the tween (i.e. just one key frame) yet the font changes....
any help will be appriciated
Movieclip Resets On Scripted Alpha Fadeout
I'm using the code below on a button instance to trigger an alpha fade of a movieclip (fullcontainer) which holds an external swf (images.swf). The swf is a continuous loop of a few images, which functions as a sort of base page for the website. I want to fade out fullcontainer completely, remove it, then load some other swfs into leftcontainer and rightcontainer.
It is almost working perfectly, but when the alpha change starts to happen, the timeline of images.swf 'resets' itself and goes back to frame one, and then the fullcontainer mc fades out.
What I need is for the timeline of images.swf to either:
1. Pause at the current frame, then fade out.
2. Continue to play while fading out.
Doesn't bother me either way, but it looks terrible when it skips back to the beginning like that. Has anyone come across this before? I've done the obligatory searching etc, can't seem to find an answer.
Code:
on (release)
{
if (_root.currMovie == "images")
{
_root.fullcontainer.onEnterFrame = function ()
{
if (_root.fullcontainer._alpha>0)
{
_root.fullcontainer._alpha -= 5;
}
else
{
_root.fullcontainer.removeMovieClip();
_root.createEmptyMovieClip("fullcontainer", 20);
_root.fullcontainer._x = 0;
_root.fullcontainer._y = 80;
_root.currMovie = "news/practice";
_root.rightcontainer.loadMovie("news/practice.swf");
delete _root.fullcontainer.onEnterFrame
}
}
}
etc....
Movieclip Resets On Scripted Alpha Fadeout
I'm using the code below on a button instance to trigger an alpha fade of a movieclip (fullcontainer) which holds an external swf (images.swf). The swf is a continuous loop of a few images, which functions as a sort of base page for the website. I want to fade out fullcontainer completely, remove it, then load some other swfs into leftcontainer and rightcontainer.
It is almost working perfectly, but when the alpha change starts to happen, the timeline of images.swf 'resets' itself and goes back to frame one, and then the fullcontainer mc fades out.
What I need is for the timeline of images.swf to either:
1. Pause at the current frame, then fade out.
2. Continue to play while fading out.
Doesn't bother me either way, but it looks terrible when it skips back to the beginning like that. Has anyone come across this before? I've done the obligatory searching etc, can't seem to find an answer.
Code:
on (release)
{
if (_root.currMovie == "images")
{
_root.fullcontainer.onEnterFrame = function ()
{
if (_root.fullcontainer._alpha>0)
{
_root.fullcontainer._alpha -= 5;
}
else
{
_root.fullcontainer.removeMovieClip();
_root.createEmptyMovieClip("fullcontainer", 20);
_root.fullcontainer._x = 0;
_root.fullcontainer._y = 80;
_root.currMovie = "news/practice";
_root.rightcontainer.loadMovie("news/practice.swf");
delete _root.fullcontainer.onEnterFrame
}
}
}
etc....
Masked MC Resets, At Mask's Animation Next Keyframe. Bug?
Hello people!
I am using Flash MX 2004 and I have encountered the following problem:
I use a movieclip object (called picHolder) to load external images with loadMovie method. (the loadmovie code is at _root level frame, and the picHolder is contained in a movieclip) The picHolder is masked by a shape tween. When the shape tween reaches its next keyframe (any keyframe), the picHolder "looses" the loaded image (it reacts as if it resets or something...).
If I replace the shape tween I am using as animated mask, with a movieclip that contains the mask animation, then buttons contained in movieclips masked by it, don't work at all (they behave as stopped movieclips).
What is wrong? Do I miss something?!?!?!
Get Property Visibility Set Property Visibilty
I am trying to work out some navigation on a site to make it more user friendly.
I have a number of buttons which when clicked set their correspoding graphic to visible and all the other relevant graphics to invisible.
This is so I can get the graphics to appear in the same place but only one visible at any time so no overlap.
What I already have is a rollover so that when the user rolls over the buttons the corresponding graphic will appear. Then dissappear on rollout. And the script to place my graphic in the right place and make it visible. Here is the script.
on (rollOver) {
setProperty("_root.drag0", _visible, "1");
setProperty("_root.drag1", _visible, "0");
setProperty("_root.drag2", _visible, "0");
}
on (rollOut) {
setProperty("_root.drag0", _visible, "0");
setProperty("_root.drag1", _visible, "0");
setProperty("_root.drag2", _visible, "0");
}
on (release) {
setProperty ("_root.drag0", _x , 323.4);
setProperty ("_root.drag0", _y , 360);
setProperty("_root.drag0", _visible, "1");
}
The bit I can't work out is how to get the graphic which has last been clicked and locked visible (rather than temporaly visible on rollover/out)to revert to being visible on the rollout of the other buttons.
I think I need to use the get property and set property but can't quite work out how to link the two so that it checks which graphic is visible before the rollover on a different button, makes it invisble on the rollover and reverts it back to being visible on the roll out.
Sorry That was long finding it hard to explain.
Thanks for any help you can offer. I am using flash mx 6.0.
Preloder ScaleX Property And X Property
Hi!
within the loader listener's progressevent I had my preloader mc update the scaleX property and works fine, thus, it moves and scales just like a preloader does until it reaches 100. My only concern is when scaleX updates the preloader mc 'x' location seems to be moving as well making the preloader clip looked liked it scales on both sides (both ends of the line). As i examined the preloader mc 'x' property it stays the same all throughout. This is weird.
anyone?
thank you in advance.
_visible On MC's
Help... Here's the scenario:
I have 8 swf's loading into seperate, blank (holder) MC's. What I want is for the MC's to be invisible until a button is pressed, then the 1 MC corresponding to
the button becomes visible. When a second button is pressed another becomes visible and the rest go invisible. I don't know how to explain it properly, but you
should get the drift. The code on each button may look something like this:
on (release )
_root.MCone (_visible=true)
_root.MCtwo (_visible=false)
_root.MCthree (_visible=false)
_root.MCfour (_visible=false)
_root.MCfive (_visible=false)
_root.MCsix (_visible=false)
_root.MCseven (_visible=false)
_root.MCeight (_visible=false)
The code on each MC will be maybe like this:
onClipEvent (load)
(visible=false)
The reason for doing this is so that I can load all the clips while the intro is running to increase the smooth running of the site. Please could someone help me
with the code for the visibility on the clips AND the buttons...
Many thanks for any help given...
_visible
Hey guys, thanks for all the help so far, you have been very helpful, and i have learned a lot from it.
I have another prob here
I have made this spacegame where i have enemies coming agains me, and when i crash, its game over (hit test)
but when i am at the game over screen the enemies keeps coming over the screen. I want them to dissapear when i crash and its game over.
the game are on keyframe 1 and the gameover is on keyframe 3.. Everthing else dissapear (background, points, etc..) but not the enemyes (
Can anybody help me with this ?
thnx
Synthieboy !
|