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




_visibility = 0 Affects Content Of Textfields?



I have a movieclip that can be hidden and then shown again by user interaction.

Inside the clip is a dynamic textfield. This field has a default value that is inserted during designtime, but this value sometimes will be replaced by a string from a database. But when the movieclip's visibility is switched off and then on again, the original value appears. (If I look at the variable of the textfield, it has the correct new value, but that is not shown.)

Thanks for any help.



ActionScript.org Forums > Flash General Questions > Other Flash General Questions
Posted on: 05-30-2005, 12:07 PM


View Complete Forum Thread with Replies

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

_visibility And GotoAndPlay
I have:
frame1[key frame]--->frame4 : intro_btn._visible = true;
frame5[key frame]---> fram30: intro_btn._visible = false;

My simple question is: why when the timeline runs by itself, my button visibility changes ok, but if I use gotoAndPlay(6), my button visibility is still "true," instead of "false."

I know f6 is not a key frame, but on the timeline, the actionscript goes from 1-4, and 5-30, so the actions should be effective for all those frames? Am I right?

What else should I do in order to use gotoAndPlay(6) as above besides turning 6 into a keyframe?

_visibility = False;
Sorry for my lack of actionscript skills, but is there something I am doing wrong here?


Code:
if (this.textbox.text == "") {
this.textbox.text._visible = false;
}
I simply want the text box to not appear if it is empty.
I have the text dynamically populated from a text file. I know it works because I can see the text in the textbox if I put text in the variable on the text file.

When I remove the text for the variable from the textfile, the textfield appears but is empty like it should be.

I'd like to revove the text box completely.

Dynamically Assign _visibility Variable From XML To Button..
Thank for reading this. Basically I am trying to dynamically assign the _visibility property of a button. The property will be loaded from XML. So far this is how I am approaching it. link2 is the instance name of the button and _root.visible2 is he variable that I have brought in from the XML in frame one. It will be either true or false depending on what the XML contains. Is there something wrong with my syntax? Or am I approaching this the wrong way?:


Code:
setProperty(_root.link2, _visible, _root.visible2);

