Loading Variables From .txt Works, But How To Do....
Hi,
OK, here is the problem, I'm loading .txt into scroll MC in flash. Everything goes fine, but I need to open .html page after clicking on link in .txt document which must have exact size.
Link works fine and opens html page, but how do I enter javascript into .txt to have exact size of html page, is it possible?
Please help,
Oksej
FlashKit > Flash Help > Flash ActionScript
Posted on: 12-13-2001, 07:16 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
- Loading Variables Works Localy But Not Live?
- Getting Variables Works Fine But...
- Syntax/target...?.works Now But Where Are My Variables?
- [F8] Reading Loaded Variables, One Way Works And One Does Not.
- Accessing External Variables Works In IE, Not In FF
- Loading Works Then Loading Text Pauses
- Load Variables Works Locally Not Online
- MovieCliploader Doesn't Works With Array/variables
- Problem With Passing Variables From HTML - Works Sporadically
- Problem With Passing Variables From HTML - Works Sporadically
- Pre-Loading Never Works
- Loading Mp3 Works On PC But Not Mac
- Loading XML But CSS Doesn't Do His Works...
- Image Loading Works, But I Need It In Other Way...
- XML Loading... Works On One Domain But Not The Other?
- XML Loading Works, Links Don't
- MovieClipLoader Not Loading In FF Works In IE
- Loading Variables From Text File. ( Not Fixed Variables )
- How Do I Make A Loading Bar.. That Really Works.. And Not Just A Decoration
- Images Not Loading On PC, Works Great On Mac
- Loading Swf's Locally Works, But Not Over The Server
- Loading Mp3 In Flash Works, But Not In Html
- Loading Text Works On My Machine, But...
- Loading Mp3 In Flash Works, But Not In Html
- Loading Scroll Mc Into Level Works, But Not Into Target Help
- Loading Jpeg By Url Works, By Variable It Wont?
- Loading JPG's ... One Works, The Other One Doesn't... Why? Flash 2004 MX Pro
- Stop() Works, GoToAndStop() Does Not (dynamic Loading)
- Loading And Resizing Images - Works, But Not 1st Time...
- Loading Random Sound Halfway Works
- Problem Loading A SWF In IE; Works Fine In All Other Browsers
- LoadVars Works But Status Bar Says Data Loading
- Loading Text From A .txt File, Not All Html Works...
- How A Flash Movie Works With The Loading Thing
- Loading Text From A .txt File, Not All Html Works...
- Creating, Loading Movie Clips Works Only For First
- Targeting Variables Or Loading Variables In An Array
- Problem Loading External Mp3s On Web ( Works On My Desktop, But Not On Web)
- Loading External Jpgs Works Fine In IE But No Other Browser
- [F8] Flash Not Loading On Html Page, But Direct URL Works
- Loading External HTML Into Flash - Works Great...
- Remoting Issues. Loading Works, Sending Doesn't...
- Loading Dynamic Text - Identical Swf Works On One Site But Not On Another
- Loading Sound Dynamically, Swf Works But Not Upon Page Load In Browser. :-(
- Mp3 Preloader Works But Sound Wont Start Automatically After Loading
- Help With Loading Text File (loadvars). Works In Pc But No In Internet [NOT SOLVED]
- Loading External Text-file, Works, But Still Get An Error Message, Why?
- Help On Dynamic Textfield Loading .txt File Who Works Locally But Dont On The Server
- Error Loading WSDL When Hitting Page Online (works Locally)
Loading Variables Works Localy But Not Live?
Hi
ive had this problem before and solved it, but i forgot!!
I have a swf file and in the same folder a txt file.
i use this code to get the data
loadVariablesNum("http://192.168.254.23/develop/p473/flash/data.txt", 0, "GET");
when i test it it works localy. but when i upload it it doesnt work?? But it works on a mac?
bizare
any ideas???
ta
Getting Variables Works Fine But...
Hey guys I've got this code:
Code:
LoadVariablesNum ("forumstats.php", 0, "GET");
totalonline = "Online: "+this.totalonline;
threads = "Threads: "+this.threads;
posts = "Posts: "+this.posts;
It works very well, however even with the stop command, it continuously refreshes the variables, which is a drain on my bandwidth.
What can I do to get it to load ONCE ONLY? I'm using Flash MX 2004 Professional.
Cheers for any help!
Syntax/target...?.works Now But Where Are My Variables?
Hello everyone
I have just loaded a movie(.swf) into a blank MC.
for example:
Movie1.swf has an empty MC instance named "Stuff"
then frame 1 action is:
loadmovie("othermov.swf", _root.stuff);
"otherstuff.swf" had variables on every frame which made the animation work,
-where did they go when I loaded "otherstuff.swf" into the empty MC.?
-Any suggestions?
thanks,
nigel
[F8] Reading Loaded Variables, One Way Works And One Does Not.
I'm reading variables from a text file and when I make a specific call it works. Like this...
Code:
getURL(my_lv.image1link, "_blank");
But when I try to do the same thing from within a FOR loop, I get undefined.
Code:
getURL(my_lv["image"+i+"link"], "_blank");
//takes me to undefined
Please help. Thanks!
Accessing External Variables Works In IE, Not In FF
Good Morning,
I have a swf file named main.swf and it is loading (using moviecliploader) the file book.swf . There are a bunch of variables and functions in book.swf that main.swf will access. So upon finish loading (onLoadInit) these variables are used.
I tested it locally on IE and works like a charm. However, when I tested it locally on Firefox, it does not work ! Meaning that, it does load the book.swf file, but none of the variables become accessible. When I upload both files temporarily onto a server and test it, it does not work neither on IE or FF.
I really made sure that the file was loaded first, and at the event of onLoadInit , the variables were accessed. But they just return undefined. I tried reading about the security allowDomain() function, but I dont think that's the problem since both files reside under the same directory.
Any help please????????????????
Loading Works Then Loading Text Pauses
Loading Works then Loading Text Pauses
http://www.plan-be.co.uk - the loading bar works fine but then disapears but the text remains!? I have done three pre-loaders beofre and never had this problem, any ideas?
Load Variables Works Locally Not Online
hello,
has anyone had the same problem as me, and do they know the soultion.
i have a high score table writen in perl for a game i making someone.
it all works when i test it on my machine, it returns the high scores form a server else where.
but when i upload the game and try to see the high scores from there it doe'nt return anything?
any suggestions,
thanks howard
MovieCliploader Doesn't Works With Array/variables
i m using moviecliploader for first time. i have made simple animation of images fading in and fading out.
After on image fade out another fades in.
i m loading every image in the same movie Clip
////////Here is the Code
image_no=image_no+1;
if(image_no>=_root.maximages)
{
image_no=0;
}
hell=_root.im[image_no]
myMCL2 = new MovieClipLoader();
myListener2 = new Object();
myListener2.onLoadComplete = function(targetMC){
_root.img_ld.play();
}
myMCL2.addListener(myListener2);
///////Code Ends Here
If i put this line before the last line it works well
myMCL2.loadClip("4.jpg", _root.img_ld.container);//load images into clip
If i put this line before the last line it works well
myMCL2.loadClip(hell, _root.img_ld.container);//load images into clip
Plz Help if any one can
Problem With Passing Variables From HTML - Works Sporadically
I have created a flash movie to act as a navbar for a web site I'm working on. I have labeled the frames I need the movie to show depending on which section of the site the user navigates to. This is done so the navigation shows the appropriate top level nav and sub nav bars.
I have set up query strings in my HTML to pass a variable (label names) into the movie.
My problem is that this method WORKS, but sporadically. The flash occasionally movie loses the variable and the wrong navigation appears.
My variable is called nav.
In the OBJECT tag I have the following code:
<PARAM NAME=movie VALUE= "flashnav.swf?nav=labelname">
In the EMBED tag I have the follwoing code:
<embed src="flashnav.swf?nav=labelname">
In the movie I have the following action:
gotoAndStop(nav);
I'm exporting to Flash Player 4 (using Flash MX Professional 2004), which uses Actionscript 1.0
One more important note, the <OBJECT> code is wirtten to the pages using JavaScript (document.writeln).
Has anyone ever expereinced this? Can anyone see something I'm doing wrong? Unfortunatley I cannot provide a link to the site as it is in pre-production.
Here is a related article:
http://www.macromedia.com/support/fl..._variables.htm
Any help would be appreciated.
Problem With Passing Variables From HTML - Works Sporadically
I have created a flash movie to act as a navbar for a web site I'm working on. I have labeled the frames I need the movie to show depending on which section of the site the user navigates to. This is done so the navigation shows the appropriate top level nav and sub nav bars.
I have set up query strings in my HTML to pass a variable (label names) into the movie.
My problem is that this method WORKS, but sporadically. The flash occasionally movie loses the variable and the wrong navigation appears.
My variable is called nav.
In the OBJECT tag I have the following code:
<PARAM NAME=movie VALUE= "flashnav.swf?nav=labelname">
In the EMBED tag I have the follwoing code:
<embed src="flashnav.swf?nav=labelname">
In the movie I have the following action:
gotoAndStop(nav);
I'm exporting to Flash Player 4 (using Flash MX Professional 2004), which uses Actionscript 1.0
One more important note, the <OBJECT> code is wirtten to the pages using JavaScript (document.writeln).
Has anyone ever expereinced this? Can anyone see something I'm doing wrong? Unfortunatley I cannot provide a link to the site as it is in pre-production.
Here is a related article:
http://www.macromedia.com/support/f...t_variables.htm
Any help would be appreciated.
Pre-Loading Never Works
I've tried multiply pre-loaders. I read word by word and still it doesn't work. All I want to do is have the preloader load my entire flash movie. Anybody care to share some help?
Loading Mp3 Works On PC But Not Mac
I am loading Mp3's in this way:-
on (release) {
mySound= new sound ();
mySound.loadSound("last_dance.mp3",false);
stopAllSounds();
mySound.Start();
}
Pretty standar stuff.
It works fine on a PC in the control>test movie mode and in the explorer window, but it will only work in the control>test movie mode on the Mac. It will not work in the explorer window on the Mac.
Pretty wired, huh.
The mp3 files are being called in dynamically, which wahst I want.
Any ideas Guys?
Thanks
Duane.
Loading XML But CSS Doesn't Do His Works...
Hi people,
I have the following problem:
I have an .fla and .swf that loads a .xml in several tekstfields. Also serveral other variables for things that I need.
Everything works so far but the CSS doesn't !!! The CSS is external.
I loaded the .xml through an XPATH script but that isn't the problem with the loading of the CSS I think...
For a better see an explanation of my problem see my .fla and so on, on:
http://www.rovecon.nl/xpath.rar
I hope you can help me, because I am really stuck !
I commented the loading of the CSS in my script, I began to try to apply my CSS to my headline at first...
Image Loading Works, But I Need It In Other Way...
Hello.
I've followed an tutorial i got from http://www.lukamaras.com/tutorials/a...jpg-image.html
Its just to load jpg's externally. Ok, everything worked fine.
But i need to convert this into an slideshow...
like...a picture appears, some time l8r an effect(i've figured out how to do the effect), then another picture.
In this fla, it is possible to externally load an jpg when you click a button.
The ActionScript goes like:
imgButton1.onRelease = function() {
infoField._visible = true;
startLoading("picture1.jpg");
};
i need that one only object controls the entire thing, that way it'll be able to change the pictures as he wants (i think thats the way, dunno)
The main actionscript is:
function startLoading(whichImage) {
loadMovie(whichImage, "imageLoader");
_root.onEnterFrame = function() {
infoLoaded = imageLoader.getBytesLoaded();
infoTotal = imageLoader.getBytesTotal();
percentage = Math.floor(infoLoaded/infoTotal*100);
infoField.text = percentage+"%";
if (percentage>=100) {
delete this.onEnterFrame;
infoField._visible = false;
}
};
}
Well, i appreciate any help. If there are suggestions to change the way i'm doing , no problem.
Thanks
Pablo
XML Loading... Works On One Domain But Not The Other?
Okay... so I have a problem.
I made this Flash application that reads live commentary from an XML file and displays it on screen. There's a refresh every 30 seconds because the data is likely to change alot since it's a live commentary.
The SWF file was made in 2 versions, using the same code, for two different URLs, both located on the same server (www.sportal.de and www.sportbild.de).
The path to the application is "oc2006"... the server is using SSI (server side includes) so there is one HTML file but it loads different templates depending on what URL you come through.
So the links to the Application are:
http://www.sportal.de/oc2006/ and
http://www.sportbild.de/oc2006/
This is where I start going insane- because the XML files are located in the sub-folder "live/commentary/ergebnisse/olympia/" (from the server-root, not from the "oc2006" folder)... and the first commentary file that is opened on startup is "2006-02-10.xml"... opening that file is no problem.
The actual problem is this: when the application reloads, it seems to not be able to access the file anymore from the sportbild-domain. It works just fine on sportal (which is the "native" domain name of the server).
On either URL, you can access the file, though, if you enter it into the location. Using either one ("http://www.sportbild.de/live/commentary/ergebnisse/olympia/2006-02-10.xml" or "http://www.sportal.de/live/commentary/ergebnisse/olympia/2006-02-10.xml") gives you the same file... only that on sportbild, it seems to be unable to access the file on reload while it works just fine on sportal.
I am absolutely lost... I am thinking it might be a caching problem... because it's not a cross-platform access- since thel ink I'm using in my script to access the file is something like "../../../../live/commentary/ergebnisse/olympia/2006-02-10.xml"... so no matter where the SWF is, it should access the file correctly- and like it said- it works on load, just not on reload.
The "Es liegen keine Daten zu diesem Kanal an diesem Tag vor." is the default message I have it display when the array that should contain the data of the commentary returns empty.
And that is only in Firefox, too... in MSIE, it works on either domain. So maybe it's Caching after all?
Any ideas, guys?
*dies*
XML Loading Works, Links Don't
I set up a small site, which is loading it's text-content from an xml-file, which works fine too,
but if I include links, it doesn't work anymore.
here are the source-files, can somebody see what I'm doing wrong ?
http://www.imagomedia.be/rootsnight/rootsnight2007.zip
MovieClipLoader Not Loading In FF Works In IE
Not sure why, but my subSwf is not loading in FF, works in IE.
Any ideas appreciated.
Code:
var loader:MovieClipLoader = new MovieClipLoader();
var loadHandler:Object = new Object();
loader.addListener(loadHandler);
holder_mc._visible = false;
// define what should happen when the jpg/swf is completely loaded
// use _mc to refer to the loaded jpg/swf
loadHandler.onLoadInit = function(_mc:MovieClip) {
_mc._visible = true;
_mc._xscale = 100;
_mc._yscale = 100;
_mc.init();
};
// start loading specified jpg/swf into blank movieclip holder_mc on stage
loader.loadClip(_root.myPR.absolutePath + "myVideo.swf", holder_mc);
Loading Variables From Text File. ( Not Fixed Variables )
i would like to know how to make my Flash werbby load variables like this automatically everytime i load my flash webby
(this is contained inside a text file) example:
&news[15462]=hello&
&news[14890]=uuuuuuuuuuuh :P&
but i won't be using fixed numbers. these numbers will be randonmize. but how do i tell my textfield to load allll variables that contain the word "news" and a value (number) ? or is there any other ways of doing this?
[Edited by xanbarian on 07-08-2002 at 12:56 AM]
How Do I Make A Loading Bar.. That Really Works.. And Not Just A Decoration
i wanna know how to make A loading bar..
so when people checking the swf..
the swf file will be loaded first .. so you see a progress bar,,
the swf movie starts only when the loading is completed,,
if been trying to figure out this loading bar issue for months..
stil didnt figured it out..
help me please...
Images Not Loading On PC, Works Great On Mac
I have never had this happen before. Of course, this is the first time working with Flash MX version (and sort of a newbie). My problem is that I cannot get this website to pop up my dynamically loaded images on a PC. They load great on a Mac, so I don't understand. I have horizontal and vertical images that switch when any one of the grey boxes are pressed on the website. Is there a quick fix to have the images work on a PC now?
Here is the website www.hamiltonlandscape.net
click on the "landscape" or the "excavate" button.
These are the places where I want pictures to appear.
Here is the code I used to load the images when a button is clicked:
Quote:
mybutton.onRelease {
box1.box01.unloadMovie("www.hamiltonlandscape.net/image1.jpg", "vertical")
box1.box01.loadMovie("www.hamiltonlandscape.net/image2.jpg", "horizontal")
}
Any suggestions
Thanks!!
Loading Swf's Locally Works, But Not Over The Server
I am building this splash page with a website, and at a certain point i call
myMCL.loadClip("circle.swf", 5);
and it works fine when i am on my machine. When I upload it, it doesn't work, yet if I go to it directly by typing in the url for that specific swf (.../circle.swf), it comes up, but just won't come up on the movie.
This has been happening a few times, and i keep just joining the movies manually from two separate files since I am on a time crunch, but I eventually have to figure out what I am doing wrong.
Any suggestions?
THANKS... thanks thanks thanks...can't type it enough.
Loading Mp3 In Flash Works, But Not In Html
well i used this code in flash mx
mySound = new Sound();
mySound.loadSound("eminem.mp3",true);
and this works when i open the swf file
but when i import the swf file into a html page, just putting it there, with dreameaver, it doesnt start to play it ?
anyone plz help
thanks in advance
Loading Text Works On My Machine, But...
I am loading some simple text data from a file on a company network. The data loads OK when on my machine, but when I send the swf to my boss to test nothing appears.
I thought this might be a security issue but we both have the same access to the network so their should be no difference, right?
The code is:
onlinefile = "http://fullpath _to_file";
loadText = new LoadVars();
loadText.load(onlinefile);
loadText.onLoad = function() {
textbox.info.text = this.data;
}
Any advice would be great, thanks.
PS I removed the path for posting but it is their in full in the actual swf.
Loading Mp3 In Flash Works, But Not In Html
well i used this code in flash mx
mySound = new Sound();
mySound.loadSound("eminem.mp3",true);
and this works when i open the swf file
but when i import the swf file into a html page, just putting it there, with dreameaver, it doesnt start to play it ?
anyone plz help
thanks in advance
Loading Scroll Mc Into Level Works, But Not Into Target Help
Hi everyone,
There has got to be a simple solution to my dilemma.
I have been literally searching for days with no luck. Finally I decided to give in to posting and be helped by the "experts."
Here is what I am trying to do:
I have an mc called "view" that is masked and two buttons for up and down scroll. The scroll works fine in the main timeline by itself. I exported the mc to an .swf called
scrollmc. Now, in the main timeline of my site, I've got a button with the code:
on (release) {
loadMovie ("scrollmc.swf", _root.myTarget);
}
this code disables the scroll buttons. BUT when I load using level, the scrolls work but it is by itself somewhere on top of the screen. If anyone knows this, please reply. Thanks in advance.
samantha
Loading Jpeg By Url Works, By Variable It Wont?
Ok I'm wondering if I'm doing this wrong or if Flash just can't do this. Very simple example. If I have a one frame movie where the only action is:
loadMovieNum("http://www.somesite.com/image.jpg", 0);
this works fine and Flash loads the jpeg. But, if I call a php script via loadVariablesNum that loads variables into the movie and try do do this:
loadMovieNum(imageUrl, 0);
it fails. imageUrl was passed to the movie as imageUrl=http://www.somesite.com/image.jpg so imageUrl is pointing to the same exact image! I know it's being passed correcty since if I use a dynamic textbox to show the contents of imageUrl, it shows the correct URL. Is there some way to get the movie to load the jpeg by variable name instead of having to hard code the location?
Loading JPG's ... One Works, The Other One Doesn't... Why? Flash 2004 MX Pro
Hi...
I'm using the Loader component, List component,XML connector and getting info from a XML file. Using "testing" images (jpg's I simply got from the web to test quickly), everything works fine. If I go into the XML file and change the name of the jpg's into some I've made myself, they don't show up.
It's like there is something wrong with the JPG itself... I don't get it. They are in the same folder, I didn't type the names wrong, it IS a Jpg, the size of the picture and of the file is not the problem either... I tried messing with the one I got from the web, I resized it to see what would happen... it still works, and yet my own jpg's don't!
It's problably something very dumb... yet what??
Nicky
Stop() Works, GoToAndStop() Does Not (dynamic Loading)
i am creating an empty movie clip on the fly, and a child to it, in order to load a swf into my flash movie and then control it:
_root.createEmptyMovieClip(name+"container", depth);
container_mc = _root[name+"container"];
container_mc.createEmptyMovieClip(name+"element", depth);
mc = container_mc[name+"element"];
mc.loadMovie(path+file);
i am having trouble controlling the swf. the swf i am loading in has only 2 frames, 2 images. oddly enough - mc.stop() works. mc.goToAndPlay(1) does *not*.
and - when i print _framesloaded on enterFrame, it prints 1. it seems even in this scenario, i should be able to stop it at frame 1, but that never works. and why is the other frame not loading.
do i have to create the swf i'm loading in in a paticular way? thanks for any help!!!
Loading And Resizing Images - Works, But Not 1st Time...
HI guys, im using this to load images into a movieclip, then resize them:
Code:
loadMovie"picture.jpg", _root.holder);
_root.makeSmall(_root.holder, 192, 173, 0);
function makeSmall(theImg, maxWidth, maxHeight, num) {
if (num) {
// stop interval
clearInterval(num);
}
// resize the image if it's too big
with (theImg) {
if ((_width>maxWidth) || (_height>maxHeight)) {
ratWidth = maxWidth/_width;
ratHeight = maxHeight/_height;
if (ratWidth<ratHeight) {
_height = _height*ratWidth;
_width = _width*ratWidth;
} else {
_height = _height*ratHeight;
_width = _width*ratHeight;
}
}
}
}
-- This works fine. After being called for a 2nd time. If i run the code, the image will load, but not resize. If i run it again, it resizes.
The image being loaded is random each time - and it resizes everytime after being the 1st load not working.
And advice? or any better function to load then resize an image in a movieclip.
Regards
Loading Random Sound Halfway Works
I am trying to build a game of "name that tune" the game show from years back.I can get a random sound to load.But when I press the correct button it just play that same sound and won't load another random sound.In other words it loads one random sound when the start button is pushed but after a correct answer it just keeps playing that same sound over and over.
ActionScript Code:
var songSound:Sound = new Sound();
var songArray:Array = new Array();
songArray = ["song1", "song2", "song3"];
randomSong = Math.round(Math.random()*(songArray.length-1));
selectedSong = songArray[randomSong];
startSong = function () {
songSound.onLoad = function(success) {
if (success) {
trace("loaded");
songSound.start();
}
};
songSound.loadSound(selectedSong +".mp3", false);
};
startSong.onPress = function() {//start game
startSong();
};
song1_btn.onPress = function() { //if this were the correct one I would
//be pressing it over and over
if (selectedSong == "song1") {
startSong();
}
};
song2_btn.onPress = function() {
if (selectedSong == "song2") {
startSong();
}
};
song3_btn.onPress = function() {
if (selectedSong == "song3") {
startSong();
}
};
Thanks for looking.
Problem Loading A SWF In IE; Works Fine In All Other Browsers
I've been having a problem getting this one particular swf to load in IE. I've tried various versions of IE, including 7, I believe with the Flash 9 plugin. In all cases, the swf gets stuck trying to load, until it pops up a window saying, "A script is causing Flash Player 9 to run slowly. Would you like to abort?" This in itself seems like a typical infinite loop problem, only the swf works just fine under every other browser I've tried, so in fact I only just recently realized it was causing a problem on IE. Firefox, Safari, Opera; they all run it flawlessly. Is there simply a problem with the IE version of the Flash plugin? I'm not sure this information is relevant, but the swf itself is written in Actionscript 1, and basically it loads and plays levels to a game which are stored in text files on my server.
LoadVars Works But Status Bar Says Data Loading
I am using LoadVars to pass form data to a php page that sends an email. Everything seems to work, and the php page successfully returns sent=ok, but the status bar at the bottom continues to say "transferring data from..."
Could someone please help me figure out how to fix that?
I'll put a link below to my example, as well as example code.
Thankyou
http://bigfins.com/php/form01.html
stop();
var message:LoadVars = new LoadVars();
var messageSent:LoadVars = new LoadVars();
function checkForm():Boolean {
var missing:Boolean=false;
error_firstname_txt.text = error_lastname_txt.text = error_email_txt.text = "";
if (firstname_txt.text == ""){
error_firstname_txt.text = "first name required";
missing = true;
}
if (lastname_txt.text == ""){
error_lastname_txt.text = "last name required";
missing = true;
}
if (email_txt.text.indexOf("@") == -1){
error_email_txt.text = "valid email required";
missing = true;
}
// if missing is true, return false - else return true
return missing ? false : true;
};
function sendMessage():Void {
var formOK:Boolean = checkForm();
if (formOK) {
message.firstname = firstname_txt.text;
message.lastname = lastname_txt.text;
message.email = email_txt.text;
message.sendAndLoad("form01email.php?cachekiller="+ new Date().getTime(), messageSent);
gotoAndStop("send");
};
};
submit_btn.onRelease = sendMessage;
function backToForm():Void {
gotoAndStop("theForm");
};
messageSent.onLoad = function() {
if (this.sent == "OK") {
gotoAndStop("thankyou");
} else {
gotoAndStop("fail");
failure_txt.text = this.reason;
}
};
How A Flash Movie Works With The Loading Thing
i have been wondering all this time, since i am a newbie too.
If you have a flash movie, how do you put everything in loading techniques so people who open our website do not wait too long.
For example if you have portfolio section menu in you web. Do we have to call the portfolio.swf with the loading inside the portfolio.swf ? I just really dont understand how the loading works. Can anyone give some flow chart of the logic behind the loading technique.
Sorry if the question is not so clear.
Thanks everyone that wants to help me
Creating, Loading Movie Clips Works Only For First
Hello,
I am reading an XML document and creating empty movie clips and attaching multiple instances of a movie clip from the library into each empty movie clip.
it works fine in the first loop and function call but after that, the movie clips register as being created, and attached but they aren't showing up.
Here's some of the code, in a nutshell:
CODEfunction call_xml( start_cnt )
{
var xml_menu:String = 'gallery.xml';
menuXML = new XML();
menuXML.ignoreWhite=true;
menuXML.load( xml_menu );
menuXML.onLoad = parse_xml;
}
function parse_xml()
{
//---- create holder movie clips w/in the pc_movie_loader
//---------------------------------------------------------------------------
_root.pc_movie_loader.mc_holder_clip.unloadMovie();
_root.pc_movie_loader.createEmptyMovieClip( 'mc_holder_clip', 1 );
//----------------------------------------------------------------------------
for( var i:Number = 0; i < node_1.length; i++ )
{
subnode_1 = node_1[i].childNodes;
if( i >= this_start_cnt && i < this_end_cnt )
{
_root.pc_movie_loader.mc_holder_clip.createEmptyMovieClip( 'mc_demo_panel_' + i, i );
_root.attach_movie_clip('reg_demo_panel', _root.pc_movie_loader.mc_holder_clip['mc_demo_panel_' + i], '', row_x, row_y );
_root.print_clip_elements(_root.pc_movie_loader.mc_holder_clip);
row_cnt++;
row_y = row_y + (_root.pc_movie_loader.mc_holder_clip['mc_demo_panel_' + i]._height + 10);
if( row_cnt == 2)
{
row_x = 444;
row_y = 10;
row_cnt = 0;
}
}
}
}
and here's the print_clip_elements test function I'm using to print the contents of the movie clips:
function print_clip_elements( clip:Object )
{
for( var j in clip )
{
trace( "****** j:" + j + " : " + clip[j] );
}
}
and here's the attach_movie_clip test function I'm using to attach the movie clips from the library:
function attach_movie_clip( movie_clip:Object, level:Object, message_var:String, x_coords:Number, y_coords:Number )
{
level.attachMovie( movie_clip, movie_clip,10,{_x:x_coords,_y:y_coords});
}
Targeting Variables Or Loading Variables In An Array
Ok I need some help
I want to make an drop box button so I can just give it a name and load the variables onto the _root stage and then it will work. So I can make one and copy it to function differently. I also have made a loop that only creates a certain number of boxes depending on the number of entries.
So I have the dropbox,'fruit' and then the loaded variables
eg. _root.fruit1vari = apple, _root.fruit2vari = pear, _root.fruit3vari = tomato
(they're loaded into the level above so I don't need 20 different load variables for one page with 20 dropboxes.
so I want the first box which is a symbol made of a text field and a button to load the fruit1var. This symbol is copied for each drop box but upon creation is assigned a simple id of n = 1
I've tried making the variable link,
buttontext = _root.fruit add n add vari
or
thisclipaddress = getProperty(this, _target)
varaddress = thisclipaddress add n vari
buttontext = varaddress
the lines go together ok but the debugger and text feild shows the whole address line not the variable contained at that address.
Thanks if anyone can help
Caspa
P.S. All of this is eventually part of a database if there are any good tutorials out there please mention them. I haven't found any just yet and I'm getting desperate. Or even an explanation on how to get a cgi script to convert the data flash sends it into an SQL query.
Problem Loading External Mp3s On Web ( Works On My Desktop, But Not On Web)
I'm using the student version of Flash mx that I bought earlier this year.
I've created a button that loads an external mp3 file. It works on my
computer with no problem, but when I put the mp3test2.swf file and the
test.mp3 in the same directory on my web site, it doesn't work. Here is my
code:
//(relative path)
var bOn1 = true;
button_btn.onRelease = function(){
if(bOn1){
var s1 = new Sound();
s1.loadSound("test.mp3");
s1.start(0,99);
}else{
s1.stop();
}
bOn1 = !bOn1;
}
// (absolute path)
var bOn1 = true;
button_btn.onRelease = function(){
if(bOn1){
var s1 = new Sound();
s1.loadSound("http://www.healingwords.org/test/test.mp3");
s1.start(0,99);
}else{
s1.stop();
}
bOn1 = !bOn1;
}
Has anyone else run into this problem? Any solutions?
Thanks in advance,
Don Drake
Loading External Jpgs Works Fine In IE But No Other Browser
I've written a code which first loads an image into a mc (place), goes through a preloader which uses getBytesLoaded to advance past the preloader, and then uses the following code to decide whether it should be portrait or landscape. It then uses onEnterFrame to fade in. The onEnterFrame seems to hang up midway to being opaque for no apparent reason in Firefox. (Everything works fine in IE). The problem seems to be in the loading in Firefox. Also, there is a timer function which causes all the pictures to load - once they are all cached, it seems to work fine. Anybody have any ideas? Thanks in advance. Here's the link:
http://wolfsmithmedia.com/zirbel/test/ramsdell.html
if (place._width > place._height) {
//landscape
newOrientation = "landscape";
landscape._visible = true;
portrait._visible = false;
place._x = 0;
place._y = 66;
} else {
//portrait
newOrientation = "portrait";
landscape._visible = false;
portrait._visible = true;
place._x = 72;
place._y = 14;
}
//function fades in photo
place.onEnterFrame = function() {
place._alpha = place._alpha + 10;
}
[F8] Flash Not Loading On Html Page, But Direct URL Works
I've been having problems uploading a movie that uses XML to call on external jpgs on my website. I can see the movie when directly going to its URL location (http://catsixstudios.com/slideshow/photoFlowauto.swf) but not when I try to embed it into an html page (http://catsixstudios.com/test.html). I've also triple checked my directories are correct. Please help a noob, thank you.
Loading External HTML Into Flash - Works Great...
hi,
I am loading external HTML files into a flash movie and formatting them with CSS ... all of this is working great except for one thing.
I am loading the content via buttons, so when a user scrolls down to the bottom of one section, and clicks a button to see another topic, the content changes, but it is scrolled down to a point comparable to where the user was on the previous section. i.e. it doesn't bring the user to the top of the "page" when it loads a new one in.
Does anyone have any idea of how I can reset this, so no matter when you click a section, the content will reset to the top of the page.
The site is not quite done yet but you can see what I'm talking about at http://www.brianwellbrock.com/Wellbrock_content.html ... specifically the "Speaking & Seminars" section ...
Any help is most appreciated.
Curtis
Remoting Issues. Loading Works, Sending Doesn't...
Do gateway connections stay open until you close them, or the swf?
Edit, There is actually a problem with my PHP... Not the actionscript. Can I have this post moved, please??
What did I do wrong here...
Code:
$sql="INSERT INTO userInfo (userFeeds,userFeedTitles) WHERE user = '$ownerId' VALUES ($urlArray,$titleArray) ON DUPLICATE KEY UPDATE userFeeds= $urlArray, userFeedTitles= $titleArray";
Loading Dynamic Text - Identical Swf Works On One Site But Not On Another
Strange problem this.
I made a flash banner a while ago which pulled in variables from an asp page, its being used on two seperate sites and *was* working fine on both. Today I found that its failing to pull in one of the variables on one of the sites and is giving an 'undefined' error, the other one still works fine.
The odd thing is they're identical, they use identical asp files in the same sub folders of the site, but one works and one doesnt!
see here -
http://www.samespots.com/flash/quote_banner.swf (works)
http://www.nonlinear.com/flash/quote_banner.swf (broken!)
they both use an asp file - /flash/quote_query.asp - which looks to be spitting out the same URL encoded string without a bother.
I'm stumped, the Actionscript is the same in both files, they're utterly identical, yet ones broken.
anyone got any clues what-so-ever?
Loading Sound Dynamically, Swf Works But Not Upon Page Load In Browser. :-(
I have a small little control for volume, stop and play for a background loop for a page. I'm loading an mp3 dynamically, and it works fine when I test the movie or even run the swf in the wwwroot on my server. When I load the page up in my browser though, no sound. Althought the buttons work, and correspond to my animation as you can see in the code, and the page via the link below. Can anyone help??
ps. I've changed the mp3 extension to mpx, just for that download manager workaround.
Webpage Addy: http://2170funhouse.no-ip.org
########## Code in first from of main timeline ############
song = new Sound(loadingMusicClip);
song.loadSound("page_background_track.mpx");
song.start(0, 999);
playing = true;
newPosition = 0;
// play sound if not playing
_root.playButton.onRelease = function() {
if (!playing) {
song.start(0, 999);
playing = true;
_root.speaker.play();
}
};
//stop sound if playing
_root.stopButton.onRelease = function() {
if (playing) {
song.stop();
playing = false;
_root.speaker.stop();
newPosition = 0;
}
};
Mp3 Preloader Works But Sound Wont Start Automatically After Loading
Hi,
I am no actionscript expert but I have managed to tear apart and combine several examples into one mp3 player that does most of what I want it to.
as there is quite a bit of code I posted the fla rather than put it all here
you can see the movie and download the fla here...
http://www.visi.com/~mgason/simon/m...p3_player7.html
I have 2 problems
1. I cant get the mp3 to start automatically after download (it will if you click the button again. (works locally on my machine but not once uploaded)
just noticed it also starts immediately if you revisit the page after having previously downloaded the mp3. so must be something about the sequence of events?
2.the cursor flickers when it is over any part of the player (again not locally just once uploaded)
could anyone help me out?
mark
PS ways to clean up the amount of code would be gratefully received.I moved the preload into a loop because I did not want a onEnterFrame running all the time for nothing. Is there a better way?
Help With Loading Text File (loadvars). Works In Pc But No In Internet [NOT SOLVED]
Hey guys
I have this script in my flash
Code:
on (release) {
loadText = new LoadVars();
loadText.load("http://www.djgdevelop.com/cgl/templates/cgl/images/map/LAX.txt");
loadText.onLoad = function(success) {
if (success) {
// trace(success);
_parent.newsBox.html = true;
_parent.newsBox.htmlText = this.myNews;
}
};
}
It loads a small text with this info:
[HTML]myNews=<font size="16px" color="#FFFFFF"><b>Tampa, FL</b></font>
<b>(ATL)</b>
402 East Oak Avenue Suite 204 Tampa, FL 33602-2704
T. 813.221.5060 F. 813.221.[/HTML]
Everything works fine in my pc, I change the URL and stuff and nothing, the server is just "reading'. Both files are together in the same folder.
What should I do? Thank you in advance
Loading External Text-file, Works, But Still Get An Error Message, Why?
so, i made a layer called text, with a dynamic textfield and called the instance "newsText". and then wrote the following ascript on a new layer;
--------------------------------------------------
myText = new LoadVars();
myText.onLoad = function();
MyText {
newsText.text = this.myVariable;
}
myText.load("newstext.txt");
--------------------------------------------------
i manage to load the text, but i got the following mesage, and i don´t understand why it complains about "Ext_text" and "test.txt" since I changed it to "myText" and "newstext.txt"
**Error** Symbol=newstext bar 1, layer=newsbar, frame=1:Line 1: Statement must appear within on/onClipEvent handler
Ext_text = new LoadVars();
**Error** Symbol=newstext bar 1, layer=newsbar, frame=1:Line 2: Statement must appear within on/onClipEvent handler
Ext_text.onLoad = addText;
**Error** Symbol=newstext bar 1, layer=newsbar, frame=1:Line 3: Statement must appear within on/onClipEvent handler
Ext_text.load("test.txt");
**Error** Symbol=newstext bar 1, layer=newsbar, frame=1:Line 4: Statement must appear within on/onClipEvent handler
function addText() {
Help On Dynamic Textfield Loading .txt File Who Works Locally But Dont On The Server
Hi, i was lookin troughout FlasKit website trying to solve a problem that i´ve got with Dynamic textfields loading text archives on MX
i was using all this lines of code but it didnt work when i upload to the server (the weird thing is locally it works just fine)
_root.loadVariables("01.txt","/");
or this other
loadVariablesNum("01.txt?Ran="+random(999), 0);
the text file is uploaded as an UNICODE file got all its variables fine (my_variable1=hello world&my_other_variable=help me escape from this !!) etc..etc..
the textfield is working with its vars (my_variable1, my_other_variable) correctly attached; and its works FINE on any computer (locally) but when its uploaded fails; i was trying to modify the path of the txtfile ("01.txt" "/01.txt") but it didnt work and i dont think its always necessary to put an URL when a file works with a relative path.
can u help me? plz i need the correct code to put in my flash file, and got another question, when i change the contents on the TXTfile and upload it again , theres a way that an user who got the previous txt file (and got it on the webcache),across my flashMX file uploads and update the content on the dynamic datafield or this is done dynamically by my SWF ?
PLZ HELP ME ASAAAAAAAAP
Thx
Regor Do Spika
Error Loading WSDL When Hitting Page Online (works Locally)
when running the swf from Ctrl-Enter and/or running it as a local projector, I have no problems running all the web services that are on a remote server at 64.blah.blah.blah.
However, once I upload the site to our company testing webserver pixelfarminteractive.com, the web services no longer load, giving me this error:
Could not load WSDL
I could have sworn we had this working in a past project thanks to this line of code:
System.security.allowDomain("*");
Is that no longer allowed in Flash 8 player? Or is it purely because the Web service is on a different server? (maybe the old project had the WSDL on the same server the SWF was hosted?)
What's the point of connecting to a shared web service if you can only use it when your flash is on its server?
here's the (hopelessly nondescript) flash help on the matter: http://livedocs.macromedia.com/flash.../00003023.html
|