Components Not Clearing?
I ran into a problem yesterday dealing with components and thought that I would post. I had a hard time finding anything on the subject so I am hoping this may help someone else.
I had made a small movie, somewhat of a slideshow that was around 8 frames long. Basically you would advance in the slide show and also have the option to return to the previous step. Some of the slides contained the checkbox component.
When getting to the end of the slide show and then going backward through it I noticed the component checkbox was not clearing the stage and therefore interfering with content on previous slides.
The solution was that I had not yet given instance names to each of the components. Once I named them they cleared the stage with no problem. This may be common knowledge but thought I could share any way! Hope it helps someone.
ActionScript.org Forums > ActionScript Forums Group > ActionScript 3.0
Posted on: 12-21-2007, 03:09 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Use FCS Components In Flash MX 2004. Components Already Installed. Help
Hi,
I have Flash communication server 1.5 insatlled and Flash MX 2004 too. When I create new fla file and want to use Flash components, I don't find them to use. I dont see any panel etc to use them. Some one tell me how to list the components to add them in my Flash fla file please
Thanks
Removing Components From The Components Panel
This seems like a stupid question, but I can't seem to get my old components out of my Components panel!
I put some custom made components, just for a try, into the folder
C:Program FilesMacromediaFlash MX 2004enFirst RunComponents,
found them in the Components Panel, but wanted to get rid of them immediately. Deleted the components from the folder, but they don't seem to disappear from the panel! I have no idea where they come from, since I should not have them even on my hard disk anymore!
Cheers!
Flash Components Vs. Flex Components
I know almost nothing about Flex. Just wanted to establish that at the outset.
A client sent me an API component - an swc file - to use in a project I'm doing. I installed it in my Flash folders, but it didn't show up in the Components panel when I launched Flash. When I queried the client about it, he said that it was actually a Flex component.
My question is, what's the difference between a Component written for Flex and one written for Flash ? Can a Flex component be adapted for use in Flash ? In that what I received is a .swc, I'm assuming it has to have been written in ActionScript.
Any help would be hugely appreciated. Many thanks.
CS3 Missing Components Or How To Use Flex 2 Components In CS3
Does anyone have a good resource for how to use Flex2 components in CS3?
I found an install that said it would install Flex2 components in CS3, but all it added waas the UIMovieClip for packaging Flash MC in swc's for Flex.
Right now I am specifically trying to solve the missing dateField component in CS3.
But I would like to find out if anyone has found a good resource for alternatives to all missing components in CS3.
I'm hoping the answer is not to build them from scratch.
Thanks,
Hunter
Components Inside Components (Flash 8)
Hi,
I have an Accordion component which needs to contain a number of small forms, each of which is built as a MovieClip containing TextInput, Button, ComboBox, etc.
So, I build my little forms in Flash, make them into MovieClips, give them a linkage identifier and assign them the AS2 class "mx.core.View", as the documentation says.
Then I use ActionScript to attach these to my Accordion control, using my_accordion.createChild(). OK, fine. Works nicely.
The problem is that in the next few lines of code I also want to be able to populate the TextInput and ComboBox components which reside inside my accordion. I can't do it. Trying to do so fails silently. Tracing out the path to the Components shows that they are "there", but if i put some content into, say, one of the TextInputs up-front (i.e. in the Properties panel inside Flash) and then try to trace... my_acc.my_form.my_textInput.text... i get undefined.
So, it looks like the components inside the form inside the Accordion aren't yet "initialised" when I am trying to get/set their values. I've seen similar behaviour before, but it's not clear in the documentation how to get around it.
Anyone help? What is the correct way to use components inside components like this? I don't want to have to call a second function or put any code on the timeline or anything like that!
Many thanks,
Andy
Components Inside Components (Flash 8)
Hi,
I have an Accordion component which needs to contain a number of small forms, each of which is built as a MovieClip containing TextInput, Button, ComboBox, etc.
So, I build my little forms in Flash, make them into MovieClips, give them a linkage identifier and assign them the AS2 class "mx.core.View", as the documentation says.
Then I use ActionScript to attach these to my Accordion control, using my_accordion.createChild(). OK, fine. Works nicely.
The problem is that in the next few lines of code I also want to be able to populate the TextInput and ComboBox components which reside inside my accordion. I can't do it. Trying to do so fails silently. Tracing out the path to the Components shows that they are "there", but if i put some content into, say, one of the TextInputs up-front (i.e. in the Properties panel inside Flash) and then try to trace... my_acc.my_form.my_textInput.text... i get undefined.
So, it looks like the components inside the form inside the Accordion aren't yet "initialised" when I am trying to get/set their values. I've seen similar behaviour before, but it's not clear in the documentation how to get around it.
Anyone help? What is the correct way to use components inside components like this? I don't want to have to call a second function or put any code on the timeline or anything like that!
Many thanks,
Andy
Flash Components Vs. Flex Components
I know almost nothing about Flex. Just wanted to establish that at the outset.
A client sent me an API component - an swc file - to use in a project I'm doing. I installed it in my Flash folders, but it didn't show up in the Components panel when I launched Flash. When I queried the client about it, he said that it was actually a Flex component.
My question is, what's the difference between a Component written for Flex and one written for Flash ? Can a Flex component be adapted for use in Flash ? In that what I received is a .swc, I'm assuming it has to have been written in ActionScript.
Any help would be hugely appreciated. Many thanks.
Communication Components Do Not Appear In Components Panel
Hi! I've installed Flash MX and Flash Media Server. I would like to use the communication components in flash MX however, I can not see it in my communication components panel in flash MX. I've already added the communication components.fla to my ---Flash MX/First Run/Components directory under the
Macromedia Flash MX installation directory and updated the ASC files
in my /scriptlib/ directory.. But after adding this, only four components (audio conference, av presence, chat and connection light) appeared in my component panel. I need to use other components but its not available. What should I do? Any help will be appreciated.Textcommunication components
Add On To Using New Built Components Or For Building Components?
My version of Flash won't even let me use components created by other people... Is there a plug-in or an add-on that I have to get to use components that didn't come with Flash? Is there something else I need to get to build my own components? If so.. Where can I get it? Is there a homepage I may purshase it from? Where? How much?
Clearing Out Xml
when i test in flash, i can reload my xml by redefining new XML
yet in my browser, sometimes it doesnt update
why is that
how can i avoid it
SO Clearing
I am trying to get used to shared objects and now I am trying to clear one... I tried using the sgame1.clear(); to clear it... but it never cleared it. I put an
Code:
if(sgame1.data.name != undefined) {
sgame1.clear();
trace("cleared");
}
but when i ran it about 3 times it kept giving me "cleared" which means that it didnt totaly wipe out the SO... any suggestions?... thanks
~Bill
Clearing.
hi!!
in one scene of my movie I have drawnt shapes usibng action script. When I add a button onto that scene to go to another scene, that all works, but the shapes from the previous scene are still there. Even if i do a back button to a previous scene the shapes remain. I do not know how to clear the shapes?
Can somebody help me please!!
Thanks for reading!
Clearing Out XML?
Hi there,
I have built a generic movie clip that gets populated from an xml file. (actually its php generated xml) it contains both text and an image. My problem is that when you close the clip down and then click on another button to open the same movie clip but with different info on it, the last image remains for about half a second. What I want to know is if there is any way of clearing the xml out on the close maybe, so that when its re-opened it contains only the new data and image.
Hope that is clear if not let me know
Thanks
Clearing Cach
Is there any code to clear cache on unloading a movie or on browser unload?
I know how to clear cache via browser proerties etc, but i need to know how to do it without allowing all my site browsers doing it manually all the time.
By simply refeshing the browser, does not refresh the swf.
Please Help!!!!!
Clearing The Cache?
Can you clear a client browser's cache on loading a flash movie?
I have a shopping basket that uses Flash as front end and an Access database, using ASP as middle ware.
The basket works fine
My problem is that if a user wants to shop again after checkout, i want them to be able to go back to the start of the movie, but have a refreshed, non cached, version.
My prototype movie shows stock amounts of each individual product. As items are placed in the basket, the stock amounts go down, and up if the user changes their mind. This is all visible on the front end.
Stock amounts are updated on checkout.
After checkout i am using a loadMovieNum instruction to load the same movie again on the same level.
I always recieve a cached version when veiwing in the browser
Any help will be greatly appreciated
Clearing A Picture
Hi,
I would like to start a movie with a completely black screen. As you scroll over the screen, you get a part of the picture. (So you are kind of erasing the black to get to the picture underneath.)
Are there movies out there that do this? What would be the way to do it? (I am thinking mouseover buttons of some sort...)
Thanks for any advice!
Deena
Clearing A Txt Field
g'day can neone tell me if they know of an action whereby i can attach it to an onrelease command to clear a txt field.
i have used a few txt fields (input text fields) in a form using flash five, and would like to have a reset button which clears these fields, is this possable?
look forward to any suggestions
cheers
Assistance In Clearing MC's
Ill simplify me earlier question.
How does one clear a swf loaded movie clip?
I dont want to unload the movie and I dont want to have
the visibility set to nothing.
I tried putting another blank frame in the MC and when i directed to play that frame, the loaded swf was still displayed. Confused. Please help.
Nathan
Clearing Pages
Hi,
I've set up a menu which calls up pages and clears up previous pages. However each time I call up a page I have to clear any possible previous pages.
On clicking the Homepage button it goes to frame 2 of the homepage movie instance which contains information. All other movie instances are made to go to frame 1, which are blanks.
EXAMPLE:
on (release) {
_root.ClimbingPage.gotoAndStop("1");
_root.AbseilingPage.gotoAndStop("1");
_root.OutdoorSkillsPage.gotoAndStop("1");
_root.EventsManagementPage.gotoAndStop("1");
_root.AthletesPage.gotoAndStop("1");
_root.AboutUsPage.gotoAndStop("1");
_root.EmploymentPage.gotoAndStop("1");
_root.PortfolioPage.gotoAndStop("1");
_root.ContactUsPage.gotoAndStop("1");
_root.OurExpeditionsPage.gotoAndStop("1")
_root.HomePage.gotoAndPlay("2");
}
This seems like a really dumbass way of doing it. Can anyone please help?
Cheers
Clearing A Variable
Hi,
in my movie I have a variable called "name".
The user has to fill in the variable.
The movie checks whether the variable is null. If it is it responds: "Please fill in a name".
So far so good!!
But now the user can return and fill in another name.
When I set the variable to null again:
name=null
The code works but the inputfield displays "null"!!!
Is there a way to clear the name variable totally?
Clearing Combo Box
Hey all,
I am trying something so simple yet it seems so complicated! I have a combo box drop down that I would like to clear out. I am loading the list from a PHP script.
I am trying to use removeAll() function and yet its not removing it or sometimes it freezes my combo box.
I have this AS on my button:
on(release) {
_root.dropDown.removeAll();
gotoAndPlay(1);
}
So basically its suppose to clear the combo box, then go back to the first frame and load the variables all over again with the new info from the PHP script...
Help!!
Clearing The Screen?
i am making a movie, where it starts with pictures on the bottom half, and pictures on the tope half. Then when i click "stuff"(button) it will clear the original top pictures, and replace it wit the "stuff" content. I can not get the screen to clear when the button is pressed, it jus shows the original pics, and the "stuff" content on top of it, any ideas on how to clear it?
Clearing ScrollPane
Hi guys,
What's the code to clear the current contents of a scrollPane without turning off the visibility of the scrollPane itself. I just want to clear the contents of it so that I can load other mc's into it by button actions. Thanks!
Clearing The Cache
MX on Mac / internet explorer 5
my flash seems to be choking(slow...frame by frame then stop) on one particular piece of video off my website which plays fine on other computers.
I suspect it has something to do with a corrupt file in my cache.
I emptied IE cache but the problem remains.
Does flash have its own cache somewhere and how do i clear it?
I reinstalled the player but that didn't help..i assume the support files were not replaced...what are the flash player support files and how do i do a clean install?
THANKS
Clearing My SharedObject
I have all these cookies that I have created and I just want to be able to remotely clear them using an external swf. How do I ActionScript that external swf to clear those specific cookies that were created??? Thanks in advance.
Clearing A MC With UnloadMovie
I got an instance of a movie clip in my mainmovie. throuhg out the movie I load several clips inside of that MC and also several textFields. I need to clear the clip out so that I can load a new set of clips and text fields. I'm using MovieClip.unloadmovie() and it clears everything but inmediately after I try to attach the new clips and text fields into that movieclip but I think they also get deleted. What's hapening? is the unloadMovie an asyncronous method? How can I get my clip to be clear out of anything inside it so that I can start loading new stuff afterwards? Thanks in advance.
Clearing A Movie ?
Ok i have this interface now, that plays movie clips (Not external) on button clicks. But i have some exit buttons that allow to exit a particular movie clip, and start where it left off. And this is where i don't understand what i should do...
http://www.oricom.ca/komaro/images/Lcar.swf
The engine button has this script:
on (release) {
_root.NEWCOL.gotoAndPlay(2);
}
the exit button in newcol clip, has this:
on (release) {
unloadMovie(this);
}
The problem is when i try to rehit the engine button, Newcol will not play again...this is where i am lost.
Clearing My Interval
I am making this programmatic fade function with paremeters, using an interval. It works, but I son't know how to clear this interval. The actionscript dictionary didn't show how to clear an interval of this type. Please help; Thanks in advance.
Jason
This is my Script:
var increment:Number = 5;
var targetName:MovieClip = circle.circle2;
var newAlpha = 10;
this.circle._alpha=100;
trace(targetName);
//frame Script
stop();
AlphaIt (targetName, 100,0,100,10);
//functions
function FadeIt (targetClip:MovieClip,startA,endA,steps,time){
}
function AlphaIt(targetMc:MovieClip, mSeconds,startAlpha,endAlpha,stepCount) {
aDelta=(endAlpha-startAlpha)/stepCount;
trace("SC"+newAlpha);
newAlpha=startAlpha;
setInterval(function () {
setAlpha(targetMc);
if (newAlpha == endAlpha) {
clearInterval(this);
} else {
newAlpha+=aDelta;
}
}, mSeconds);
}
function setAlpha (tMc:MovieClip){
trace("ok: " +newAlpha);
tMc._alpha = newAlpha;
}
Clearing FLV Using Netstream
Hi there.
Just put a new site up: www.faithsfx.co.uk which uses flv's in the video section.
Can't work out how to unload an FLV once it has started playing. If someone plays an MP3 on the site, I need the FLV to close the stream and unload.
At the moment, I am getting around it by loading another blank 1 frame long flv, but I would really like to know how to do it properly.
Thanks
Memory Clearing
hi,
I imported a few video files into the library and then deleted them from there, but the flash file size is still huge.
Is there some kind of clipboard in Flash? If so, how can I clear it?
thanks
Nurzik
[F8] Clearing Variables...
I am working on a complex flash game with code everywhere that is un-organized, and same with all of the movie clips.
I was wondering if there was a way to clear all of the variables and movie clips on the stage.
This would also be a help for a flash movie I have that adds a new instance of a movie like copy paste on its own, and I'd like to be able to restart it once it fills up the screen, but adding code to each movie clip to unload it once it is done would be so tedious. There has got to be a better way.
[F8] Cache Clearing
Quickie: I'm testing out some stuff involving loading large files in remotely (namely music and video) and to do this I need to actually have it reload each time, not just pull it out of the cache, is there any way to clear that out of the flash player?
Thanksya
-SG
ClearInterval Not Clearing
Help.
I have a main timeline with buttons. Each button goes to a specific frame in the timeline.
In the first frame only is a Movie clip. This movie clip (movie1_mc) is an animation that uses functions to pause in its own timeline for a few seconds. Thus, the animation will play until it reaches a pause function, waits 6 seconds and plays onto the next pause function.
However, I cannot get this animation to stop when I am in the main timeline. I'd like it to stop when a button from the main timeline is used to advance to a frame in the main timeline.
For instance, if I my button advances me to frame 10 in the main timeline, all is fine until the movie1_mc starts playing again. It will pop into view and run a random speeds.
Below is the script used in frames within the mc.
function hold() {
gotoAndPlay("one");///This gotoAnd Play advances the movie1_mc timeline to the next interval stop.
clearInterval(delayID);
}
var delayID = setInterval(hold, 6000);
stop();
Any help is appreciated.
[MX] Clearing A Textfield
Hello,
Here is what I am after. I am creating a simple login with only a password box. If the password is wrong I have a dynamic textbox saying it's incorrect. I'm trying to make the dynamic text clear itself when the user clears the password box and starts typing again. The only reason I'm wanting this done is so the phrase "incorrect password" isn't sitting there constantly. I've tried using the setFocus and getFocus properties to then clear my variable for the dynamic text. I even tried onKillFocus thinking that might get me what I'm after. None of this cleared the text. Any help would be appreciated. Thanks in advance.
Mo
Clearing A Form
Hi all,
I was wondering if someone could help me I have a form on my site and want it to clear after its submited and anyone tell me the script for this and where to implement it, here is the curent script:
on (release)
{
if ((upload_data.selected == true) || (brochure_request.selected == true))
{
if (CName.length < 3 || Phone.length < 5)
{
ContactStatus = "please fill required fields";
} else
{
if (brochure_request.selected == true)
{
newsletter = "";
loadVariablesNum ("index.php", "0", "POST");
ContactStatus = "Your request has been delivered and will be actioned shortly";
}
if (upload_data.selected == true)
{
getURL("upload_page.php?up=yes&name="+Name+"&cname ="+CName+"&phone="+Phone+"&email="+Email+"&address ="+Address+"&comm="+Comments,blank);
}
}
} else
{
ContactStatus = "please check one of the radio buttons";
}
}
Clearing Form
Hi,
I am trying to clear a form after i click on the submitt button, the button is from the components library and everything works but after i click on it the form doesn't refresh, can anyone help with that?
Clearing A TextArea
is there anyway to clear the contents of a TextArea?
Or should I be using a different component if I want to completely update the contents...
been using flash for about 2 days btw.. :$
thanks in advance
Clearing Cache
Hi guys, some quick help/advice needed.
I've done a search through various forums but haven't found the answer yet. I have a website (http:://www.cmykreative.com) that has 1 main .swf file that loads various other .swf files one after the other when it has finished playing using:
onFrame (60)
{
loadMovie("http://www.cmykreative.com/cmyk_banners/cmyk_intro_02.swf");
}
My query is this . . . when I make changes to the 02.swf, 03.swf files they don't show in the browser as it is still caching the previous versions. Manually clearing the cache allows the first .swf file to show but it continues to show the older versions of subsequent files.
Is there some coding I can put in that 'forces' the browser to NOT cache any of the .swf files OR that clears the cache automatically before loading. I am often making changes to these files and it's becoming a pain now!
Any ideas?
Chris
chris@cmykreative.com
P.S. . . . the original files were created using SwishMax . . .
[CS3] Clearing The Stage
I have a series of objects I have added to the stage. There can possible be 14 or less of them. They are called card1, card2, etc. When the game is over I want to clear all of these from the stage but don't know how to do it sense I don't know how many will be loaded sense it determines on how the game goes. Heres what I tried to do but I don't know how to really do it.
function clearView():void
{
for (var i:uint = 0; i < cardsOut; i++)
{
removeChild(card[i]);
}
}
[CS3] Clearing A Form
I have built a form using Flash CS3. I have the text boxes set as the Input Text type and all of them have both instance and variable names. For example, the first name box is fname and last name box is lname for both the instance and the var.
When I publish the form, the text boxes display the following:
"_level0.application.form1.fname" for the first name box, and
"_level0.application.form1.lname" for the last name box
Originally, I tried clearing the text fields when the form loaded with the following:
onClipEvent (load) {
_parent.fname = "";
_parent.lname = "";
}
That worked. But, for some reason, it disabled the ability for the user to tab between fields. Tabbing would accomplish nothing and made filling out the form slightly more tedious. Also, leaving the var name and clearing the instance name does the same thing.
Any ideas on what's causing it to post this text when it loads? Or on another way to clear the text boxes when the form loads? I've also tried messing with maxChars and restricting the type of characters; but, because it is a script inserting the text and not a user, it has no effect.
Any help is appreciated. Thanks in advance.
[F8] Clearing The Stage
Hi
I have this vague feeling that I came across a as2 function that would clear the stage completely.
I have tried searching the help files, but can't find anything?
Was it just a dream?
thanks
E
Clearing IE Cache
I saw somebody posting this same thing but nobody responded. is there a way to clear IE cache with actionscript? Thanks in advanced for the replys
J
Clearing All Movieclips At Once
i'm having trouble removing the movieclip from the stage when i move to next frame...
for example... i've attached the 30 movieclips on frame A...
but when i go to frame B, the 30 different movieclips are still there playing...
how do i remove them all before i move to frame B?
Clearing Timeouts
I have a Story-like flash animation, the story contains several events and in each event there are some settimeout-delays to trigger some actions to go with the narrator.
Then I have a "chapter selection" where you can jump to an events. Now if I watch a event number 2 and then decide to jump to event 4, the settimeouts that was declared in event 2 are still going :S
So I'll need some kind of a supercommand that I can call when the user jumps between events that clears ALL timeouts at the moment.
Any advice?
Label Clearing
I need to place theCode information in a label. It works fine the first time, but once the information changes the new information goes right on top of the old information. Is there some how I can clear the label before the new information goes on to the label? I tried to clear the label before each time by 'theLabel.text = "";' method, but that doesn't seem to be working.
// The Label
var theLabel:Label = new Label();
theLabel.text = "";
theLabel.move(180,40);
theLabel.autoSize = "left";
theLabel.selectable = true;
addChild(theLabel)
if (theLabel.text == ""){
theLabel.text = theCode;
}
Clearing A Video
I have a script that loads in an external flv file.
i can remove the instance of _video from the stage, however i cant seem to reference it properly in order to clear its NetStream.
Here's the code:
Code:
package {
import flash.display.*;
import flash.net.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
public class MainStageDocCLass extends MovieClip {
private var _localConnection:LocalConnection;
public var myLoader:Loader = new Loader();
var nc:NetConnection = new NetConnection();
private var _video:Video = new Video(532,272);
public function MainStageDocCLass() {
try {
_localConnection = new LocalConnection;
_localConnection.connect( "sfgovChannel");
_localConnection.client = this;
} catch (err:Error) {/*NULL*/
}
loadHomeNav();
trace("MainStageDocCLass.as has loaded");
}
public function loadItems(clip:String, xpos:uint, ypos:uint):void {
var myLoader:Loader = new Loader();
addChild(myLoader);
myLoader.load(new URLRequest(clip));
myLoader.x = xpos;
myLoader.y = ypos;
}
public function loadVideo() {
loadItems("AgencyContent/OfficeContent/Topic1/SectionA/CloseMovieClip.swf", 0, 325);
addChild(_video);
nc.connect(null);
var ns:NetStream = new NetStream(nc);
ns.addEventListener(NetStatusEvent.NET_STATUS, onStatusEvent);
function onStatusEvent(stat:Object):void {
trace(stat.info.code);
}
var meta:Object = new Object();
meta.onMetaData = function(meta:Object)
{
trace(meta.duration);
};
ns.client = meta;
_video.attachNetStream(ns);
ns.play("example.flv");
}
public function closeMovies() {
_video.clear();
nc.close();
removeChild(_video);
trace("closeMovies success");
}
}
}
im pretty sure i need to issue ns.close(); but i dont know how to access it from a different method.
ns.close(); gives me Access of undefined property ns
Help Clearing A MovieClip
Hi i am new to actionscript. I've created a movieclip and i'e copied an image over to the movieclip. I want to clear the movie clip so i can copy another image to it. is there anyway this can be done? ive tried MovieClip.graphics.clear(); but this does not do anything..
Help Clearing Xml From Cache
Hi all,
I have a movie (interactive.swf) which loads a an intercative map.(mapa.swf) When you pass over a sector of the map, (the big dark green sector from the bottom left ) a telephone number is diplayed. It works, but if you reload the movie , then nothing happens. I supose it must be cache matters. Please, how do I fix it?? Thanks a lot for your help cause Ive tried everything and nothing works.
thanks again!
|