(as I see it when flash has all the variables loaded in it should be this:
setProperty(_root.link2, _visible, true);
I am trying to set my flash movie up so I can turn off buttons in the XML if I want to. I already checked my XML and it's loading variables in for everything else no problem so it's not a connection problem.

Thanks for any help offered.

Setting A Movieclip's _visibility Property To False
Is it not possible to set a movieclip into which a swf was loaded dynamichally to false and make in invisible?

I spent the last three hours trying to set a bunch of movie clips invisible into which I loaded SWfs and it won't work. I am going cocoo here.

After Affects - Flash 8
I have taken a full 30 slide power point and with using after affects rebuilt the entire show. Now I have saved each silde as an flv. I need to put it all back together using flash. I am new to flash and have really no clue on how to do this. Can someone help me. Please.

Thanks ahead of time.

there is also audio embeded into the after effects that why we took it out of power point. Needed real sounding audio.

Flash And After Affects
is there a way to save or publish a swf file so it imports into after affects. swf is one of the choices for importing, but then is says invalid media?

Color Affects
Hi,

I was wondering if you look at this website on the border ,

http://www.victoriaspa.com/

how have the given metalic touch to the color. Alo how are they producing this affect like there is light in the center of border. I tried have tween motion between two graphis by giving aplha to one, but ti did not produced same results......

thanks


Color Affects
Hi,

I was wondering if you look at this website on the border ,

http://www.victoriaspa.com/

how have the given metalic touch to the color. Alo how are they producing this affect like there is light in the center of border. I tried have tween motion between two graphis by giving aplha to one, but ti did not produced same results......

thanks

Can One Click Affects Multiple MCs?
i was wondering if it's possible to have something like:

on(click){
_root.*.gotoAndPlay(1);
}

so that affects all MCs at that level of the hierachy?

Anyone managed this b4?

Button Affects Movieclip HOW?
Ok, i am just starting this, and my lack of knowledge is extremely frustrating (for both me and anyone working with me) so please bare with.

Ok, here's the ?. Someone showe me how to make two separate buttons affect a movie clip. (i.e. you click on one button and the movie clip says "hello" you click the other button and the movie clip says "goodbye). I KNOW this is extremely easy, but i cannot get it to work. Here's where i'm at now: Both my buttons are made, just fine. My movie clip is made: 1 frame says "hello" the other says "goodbye". Now here's where i get lost. I seem to remember my tutor putting a "stop" action in the Movie Clip. Next we brought the two buttons and the movie clip into the scene. I rename the Movie clip instance to "Movie". Now what script do i use and on what to get the buttons to affect the clip?!?!? I tried "on (release) gotoandPlay (1)" on button #1 to get the clip to say hello and "on(release) gotoandPlay(2)" on button #2 to get it to say goodbye. Long question short: how do i make the buttons affect ONLY the movie clip (b/c eventually i want to have the buttons themselves moving across the screne) Please help this horribly pathetic beginner!!!!!

Music Affects Tweening
I'm making a movie in flash at 35 frames per second, and for about the first half the tweens are smooth. However, sometime around the middle of the movie, the tweens become a lot more jagged. I tried removing the music and this solved the problem, but I'd like to find a way to keep the music in while having the movie work fine.

By the way, I'm putting my music in the movie by creating invisible movie clips with nothing but streaming audio in them, if that information's helpful.

Rollover In One Movie Affects Another?
I'm trying to mimic an HTML/JS function where you can roll over a button and swap another image in addition to the button. My buttons are in a narrow section on the left and the text window I want to swap is wider. To make the whole thing one movie would be kind of cumbersome to the design.

Any help?

http://www.brazosportinfo.com/_webwo...am/darker.html

Score Affects Speed
ok, I have a score and a speed. I want it so that for every 50 points in the score, the speed increases by .05. So if you have a score of 176, speed would increase by 3 x .05. Score can also go down if score then goes down to let's say 94, speed is 2 x .05. I want it to go on forever and have no idea how.
(Using flash 8)

Btn Suffix Affects Behavior?
Hi gang! I use some nifty button code that came from Billy T, Red Penguin and CyanBlue and it really works well. Now I just noticed that in MX2004, I can comment out the secondary behavior I have (onRollOver, onRollOut, onPress) and it still does that behavior.

I don't remember that being the case in just MX. I presume it's because the buttons are named with the suffix _btn and that MX2004 reads that.

Any comments?


ActionScript Code:
Button_Names = ["about", "member", "reserve", "games", "rates", "sphere", "gamesystem", "team", "contact", "food", "corporate", "research", "privacy", "legal", "splash"];
for (i=0; i<=Button_Names.length-1; i++) {
    item = Button_Names[i];
    _root[item+"_btn"].mov = item;
    _root[item+"_btn"].num = i;
    _root[item+"_btn"].onRelease = function() {
        if (nextMovie != this.mov+".swf") {
            nextMovie = this.mov+".swf";
            _level2.gotoAndPlay("outro");
            //trace (nextMovie);
            //play transition
            _root.status_mc.gotoAndStop("load");
            _root[Button_Names[this.num]+"_btn"].gotoAndStop("_disabled");
            //send button to off state
            _root[Button_Names[this.num]+"_btn"].enabled = 0;
            //make button null
            Enable_Buttons(this.mov);
            //call function (below)
            _root.preloaderBox._visible = true;
        }
    };
}
//end movieclip button variables and array
//
//start secondary movieclip button behavior
//_root[item+"_btn"].onRollOver = function() {
//  this[item+"_btn"].gotoAndStop("_over");
//  _root.status_mc.gotoAndStop("red");
//};
//_root[item+"_btn"].onRollOut = function() {
//  this[item+"_btn"].gotoAndStop("_up");
//  _root.status_mc.gotoAndStop("green");
//};
//_root[item+"_btn"].onPress = function() {
//  this[item+"_btn"].gotoAndStop("_down");
//  _root.status_mc.gotoAndStop("red");
//};
//end secondary movieclip button behavior
//   
//define function to activate all movieclip buttons except selected one
function Enable_Buttons(selected) {
    for (i=0; i<=Button_Names.length-1; i++) {
        if (Button_Names[i] != selected) {
            _root[Button_Names[i]+"_btn"].gotoAndStop("_up");
            //activate buttons
            _root[Button_Names[i]+"_btn"].enabled = 1;
            //make them clickable
        }
    }
}

Flash CS3 Preset Affects
Thank God for actionscript because the flash preset effects are cheesy as hell! Anyone would be better off using Swish...

Preloader Affects LoadMovie?
Anyone:
I have been having some issues with the creation of my site. I want it to include external elements and the loadMovie tutorial found on this site work great. I also have created some preloaders that work well independantly, but when used at the beginning of each external movie, a single click makes nothing load at all. A click again will load the content, without any loader, which suggest to me that something about the preloader interacting with the movie that contains it. I've stumped all my friends and just wanted to see if anyone here had any advice.

You can see how it works at zero-verion.com/menu2.html

You'll see all kinds of crazy crap happening as I've used several different preloaders on the different content movies. I'll post the .fla's if anyone wants a crack at it.

I know that this type of issue with loadMovie commands shows up all the time on these forums and I really appreciate you patience.

Thanks,

Evanhttp://www.zero-version.com/menu2.html

Preloader Affects LoadMovie?
Anyone:
I have been having some issues with the creation of my site. I want it to include external elements and the loadMovie tutorial found on this site work great. I also have created some preloaders that work well independantly, but when used at the beginning of each external movie, a single click makes nothing load at all. A click again will load the content, without any loader, which suggest to me that something about the preloader interacting with the movie that contains it. I've stumped all my friends and just wanted to see if anyone here had any advice.

You can see how it works at zero-verion.com/menu2.html

You'll see all kinds of crazy crap happening as I've used several different preloaders on the different content movies. I'll post the .fla's if anyone wants a crack at it.

I know that this type of issue with loadMovie commands shows up all the time on these forums and I really appreciate you patience.

Thanks,

Evanhttp://www.zero-version.com/menu2.html

Canvas Size And Its Affects
i had a presumption that anything not placed within the canvas in flash would not show up in the movie, but i had a picture that extended out past the borders of the canvas and was also then shown in the test movie. what rules does the canvas folow? also, how does it effect a published movie? thanks

Event On Level3 Affects Level 2. Why ?
I have three levels, with level0 being the background swf, level 1 a sliding navigation swf, and level 3 are the content swf that get loaded by hitting the buttons on level 2. Now, on level 3 I have sub-navigation to jump to certain frames. Even though these buttons have no on mouse over action attached, they trigger the playhead on level 2 (!!!) as soon as you roll over them. The same thing happens if I have a graphic, of which I set the behavior as a button. Sounds confusing ? Please go to

http://www.richterdesign.net

click on the PF button, then either the EDUCATIONAL or the PROFESSIONAL button, and select an item on the slider that comes with sub-navigation. You might have to try different ones, until you get more buttons on your left side. Now notice, as you move over the orange button (level 2), that the slider starts to scroll (level 1).


Thanks a lot,

Dynamic Text - What Kind Of Affects Can We Do?
Flash Community,
I'm currently a new users in FlashMX. Right now I've created an intro movie that loads a dynamic name from a database. Right now all I can do it move it around the screen very simply. Is there anyway to add more effects to it? Such as breaking it apart and having it morph, or anything of that sort. http://customerservice.homeip.net/test21.aspx

Mouse Location Affects Timeline
I am soemwhat new to actionscript - beyond the simple stuff.
what I wamt to do is have the location of the mose follow the action on the time line.
i have an item that grows as the time line prgesses. i want it to grow (play the timeline) or shrink (rewind the time line) as the mouse moves up or down.

does anyone know how to do this, or where i can find out?

AS On Frame Affects Code On Buttons
When I add AS to the first frame of my movie, it alters AS on buttons that worked perfect prior to the new code being added.

I have an external SWF that loads when a button is clicked. It has a stop action in the first frame. This is the SWF, and frame, where my challenge is.

Within the external SWF are several more buttons, each with AS similar to this:


on (release) {
_root.external.gotoAndStop("myframetwo");
_root.external.mtclip.loadMovie("mymctwo.swf");
}


- or this -

on (release) {
_root.external.gotoAndStop("myframethree");
_root.external.mtclip.loadMovie("mymcthree.swf");
}

each of these swf's has a stop action in the final frame.

the buttons and action work perfect...until I add some more AS to the first frame of the external SWF. In addition to the stop action on the first frame, I have added this line:

_root.external.mtclip.loadMovie("start.swf");

This too works perfect. The playhead stops at frame one of the external SWF and loads the "start.swf" as it's suppossed to. The problem comes when I click one of the buttons that worked a minute ago. Now when a button with this code is clicked:

on (release) {
_root.external.gotoAndStop("myframetwo");
_root.external.mtclip.loadMovie("mymctwo.swf");
}

it works, BUT the playhead doesn't stop at the end of the swf, it loops back to the beginning of the external swf and reloads the "start.swf"

Any ideas on how to keep this from happening?

Thanks

Lens Flares And Lighting Affects
i use coral to edit things i make for web site headers. there are really cool effects like lens flare and lighting effects that give text depth and texture. i was wondering if flash mx 2004 has any of these effects? Is there a way to intergrat my coral effects into the mx flash program it's self.


basically what i want to do is have a rolling lens flare affect across the top of some textured text. i'm new to flash so i just need to now where to look.


thanks

What Affects Video Quality In AVPresence?
I've read all the posts regarding video on here and as usual, I'm still confused.

I've been trying to resize the AVPresence window in a very simple video chat app that I made from a tutorial. http://www.macromedia.com/devnet/mx...t_comm_app.html
I've been able to physically make the AVPresence larger by using "window" "transform" and upping the % to 320%w by 240%h. This makes the video appear larger as I had hoped, but the quality is very poor. Also, it seems distorted a little. I'm not sure what numbers I should actually use.

I've been able to see some improvement by selecting the LAN setting in the setbandwith but not great.

Can anyone tell me how to get 320 by 240 smooth clear video to work. I've seen other flash based webcam sites that look great and I want mine to look like theirs....

Thanks,
Ressor

Duplicating Layer Affects - New Image
Hi,

I have a layer (1)with some text that fades and slides in. I have created a new layer(2) and with this layer(2) i would like to not have the text but a image that does the same thing as the text (fades and slides in). I would think that it would be as simple as copying the frames from layer one and pasting into layer two, but this is not working. Can someone tell me how to apply the same affects(frames) of the text in layer (1) to the image in layer(2).

thanks

chris

One Function Affects Multiple Instances?
is there a way to make a function affect more than one instance?

i'm trying to make one .onRollOver function work for 8 different objects.

i tried something like this:

case1,case2,case3,case4,case5,case6,case7,case8.on RollOver = function() {
}

but it only worked for the eighth object. how do i tell it to affect all of them?

thanks, jason

Spyware Or Trojan Affects LoadVars?
Hi all

I was recently infected with spyware and a trojan. Now after downloading many cleaner apps, my computer is clean again, however, loadVars in my apps cannot find the url I specify

getURL works just fine, but the following

my_lv.onHTTPStatus = function(httpStatus:Number) {
trace("HTTP status is: " + httpStatus);
}

(obviously not complete) returns a 0. I can't even find what a 0 code means.
I have a few apps that worked fine this morning, before my last rounds of cleaning, which no longer work.

Does anyone have any ideas??? i could really use some help.


marrek

Link On Button Also Affects The Other Buttons
I've got a 1 button which is used to create 5 buttons in total in an MC.

But obviously putting the get url code on 1 button will do the same for the other 4.


How can I get round this.....


Shallroc *_^

Masked Element Still Affects The Height?
Hi all,
im trying to make this:

i have a movieclip, and inside it, there is a movieclip what have been masked.
The thing i just found out (by the hard way) that even the masked elements do affect to the movieclup heigth where the elements are.

and i even found out that the mask itself dows grows the _height value of the parent movieclip.

Is there a any way to go around this?
i would like to make it so that only the elements what are visible affect the _heigth value.

thanks

Link On Button Also Affects The Other Buttons
I've got a 1 button which is used to create 5 buttons in total in an MC.

But obviously putting the get url code on 1 button will do the same for the other 4.


How can I get round this.....


Shallroc *_^

Masked Element Still Affects The Height?
Hi all,
im trying to make this:

i have a movieclip, and inside it, there is a movieclip what have been masked.
The thing i just found out (by the hard way) that even the masked elements do affect to the movieclup heigth where the elements are.

and i even found out that the mask itself dows grows the _height value of the parent movieclip.

Is there a any way to go around this?
i would like to make it so that only the elements what are visible affect the _heigth value.

thanks

(Affects Dynamic Text) ..follow Up..
I am so lost... I made a movie clip that resizes like a  box that opens up. In that I have a few frames but nothing special. On one of the other layers I have another movie clip known as dynamic text. This clip doesn't scale and is placed where the scaled box reaches it's end (frame wise).

So then the text box displays the text and everybody is happy campers...Well, well, well - not in my case - When I resize the box clip to other dimensions the text clip follows the lead, leading to all kinds of havoc. Please correct me if I'm wrong - You can place a movie clip in a layer of another movieclip that resizes without effecting the first? That was a mouth full...

You don't need eyes to see just the vision because there are always more ways and different answers to what we are used to...

Mouse Direction Affects Motion Guide
Okay... what i need is a menu-type selector where you move the mouse up and down and the little box (a link to an external video) on the motion guide moves accordingly:

move the mouse up and the little box goes counter clockwise, move the mouse down and the box goes clockwise. is this possible?

Slider That Affects Values And A Line On A Chart
Hi can anyone point in the direction of a tutorial that will show me how to make the following please.

I can use flash, but not sure how to go about linking the slider to the values that change directly and to the line on the graph

http://www.tutor2u.net/assets/simula...imulator_1.swf

HTML Background Affects Flash Functionality...
I tried to apply a fullbrowser background so that all my swfs appear on top of this background...and the background fills the browser...this works fine...but the swfs are affected somehow...one function that does not work for me (using firefox) is my mouse wheel scroll...when you are over the list components the mouse wheel should scroll the list...and when youre not over the list...it should zoom in/out on the main map...neither of these functions works...

here is my html code:

Code:
<html><!--xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -->
<head>
<!--<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />-->
<script type="text/javascript" src="swfobject.js"></script>
<title>EXPOCAD FX 1.0</title>
<div id="contents">
<a href="http://www.macromedia.com/go/getflashplayer" target="_blank">Click here to download Macromedia Flash Player to view the content of this page! Once the install is complete click Refresh to view this page.</a>
</div>
<script type="text/javascript">
var so = new SWFObject("protected_main-0.5x.swf", "EXPOCAD FX 1.0", "100%", "100%", "8", "#ffffff");
so.addParam("wmode", "transparent");
so.write("contents");
</script>
<style type="text/css">
body {margin:0px;}
#bg_image {
width: 100%;
height: 100%;
left: 0px;
top: 0px;
position: absolute;
z-index: 0;
}
#contents {
z-index: 1;
position: relative;
}

