ActionScript 2.0 :: Self-contained Preloader Without OnEnterFrame?
Sep 8, 2007Does anyone know of a good Preloader tutorial that doesn't rely on onEnterFrame, here on Kirupa or somewhere else?
View 2 RepliesDoes anyone know of a good Preloader tutorial that doesn't rely on onEnterFrame, here on Kirupa or somewhere else?
View 2 RepliesonEnterFrame=null, onEnterFrame=undefined & delete onEnterFrame....
Which one to use??? What are the performance considerations. If all my movieclips on-stage are running a MovieClip.prototype.onEnterFrame = function() {run initial stuff before setting onEnterFrame=null/undefined... }, will there be performance hits? It's sad that delete onEnterFrame doesn't work unless I delete the prototype enterFrame as well, which would make the clips reinitailise itself again once you declare the enterFrame prototype again (i need to do this since there's more movieclips that end up appearing on-stage, and they need to automatically initialises themselves the moment they appear).
[Code]...
Is there a way to make a preloader base on onEnterFrame function and then delete it after the content has finished loading? I'm asking this because I used this method for some thumbnail preloader movie but the thing is that when I end up with 30 generated thumbnails they eat up processor power because each thumnail's onEnterFrame function is running endlessly..The code I used is this one and it's placed inside the tumbnail clip where the preloader components are:[code]Now, when I want the onEnterFrame action to stop (whe teh content has finished loading) I add the following line inside the else tag:[code]but I know it's not right because the preloader doesn't show anymore...it displays for a split second at the begining of the download and then it disapears and at the end the content is displayed..
View 1 Repliesi'm very new to Flash (although have plenty of experience in Java, C++, PHP, etc). For a University assignment, I am creating a World Cup Guide and i'm creating a countdown to the tournament. I've followed a tutorial and modified it slightly but i'm receiving an error message. The error message is:
[Code]....
this will be the preloader code what i put initial frame of my flash file.
[Code]...
any consise methods to restart a deleted onEnterFrame that has been deleted?
View 3 RepliesIs it possible for an SWF to detect the name of the folder that it resides in at runtime? And then pass that folder name as a variable to a function? If this is possible, would someone point me in the right direction as to how to do it?
View 8 RepliesI have 2 swfs. Swf #1 loads swf #2. Swf #2 has actionscript code that always makes that swf centered no matter how large screen you are viewing the swf in. When I call swf #2 into swf #1, swf #2 takes up the entire window of swf #1 when I only want it to take up a certain size.
View 1 RepliesDoes anyone know if its possible to load a AS2 swf into a AS3 swf, and then have the AS2 swf load other AS2 swfs onto different levels (e.g. _level1, _level2, ect...). I'm trying to wrap an preexisting AS2 swf that manages the loading of several other AS3 swfs onto levels, with a AS3 swf.
View 5 RepliesI am trying to create a pop-up within Flash, but not one that opens a new window. This site shows what I am talking about: [URL]
When you click on the examples of work, it opens a larger panel with the entire creative inside, and also includes a (X) Close button.
Was this done in Flash, or does it also require Javascript, or any other additional software/programming?
I have a tilelist that is loaded using a xml document. The user clicks on one of the images and it is then displayed in a movie clip. the code to load the tile list and display the image is this:
Actionscript Code:
var xmlLoader:URLLoader = new URLLoader(); var xmlData:XML; xmlLoader.addEventListener(Event.COMPLETE, LoadXML); xmlLoader.load(new
[code].....
I have created a NetConnection to a Coldfusion component and the responder is tracing the fact that I have some data being returned.
My question is: How do I access the data that is contained within the responder?The coldfusion component is returning a recordset and with actionscript 3, I have no idea how to get to the data contained within the reposnse.
Have a swf that I am making (call it "contents") that gets loaded into another swf (call it "container") [pre-existing from someone else].How do I, from inside the Contents file I am making, address and execute a function from the Container movie?I know how to go from the container to the content file, but don't know the syntax the other way.Thought something like this should work but doesn't seem to:
Code:
if(this.parent.parent!= null){
var parentLevel:Object = this.parent.parent as Object;
[code].....
This is a simple page I am trying to add a .swf to, with a small custom made js function I slapped up. With chrome the swf is pushed up and out of the navigator window and is missing the top half.
I have tried this quick and dirty approach to detect browser and set the proper background values for each browser:
var browser = BrowserDetect.browser;
var height = '';
var width = '';
switch (browser){
[Code].....
For the movie size in the embed tag: I have tried percents, I have tried pixels, quite a few different combinations. There is always at least one browser that chokes no matter how I set it. Right now it is chrome that chokes. Does anyone knowing the trick to these parameters mind clueing me in on a proper efficient method to integrate a .swf?
Maybe the outer html code is not properly structured and causes this? I am not specialised integration, I am mostly a back-ender, tried a few solutions online but this custom .js that sets values for <nosript> is the only way I managed to get this close to working crossbrowser.
My question basically, what are the clean efficient ways used by integrators to integrate swf cross browser, and is my approach workable if I set proper values?
I want to know if is possibile through regularexpression, count the numbers contained into a string and add a specified character near it.
For exemple, this is a string: Hello2all821abc13 This string contain 3 numbers: 2, 821 and 13 (note that the numbers contained into 821 and 13 are considered like an unique entity, not signle). I want to add near each of it the "-" symbol. Is it possible?
I have a movieclip (faceup) contained in another movieclip (card1), which is an instance of Card. I want to add a child to faceup from Card's class, however, I get a #1009 error.[code]...
View 1 RepliesMy thumbnail buttons (in Lee's scrollpane example), when pressed, are showing the larger picture trapped within the mask of the scrollpane and not outside it. Button Code below:
[Code]...
So, I have the following layering situation
Stage
--moveclip1
--movieclip2
----movieclip3
------movieclip4
I was wondering if it was possible for movieclip4 to be on top of movieclip1, even though movieclip1 is (and must remain) in a layer on top of movieclip2. This should happen when movieclip3 is being clicked (and movieclip4 shows up).
I tried adding this to the mouseclick event of movieclip4:
Code:
this.parent.parent.addChild(event.currentTarget as DisplayObject);
(I tried with and without "parent", and with different numbers of "parents"... cause I kind of lose counts of the parents there).
but... it doesn't work.
I am trying to close a movie clip that I loaded from the library to the main stage using the flowing code....
navhelp_btn.onRelease = function() { attachMovie("navhelp", "holder_mc", this.getNextHighestDepth(), {_x:195, _y:135});}
The navhelp_btn is located on the main stage and the navhelp movie is in the library and gets loaded to an emty mc on the main stage holder_mc. I want to close the navhelp movie using a close button that I created and is housed in the navhelp movie.
I am currently working on an educational project. After submitting for review, the clients have requested I make an array which was hard coded in the as file, to read from xml. The problem I am having is that I do not know how to populate the array with the information contained in the xml file.
hard coded in the as file
wordList = ("Paper,Plastic,Reduce,Retrieve,Litter,Trash,Glass,Recycle").split(",");
I am wantying to replace the word lists that are included with the information in the xml file so as to allow different users to create different words for the list without having to edit anything othere than the xml file.
Is there a way to hide various classes from appearing in code hints while using a compiled SWC?We are trying to create a SWC that can hide classes unnecessary/hidden to third party developers. There is only one class they need to reach, however that class reaches out to so many others. We tried namespaces on our classes but that doesnt work. It only works on methods, variables and properties.Not sure if there is some metadata available to hide those classes from auto complete. That would be sweet.
View 3 RepliesI have lots of child text inputs within a spark Scroller. How can I make the TextInput with id of "x" come into focus if I have a..z id's, also for the scrollbar to scroll automatically to that child item? I can use x.setFocus(), but the scrollbar doesn't automatically scroll to that item? why?
<s:Scroller id="scroller" width="100%" height="100">
<s:Group id="group" width="100%" height="100" id="content">
<s:TextInput id="a" text="" editable="true" width="100%" height="25" />
<s:TextInput id="b" text="" editable="true" width="100%" height="25" />
....
</s:Group>
</s:Scroller>
I have a large flash project and I'm trying to figure out the best way to handle it. I want to load in an XML file of groups and their members, and a bunch of attributes related to each group and its respective members - but these groups and members are only displayed on screen after a user clicks on their parent groups. My first thought was to just pull in the XML for the whole tree of groups and users, then assign movie clips for the groups, and attach properties related to their display and how the user will interact with them - but if they may never appear on screen, is it pointless to do this? How do I best structure this project? Build an object and attach properties only to the object, then add display data only on click?
View 2 RepliesI have a BorderContainer with a Label inside. I need this Label to be centered inside the container. BorderContainer has no layout (I guess it getst the default one, basicLayout...).
My code:
BorderContainer's definition:
<s:BorderContainer xmlns:fx="http://ns.adobe.com/mxml/2009"
[code].....
I have a banner ad which contains an flv player. Due to size restrictions for banners at the site, I've found a player which I think will do the trick (chrometaphore). However, the site in question does not allow anything more than the actual swf for the ad, so I cannot include the com folder for the player and need to include all AS3 code in the swf file. I'm not a scripting genius, and wonder what it would take to include all the classes in the AS3 file contained in the swf. Is it possible? Does anyone know where I can find a VERY lightweight player whose entire code is contained in the fla?
[edit]: It just occurred to me that if the flv is on a remote server, could the com folder and files also be remote? Currently, the path for the com files looks like this:
import com.chrometaphore.display.video.colibri.Colibri;
import flash.media.SoundTransform;
What would that script look like if it was pointed to a remote com folder?
I'm trying to get a copy of an object that contained within an array - not a reference.
Code:
var copyCellObj:Tile;
var cellObj:Tile = new Tile(); // putter-getter obj containing width, height, color, etc.
[Code]....
How do I call a function that's located in a previous frame? I tried just referencing it by the function name, but the compiler says it can't locate that function. I also did something like this:
frameName.framesFunctionName();
and I get errors saying that it can't find the "frameName."
Is there any way for flash to determine the number of files contained in a folder? If so how. I am trying to create a photo gallery which will load as many pictures as there are in a specified folder.
View 2 Repliesi just made a draggable window for my website, its contained within a movie clip(profile_mc) and with in that there is a button which has these actions applied to it :
[code]...
now it all works good, but its reall jerky and just stops even if you dont release.
I need to remove some movieclips that are attached dynamically so they do not show up underneath the new movieclips that will be attached when a user clicks the next button. I've tried removeMovieClip with little success. I am able to remove one or two of them, but not all. I need all of the previously attached movies gone.
Here is the as2 for it.
PHP Code:
//Set functions
function show_movie() {
menu_mc._visible = true;
buttons_mc._visible = false;
teacherinfo_mc._visible = false;
} function displayInfo() {
[Code] .....