ActionScript 3.0 :: ContentLoaderInfo - If The File Is Available Locally Bypass Frame1 Of The Preloader And Go To Frame2?
Apr 13, 2009
I've created a preloader using the following script:
mySWF.contentLoaderInfo.addEventListener(ProgressE vent.PROGRESS, loop);
mySWF.contentLoaderInfo.addEventListener(Event.COM PLETE, done);
Works, but even if the content has been previously downloaded there is still a quick flicker of frame1 of the preloader...is there a way to avoid this (in AS2 you could check, if loaded)? Is there a way to arrange...maybe using an if statement...to avoid the flicker? Basically if the file is available locally bypass frame1 of the preloader and go to frame2?
View 1 Replies
Similar Posts:
Oct 12, 2004
Is there anyway to bypass a preloader if the entire file is already loaded, e.g. missing the intro? I have tried using the ShardObject code quite unsucsessfully, the code I used was:
//stop before running into the next scene
stop();
//check if there is already the SharedObject
[code].....
View 5 Replies
Mar 7, 2009
I'm working on a website ([URL] - don't think the flash file can be seen in FF yet) and I want to load an swf-file with some illustrations and such. As this could get a little big, I have made another swf-file which shows a preloader and loads the first swf-file. The preloader works perfectly when tested in Flash CS3, but when uploaded to and tried on my webhost's server, the preloader doesn't load anything. Instead it of the load-percentage it just writes "NaN". You can find the as3-code down below. The preloader-swf and the swf to be loaded are located in the same folder. Both are as3.
This is the code from my as-class file:
package classes{
// Imports necessary classes
import flash.display.MovieClip;
import flash.text.TextField;
import flash.events.Event;
[Code] .....
View 2 Replies
Jan 14, 2010
I'm building a 10 channel mixer/remixer in Flash. Users can select a "song" to load from an xml driven combo box at the top of the application. In the document class, there is a function that takes the selected item from the combo box and loads in an external swf, which just serves as a library for the 10 sounds of a particular song. I then have to extract each of these sounds by their class names ("Track1", "Track2", "Track3", etc...) and send them off to their respective "MixerChannel" objects. As you can see, the following code block in the "initHandler" is pretty long and redundant. Is there any other way/shortcuts I can use to reduce the code a bit?
[Code]....
View 4 Replies
Feb 28, 2003
Is it possible to save scores in a text file or xml file locally? Im not creating an online application but rather an application for personal use! I don't want to use cookies since they can be cleared by mistake! It would be really good if it was possible to save the score to an external file!
View 2 Replies
Jun 10, 2009
I want a user running a Flash game on his machine (not from a server) to be able to save some game data locally.From what I've read, there still isn't any way to do this, but I thought I'd throw it out there in case anyone knows a sneaky xml or php work around.
View 2 Replies
Jun 14, 2010
I started a discussion about my parameter catching problem and I've now narrowed it now. It turned out it wasn't the parameters not getting catched. The swf took the parameters fine, so that's apparently not the issue. My problem is that it seems like the .xml-file don't get loaded. When I've got my .xml file and .swf locally on my computer and runs it it works fine. When I place it on my web server the same way, it works fine. However, when someone else puts my .swf in embedded on their website the xml won't be loaded by the swf for some reason. Below is the AS3 code loading the xml file. It's been working fine all along until I started playing around with calling the swf from different sources (my friend's web server by embedding it etc.).
[Code]...
View 5 Replies
Jan 20, 2003
I am populating a listbox with an array. When an item is selected in the listbox, I am attempting to link to that file and save it locally when I click a save button. I have fished around looking for ways to do this. I guess I'm looking for any info. I know the FSCommand has some functions that may help, but they don't seem to be supported completely.
View 7 Replies
Aug 25, 2009
I have a flash web site on frame 2 and on the frame 1 I load an extern swf (this is the intro of my site), on the frame 1 I put the code:
[Code]....
The swf is loaded but when is finish make a loop again and do not go to my site on frame 2.
View 7 Replies
Nov 8, 2007
Im trying to get my head around actionscripting....and this is what i have so far....but its not working as i want.
what im trying to do is make the button frame go to frm2 when its clicked and in so doing, it makes the _root goto the respective label. how can i tell the other buttons (mcs) to stay at frame 1 when one of the other buttons are clicked?
var is new for me....am i setting it right?
code inside button container mc:
Code:
//
var C=0;
//
[Code]....
also, how can i add a rollover functionality that does not break the other commands on the buttons (ie: stop at frm2)
View 10 Replies
Oct 11, 2004
i am having trouble with my gotoAndPlay in my MC. i have An MC1 on main stage then inside it i have another MC2. Now on my MC1 i want wen it comes to frame 15 to go and play starting frame2 on MC2 so in MC1 frame 15 i put mc2.gotoAndPlay(2); But nothing happens.Oh yea MC1 has stop on the first frame. But i dont see why it wont work.
View 2 Replies
Jan 25, 2010
Swf generated by class (shown below) brings in the noponies as3 accordion which all works ok locally. But when I put it online nothing is shown. I think it's something to do with the xml files but not too sure.[code]
View 2 Replies
Oct 16, 2009
i have a flash (swf) file
i embedded it in an html page
the location is right
it works locally when i preview it in a browser
as soon as i upload it - it doesn't show up
here's the page: [URL]
here's the location of the swf file: [URL]
i've even tried relative vs. absolute links and nothing. i've tried firefox and safari. nothing.
i'm guessing this is some dumb simple thing, and hopefully it took you longer to read this than it will to type the answer.
i am embarrassed that i am not getting this but hey, it needs to be fixed and i'm sick of looking at it and trying to figure it out.
View 2 Replies
May 8, 2011
Okay, so at the moment I am making a game in as3 with the FlashPunk framework. I have managed to set up ogmo editor to work with it, and the results have been good! I intend to send the ogmo project to some friends, so that they can make some levels for my game themselves. But I have run into a problem. I wanted my friends to be able to test the levels they make, so I set about trying to find a simple open file dialog solution, Sp that they can select the generated XML file (.oel), and then load it in to the actual game.
View 1 Replies
Jun 30, 2011
This code:
ActionScript Code:
import flash.events.Event;
var file:FileReference = new FileReference();
saveBtn.addEventListener(MouseEvent.CLICK, onClick);[code]....
will save a text file to a location I choose, containing the text I wrote in the text field. But it prompts me for the location. Is there a way to save the text just locally next to the swf without the prompt?
View 3 Replies
Jul 16, 2009
I don't know if anyone else has had this problem, but I've created a flash project that works fine on my computer locally. When I take it to another computer(I've tried 3-4), my keyboard events are not working. I used Actionscript 3 to create the file. I've checked to see that the other computers had the latest version of Flash player, but it's still not working on those computers. Does anyone know why my file may not be working? Is there a specific plugin/download I need to have to make my files work?
View 1 Replies
May 3, 2010
I have a very rudimentary Flash movie that I have created. Link here to a copy of the SWF file on my company's website:The movie appears to work all right in IE, but not in Firefox or Google Chrome.Here are the details:It's a leaderboard ad, and like I said, it's pretty basic. I have a simple motion tween, and then an incredibly looooooong series of nested movie clips that create the effect of a counter (like a rapidly rising jackpot).I'm not really hip with the intricacies of ActionScript, so I couldn't code something more elegant. The "counter" is supposed to represent an increasing amount of money that not using our services might cost a company.
Ones, tens, hundreds, thousands, and ten thousands use a simple repeating movie clip. hundred thousands use one that is 10x as long, and so on. I had to stop at 1 millions, as the # of frames in between numbers was prohibitively long.i.e. there are 10 frames in between numbers for the hundred thousands place in the movie, 100 frames for millions, and 1,000 frames for millions.but, like I said, I'm a beginner at ActionScript.Thinking the problem might be due to the incredibly long movie clips, I removed the animations from some of the higher numbers from my movie, and this did not appear to affect whether it plays in Firefox or Chrome.
View 10 Replies
Aug 23, 2006
I've to make a form that's going to work on a local machine without internet during an event. I have a form i'm using for our website, but this one just sends emails.The data needs to be written to a file (Excel / XML ?) which we, after the event, tranfer to another computer and add the list of subscriptions in our company network.
View 1 Replies
Feb 12, 2009
I'm having problem with communication between an MC running on frame 1 and a dynamic textfield located on the main timeline on frame2. The MC running on frame1 is a user and password login. I want to grab the username (variable) from the inputfield within the MC for use on frame2 ( dynamic text ) on the main timeline.
View 10 Replies
Oct 26, 2006
I have successfully created a mock of the FLVPlayback component on frame1 with a button that advances to frame 2 where the FLV actually starts playing. This allows me to use still image MCs and copy that prevents an FLV that is not on autoplay from looking like a blank black screen. [URL]I would also like to have messaging at the end of the video encouraging actions such as attending an event or calling or clicking. Often this would include still images and or a logo. I tried putting the instance of the FLVPlayback in an MC called mcVideo with an extra frame on that MCs timeline that displays the ending art and action copy. But no matter what I try I see nothing but a stopped video at the end of my Flash movie. I keep thinking that after the nested video MC plays if I could only get the timeline to advance to one more frame I could do this. Am I going to have to create a cue point and then have it go to the frame that displays the ending copy?
View 1 Replies
Dec 22, 2008
I have made a XMLloader with URLrequest, and it works locally by calling the file directly by its name ie. "myFile.swf". var presLoader:Loader = new Loader(); presLoader.load(new URLRequest("myFile.swf")); addChild(presLoader);
But when I uploaded the loader to the server, I have no file, only "URL not found"-error. So I found out that I should change to URL to "/Files/Images/subloader/myFile.swf" then it will load. But thats a real problem, because I have several loaders.
View 1 Replies
Aug 1, 2009
I'm simply trying to get Flash to display the first ten characters in a trace, but the results always come back undefined. Here is my code:
var lin = "";
var testfile = new File("test.txt");
testfile.open("text","read");
lin = testfile.read(10);
trace(lin);
The flash file is in the same directory as the text file.
View 1 Replies
Jan 19, 2011
It works by reading an existing Class file, parses it, generates an Interface-like .as file for it, and saves it locally, all from within FlexBuilder. It works perfectly but I'd like to improve it by having it automatically open, modify and save the files with only a few user clicks required.Currently I'm using FileFilter, but this requires that the programmer manualy select each file to parse, and then manually select where to save the output - it's tedious.Normally I'd simply use AIR, but because of my company's security policies I am not allowed to create my own AIR applications.
View 5 Replies
Dec 30, 2006
Is it possible to detect whether an SWF file is launched locally or through a HTTP protocol?
View 4 Replies
Jan 17, 2010
i have a menu, that is triggered by an .as file, and a xml file. under the xml file i have this:
[Code]...
and under the main fla i have this for frame 5 (frame 1 plays it fine...i have imageLoader instead of loader for frame1) var loader:Loader = new Loader();loader.load(new URLRequest("about.swf"));addChild(loader); i also have a stop after frame 1 script.
View 17 Replies
Mar 25, 2002
I'm having trouble using flashamp, I'm ovbiously writing the script in the wrong place I just cant quite get it These are the two errors flashamp teqh support sent me back
- script attached to frame 1 of the main timeline, not the instance of the Controller clip.- duplicate script attached to frame 1 of the Controller clip timeline not the root level instance of the Controller clip.
So I attatched the script to frame1 of the main timeline (this is wrong) but I cant figure how to attatch it to the instance of the controller clip? Then I have to attatch it to the root level instance of the controller clip, and so far I'm somewhat puzzled on how you do this.
View 6 Replies
Jan 25, 2010
I would like use NetStream class to stream AAC audio file stored locally on server (because i can't use Sound class, AAC not compatible) How can i do this ? (without flash media server)
I have tried using http protocol, no errors occured, but i receive no audio data.
View 13 Replies
Jun 5, 2006
hey there guys im doing my final major poject for college in media and were making a set of films and making a flash interface to go with them i was just wondering how can i make links in flash that either link to a an localy saved Html document or a localy saved .mov? i know how to link them to a website but not a locally saved file?
View 1 Replies
May 25, 2004
I am making a jigzaw and when all the pieces are put in the right place, another movie clip will be played.All pieces are buttons placed in different movieclips. The movieclips are then placed in scene 1.
In frame 1, I've written
_global.var1=0;
In frame 2, I've put movieclip1, and in movieclip1 I've placed button1, with the following actionscript:
on (press) {
startDrag ("_root.movieclip1");
}[code]..........
However, when the piece is in the right place, and the if-statement has been activated, _global.var1 is still 0 when I trace it in frame2.
View 3 Replies
Jul 27, 2011
I followed a tutorial to get this to work. I've been fixing new errors on this project for the past 5 hours.
ActionScript Code:
import flash.events.MouseEvent;
var imgurl:String = "img1.jpg";
[code]....
View 9 Replies