</style>
</head>
<body>

<div id="bg_image">
<img src="background.png" style="width: 100%; height: 100%;">
</div>

<!-- this puts the contents of the page ontop of the background image -->

<!--<div id="contents">

</div> -->


</body>
</html>
http://www.expocadvr.com/new/default.html

has anyone ever encountered this before?

Prob: Side Affects From Scaling A Movieclip
- I have a movieClip of width:20
- I want to be able to use two instances of a movieClip, one is a direct instance the other instance is incremented by 30 to have a width:50
- The movieClip has code in an action frame that attaches a movie to the stage onRollOver
- both instances are on the stage
- on test run, the org instance & attach movie code behave correctly, however with the scaled instance the movie that is attached is also scaled
- i have tried to assign the width of the attached movie with this code:

this._parent.attachMovie("mcMovie1_link","Movie1_m c",nextDepth,{_x:_xmouse+5, _y:_ymouse+10, _width:15});

the width property is processed but relative to the scale of movie i.e. if the width is set to 3 it'll be 3 for the org instance and wider for the scaled instance. How does the scale of an instance affect the scale of a movie that is dynamically attached?

I want to use the movie several times to behave the same way but the size of the instances will change...

any suggestions?

Cheers

Transform Matrix Affects Multiple Clips
Hi,

I have a piece of code which instances a new MC (attached to an empty MC on stage) and attaches an onEnterFrame function to it, which will move the clip to the right and skews the clip along the X-axis.
The problem is, when I create another instance, it influences the skew of the previous created instance and so on for every instance.

It seems there is some kind of data binding between the Matrixes or so. Please help me out.

Thanks,
Rick.







Attach Code

instance.onEnterFrame = function() {
this._x += 2;
if (this._x>=machine._width) {
removeMovieClip(this);
}
var xSkew:Number = ((this._x/this._parent._width)*0.8)-0.4;
var m:Matrix = new Matrix(1, 0, xSkew, 1, 0, 0);
this.childClip.transform.matrix = m;
};

Setting A ColorTransform For A Clip Affects Whole Movie
I can't seem to get my head round why when I set the colortransform object for one clip in my movie, it seems to affect the entire movie - textboxes and everything...

I thought that a colorTransform it only affected the specified and child clips in the movie.

Example - I have a lot of things attached to _root.

I have a particular clip which is on its own and is attached to the _root - this is my code...


Code:

clip.transform.colorTransform = new flash.geom.ColorTransform(0.05, 0.05, 0.05, 1, 0, 0, 0, 0);
That seems to set the clip nice and dark as I want it to - but it also sets all other clips and all clips dynamically added afterwards to have the same colortransform settings... am I missing something from the CT object?

HTML Link Affects Flash Movie
Hi people! I've 'stucked' in a problem and wishes someone helps me out!!!
I'm just developing an hybrid website (flash+HMTL) and I want to add a simple feature:HTML link who affects the flash movie. Basically, I got the flash-menu in the top... and the HTML menu in the bottom... content stays between them - I'm using the same links in both.

AMT TELECOM

The obective is to put animations/transitions in each section... no mather what kinda link did you use.

So, who can show me the light about this issue?!

ps: similar effect is used in 2advanced.net!

Stop Command Only Affects Visual, Audio Keeps Playing
I'm trying to use the stop command for my whole movie, I have audio in the timeline and it keeps playing regardless of the stop command. How can I command it everything to stop?

Targeting Nested Clip Affects Parent's Timeline
Hi all, I've been struggling with this for about a week, and know that I must be overlooking something obvious.

My movie contains the clip "traffic" that has a 600 frame timeline. On this timeline, the clip "testCar" tweens from 100% to 500%. From the root movie, I can target both the clip "traffic", and the nested clip "testCar" and rotate them with the arrow key.

My problem: if I remove the line of code targeting the nested clip, the clip "traffic" rotates and plays as expected. As soon as I add the code to target the nested clip "testCar" however, both clips rotate, but "traffic" stops playing.

Here is the code that sits in the first and only frame of the root movie:

code:
var keyListener_obj:Object = new Object();
keyListener_obj.onKeyDown = function() {
switch (Key.getCode()) {

// Left Arrow Code

case Key.LEFT :
traffic._rotation -= 12;
traffic.testCar._rotation += 12;
break;

}
};
Key.addListener(keyListener_obj);


The .fla can be downloaded from my .mac site at:

homepage.mac.com/teemflmngo1/FileSharing4.html

Thanks in advance for looking at this.

Load Movie Speeding Up FPS Which Affects A Speed Detection Script. Know A Fix?
I'm developing a web site, and have an .mp3 jukebox which loads .SWF containing a streaming MP3 in an empty target clip on the root timeline. Everything works great, except when I load an MP3 into a clip the frame rate seems to speed up a lot (not slow down like you would expect...). This affects another script I have for the speed detection of a scroll bar, which is more or less like this:

oldypos = newypos
newypos = this._y
speed = (newypos - oldypos) / 300

Before I load the mp3 .SWF into the clip, the speed script works fine. After I load the clip, the speed levels out at zero and will not change... It's almost like the script is running too fast to detect a difference betweeen the oldypos and newypos variables. I need this speed detection script to work...

I've even tried setting the speed to grep the newypos at a given time interval set with the timer functions, and that doesn't work either once the MP3 SWF is loaded into the blank clip. Also, loading an image instead of a streaming MP3 into the clip won't cause a misfunction...

Oddly enough, if I bump the frame rate of the MP3 .SWF to 25 fps, the speed detection code will work normally, but this affects the play progress bar in the jukebox. This is wrong, because the play progress is based of the _currentframe vs _totalframes, so it should not be affected by an fps change. Strange indeed.

I have all 3 movies set at 30fps, the .SWF with the mp3, the shell / web site, and the scroller being affected by the speed script (also an external movie). And have tried varying frame rates, but this doesn't seem to help.

I'm figuring this is an odd Flash bug with the player, but if anyone has any suggestions or has come across a similar problem, give me a holler. Appreciate any help!

-at.

Adding Buffering Movie Clip Affects My Load/progress Bars
I followed Lee's tutorial on this site (video basics -part 6) on how to add a buffering message at the start of the video. However, when I added the actionscript to my player, I came across 2 problems:

1. The buffering movie clip was supposed to have the text "buffering" that fades in and out as the movie buffers. Mine displayed the text "buffering" but it did not fade in and out like it was supposed to...and yes, I made sure I added the motion tweens.

2. My load and progress bars stop working. They display at 100% and do not re-size to display amount loaded or amount played. They begin to display correctly again when I click on them. Odd. It is like the buffering at the start throws off the value that the length of the bars are based on.

Can you help?? Thank you!

Mouseover In _root Affects Mouseover In Loaded Movie
ok this is perplexing....

i have a mouse over effect to show a popup info text box in the main movie (_root)
and i also have a rollover tsunami effect in a loaded movie.
but at soon as i do a rollover on a button in the main movie
the rollover tsunami effect in the loaded movie does not work....
anyone know what the problem is???

please help

External Content Loader With Multiple Content Types (trouble Loading Graphics)
Hey all!

I am yet another new project. Our flash designer here isn't a big AS guy, and asked me to write a reusable class so that he can load a variety of content types using minimal amount of code on his part. It's also going to be the main component piece in a larger external content player once I'm done with the class itself, so I am making the loading functions into public methods of the loader object than can be called from a button, etc.

I have the code for the text and html parts working (although I can't get stage.width and stage.height to work in the class or from the frame).

The problem I have is that I can't get the graphics content to load (the swf/pic content). Could you please check my code and tell me what I'm missing? I'm sure it's something simple, like it always is.

thanks a million!

-Fish


-----------------------------


ActionScript Code:
package
{
   
    /**
    * External Multimedia Loader Class
    * @author $(DefaultUser)
    * Add new MultiLoader object and insert media type (all lowercase) and object path to control initial loaded object
    * To load a new object, call the MultiLoader.load* methods (loadText, loadPic, loadSwf, or loadHtml as appropriate), passing the path to the external file.
    */
   
    import flash.display.*;
    import flash.events.*;
    import fl.transitions.*;
    import fl.transitions.easing.*;
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    import flash.text.TextField;
   
    public class MultiLoader extends MovieClip
    {
        private var media:String;
        private var path:String;
        public var textObj:TextField = new TextField;
        public var picObj:MovieClip = new MovieClip;
        public var swfObj:MovieClip = new MovieClip;
        public var htmlObj:TextField = new TextField;
        private var objLoader:Loader = new Loader();
        private var objType:String;
        private var textLoader:URLLoader = new URLLoader();
       
       
       
        public function MultiLoader(mediaType:String,objPath:String)
        {
            media = mediaType;
            path = objPath;
           
            if (media == "text" || media == "TEXT" || media == "Text")
            {
                loadText(objPath);
            }
            else if (media == "pic" || media == "PIC" || media == "Pic")
            {
                loadPic(objPath);
            }
            else if (media == "swf" || media == "SWF" || media == "Swf")
            {
                loadSwf(objPath);
            }
            else if (media == "html" || media == "HTML" || media == "Html")
            {
                loadHtml(objPath);
            }
            else
            {
                trace("ERROR: Media type not supported. Media type must be 'text', 'pic', 'swf', or 'html'.");
            }
        }
       
        public function loadText(txtPath):void
        {
            objType = "text";
           
            if (this.numChildren > 0)
            {
                this.removeAllChildren();
            }
           
            this.addChild(textObj);
            this.textLoader.load(new URLRequest(txtPath));
            this.textObj.wordWrap = true;
            this.textObj.multiline = true;
            this.textLoader.addEventListener(Event.COMPLETE, addTextContent);
            //this.textObj.width = this.width;
            //this.textObj.height = this.height;
        }
       
        public function loadPic(picPath):void
        {
            trace("loadPic started");
           
            objType = "pic";
           
            if (this.numChildren > 0)
            {
                this.removeAllChildren();
            }
           
            this.addChild(picObj);
            this.objLoader.addEventListener(Event.COMPLETE, addObjLoader);
            this.objLoader.load(new URLRequest(picPath));
           
            trace("loadPic completed");
        }
       
        public function loadSwf(swfPath):void
        {
            trace("loadSwf started");
            objType = "swf";
           
            if (this.numChildren > 0)
            {
                this.removeAllChildren();
            }
           
            this.addChild(swfObj);
            this.objLoader.addEventListener(Event.COMPLETE, addObjLoader);
            this.objLoader.load(new URLRequest(swfPath));
           
            trace("loadSwf completed");
        }
       
        public function loadHtml(htmlPath):void
        {
            objType = "html";
           
            if (this.numChildren > 0)
            {
                this.removeAllChildren();
            }
           
            this.addChild(htmlObj);
            this.textLoader.load(new URLRequest(htmlPath));
            this.htmlObj.wordWrap = true;
            this.htmlObj.multiline = true;
            this.textLoader.addEventListener(Event.COMPLETE, addTextContent);
        }
       
        private function removeAllChildren():void
        {
            if (objType == "pic")
            {
                this.picObj.removeChild(objLoader);
            }
            else if (objType== "swf")
            {
                this.swfObj.removeChild(objLoader);
            }
            else
            {
                trace("objType != 'pic' or 'swf.' objType = '" + objType + "'.");
            }
           
            while ( this.numChildren > 0 )
            {
                this.removeChildAt(0);
            }
        }
       
        private function addObjLoader(event:Event):void
        {
            trace("addObjLoader started");
           
            if (objType == "pic")
            {
                trace("trying to load pic");
                this.picObj.addChild(this.objLoader);
                this.picObj.objLoader.removeEventListener(Event.COMPLETE, addObjLoader);
            }
            else if (objType== "swf")
            {
                trace("trying to load swf");
                this.swfObj.addChild(this.objLoader);
                this.swfObj.objLoader.removeEventListener(Event.COMPLETE, addObjLoader);
            }
            else
            {
                trace("ERROR: Cannot add object loader. The 'objType' variable does not contain correct media type. The function 'addObjLoader' should only be called when objType is 'pic' or 'swf'. In this case, objType is '" + objType + "' .");
            }
           
            trace("addObjLoader completed");
        }
       
        private function addTextContent(event:Event):void
        {
            if (objType == "text")
            {
                this.textObj.text = event.target.data as String;
                this.textLoader.removeEventListener(Event.COMPLETE, addTextContent);
            }
            else if (objType == "html")
            {
                this.htmlObj.htmlText = event.target.data as String;
                this.textLoader.removeEventListener(Event.COMPLETE, addTextContent);
            }
            else
            {
                trace("ERROR: Cannot add text content. The 'objType' variable does not contain correct media type. The function 'addTextContent' should only be called when objType is 'text' or 'html'. In this case, objType is '" + objType + "' .");
            }
        }

    }
   
}

Sound... SetVolume Affects An Ambient Sound?
Greetings.

I have recently added a few sounds to my flash application (http://www.sportal.de/tracker/tracker.html) with several sound handlers being set off by pressing buttons and the like.

It works like this:
ActionScript Code:
_root.mySound2 = new Sound();_root.mySound2.attachSound("beep");_root.mySound2.setVolume(Number(_root.setvolumes["Day"][0]));_root.mySound2.start();
(where the "setvolumes" array holds 2 values for each sound I'm using... the first is one [0] that gets overridden depending on whether it's on or off [volume = 0], the second value holds the original volume that it's set to when the sound is switched on again).

When the sounds are switched off, there's a loop that overrides the first value for each sounds' array entry with 0, when it is switched on again, the first value of each sounds' array entry is overridden with it's second value.

Then, when any sound is triggered, it retrieves the value from the first array entry that belongs to that sound.

Like I said- that works nicely. BUT- when I added an ambience sound that just keeps on looping, I get a problem when other sounds are triggered.

The starting of the Ambience sound looks like this:
ActionScript Code:
_root.mySoundAmb = new Sound();                        _root.mySoundAmb.attachSound("ambience");                        _root.mySoundAmb.setVolume(Number(_root.setvolumes["Amb"][0]));_root.mySoundAmb.start(0,999);
...so to the best of my understanding, it has it's own "handler" (mySoundAmb), right? It shouldn't be affected by "setVolume"s applied to other sound handlers, right?

But when I trigger another sound while the ambient sound is running, the ambient sound is set to the volume of that particular sound as well... does anyone know why that is so?

I'll try to derive the portions of code that generate this phenomenon, in case some of you have a clue but need to see code ...but if someone can answer this question without having to see the code, that would be even better

Thanks!
~Marcel

Help Needed In Clearing The Content Of The XML File Content Displayed In The Flash
I have developed a flash file with combo box which displayes all the XML files in the directory and after selecting a particular XML file the flash file reads the XML file and displayes the content of the XML file in flash in a fashion I have done. But, if I chose another XML file which is a blank XML file, still the flash file shows the previous file's content in the flash. How to clear that previous file's content?

If I chose someother XML file which is having some content then it shows correctly. But, if I chose some blank XML file, the flash file shows the previous content instead of showing it blank. pls help me how to clear the previous file contents?

Why Does Flash Re-load Content When Content Within Hidden/shown Area?
Hi all,

A purely academic question for someone about how Flash loads. I've written a simple Flash image scroller script, see: http://www.benjaminkeen.com/software/image_scroller/

On the page above, I separated the various content (installation instructions, demo, download file, etc) into separate pages, which get hidden/shown via JavaScript. Very straightforward.

My question is: why, when you go from the "Overview" to "A few examples" sections (both of which have a demonstration scroller), does the flash get "re-drawn" each time? I don't understand - I thought that it would simply get loaded the first time the browser calls it - not every time the content becomes display:blocked through javascript...?

I guess my follow up question is: can this be prevented?

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