Would Like My SWF To Dynamically Load And Display PHP File Instead Of .txt
I would like the below SWF file to display a blogger-generated PHP file instead of a txt file. The swf is here: http://home.comcast.net/~llpatte/testing/dom_main.swf Can I get some help on the coding on this one? Thanks in advance!
KirupaForum > Flash > Flash 8 (and earlier) > Flash MX 2004
Posted on: 11-28-2004, 06:24 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
How To Dynamically Load Mp3's With The Media Display Component.
Alright. So, using the Media Playback component, I am creating an online mp3 player to be used with perl-created databases. Perl part is covered. My problem occurs when I try to reference the mp3 files with a variable. The content the Media Playback component has to be referenced to a variable that is created based on parts of the perl database. Everything I try either yields an Undefined, or it just trys to find the file named "_root.1ID" witch of course is the name of the variable I am trying to extract from.
How To Dynamically Load Mp3's With The Media Display Component.
Alright. So, using the Media Playback component, I am creating an online mp3 player to be used with perl-created databases. Perl part is covered. My problem occurs when I try to reference the mp3 files with a variable. The content the Media Playback component has to be referenced to a variable that is created based on parts of the perl database. Everything I try either yields an Undefined, or it just trys to find the file named "_root.1ID" witch of course is the name of the variable I am trying to extract from.
How To Dynamically Load A List Of Image Files And Display It?
Hi
I'm trying to load a list of images dynamically without entering the information into the xml file. I have seen the example that Flash 8 comes with. I understand an XML file is required. Can the XML file be dynamically updated. Am not really sure how XML works.
any help is much appreciated.
If Text File Does Not Load Display A Message To Screen
Hi,
I am currently using the code below to read from a text file and display it in a dynamic text box with a scroll bar in my movie.
When it can't load the text file an error message appears saying "undefined".
How can i modify the code so that it will print a error message of my choice to the screen. i.e. "text file not loaded"
Please help, i have tried but to no avail!
Thanks
Umark
--------------------------------------------------------------
loadVarsText = new LoadVars();
loadVarsText.load("4203-4.txt");
//assign a function which fires when the data is loaded:
loadVarsText.onLoad = function(success) {
if (success) {
trace("done loading");
//Now that we know the data is loaded,
//set the text content of the Text Field
//with the instance name "scroller" equal to the
//contents of the variable
scroller.text = this.var1;
} else {
trace("not loaded");
}
};
Load FLV File Into Component Display Window Via HTML Or Java
I have an assignment where I need to create a flash video player using the component display.
I want to place the flash object into an html document. I have multiple FLV files that I would like to play in this player. I would like to control the flash object with media controller.
I want to place a lot of buttons into the html document. Depending on which button you click on a different FLV file would load into the Flash Display component.
Please, let me know if you have any suggestion or if you need more information in order to better understand the assignment.
Please reply asap. Its very urgent. I'll desperately waiting for your reply.
Thank you so much for your help in advance.
Dynamically Set Load Movie File Name
Hi
Please can someone indicate what I have wrong in the following code. I am trying to dynamically set the file name of an swf I wish to load but I seem unable to get the file to load. The trace shows the correct file name so that bit of my code is, I assume, correct but the loadmovie call won't work. Here's my code -
on (press) {
// set file name based on button clicked
n = Number(this._name.substr(4, 1));
// create file name
var newmovie = "italian_game" + n + ".swf";
trace(newmovie);
loadMovie(newmovie,0);
}
Any suggestions would be appreciated.
Thanks
Keith
Dynamically Load JPG's Reading From TXT File
Hey peeps,
I cant figure this one thingie out.
I got a flash movie, with a lot of hardcoded variables. Now, I want these to be configured dynamically using an external text file. This file includes URL's pointing to certain JPG's that need to be loaded into the flash movie.
config_borden.txt:
bord1=1
bord2=12
bord3=22
etc.
Only, I can't really seem to get this into my script. I'm trying something like
Code:
configVars = new LoadVars();
configVars.load("config_borden.txt");
tempVar = "borden/";
tempVar += configVars.var1;
tempVar = ".jpg";
loadMovie(tempVar, "bord1.bord1");
But without succes (this is what I hate about actionscript the most, not seeing what is wrong )
Anyone got suggestions for me?
How To Load Data Dynamically From Xml File
HAI FRIENDS
i wanna know how to load data dynamically using XML in flash TREE UI COMPONENT. I WANNA load text and image files dynamically on the same scene when the user pressees the node. IS IT POSSIBLE?? IF SO PLS RESPOND TO THIS IMMEDIATELY
THANKS FOR UR REPLY.
PLS GIVE THE CODE ACTION SCRIPT PART AND XML FILE TOO.
Is It Possible To Dynamically Load Actionscript From An External File?
Hi,
I am making a picture viewer for my website and I want to dynamically include a piece of actionscript.
What's the deal; If got a large number of photoseries, each varying in number of pictures. The thought I had was is as follows:
I use 2 buttons, "previous" & "next". To get the range of pictures to show I created three variables in an external file called nopics.as.
The variables are:
_root.numberofpics = "... a value..."
_root.firstpic = "... a value..."
_root.lastpic = "... a value..."
I call on the the external variables (the nopics file) via the #include statement, however (as you Actionscript gurus probably know ) when using the #include statement you have to recompile the swf file whenever I change the values in the .as file.
Bottom question is: is there a way to have the swf file look at the .as file without having to recompile the swf file?
It's quite late so I might not be entirely coherent, so if something is not clear or you require further info, just let me know.
Thx in advance!
With kind regards,
RF
Load Image Dynamically.. But Only Do So If File Exists?
Hey, I have a program that sort of works like a slide show... i have a next and previous button that sends the movieclip to the next or previous frame and on each frame in an image...
I need this structure to stay like it is.. where each frame has its own picture, but I need to have it done dynamically now..
Say I has 20 frames, so the possibility of 20 images... however, I need the next and previous button to be able to check if the next frame has an actual image to load.. if so.. continue on to that frame, but if not.. stay on the current frame.
if my jpgs are numbered 1.jpg, 2.jpg, 3.jpg
I need the program to somehow check for each..
hopefully i've explained myself enough ... but yeah I really don't know where to start
Can I Dynamically Load File With Text & Images?
Hi there
I have a file with text, an image half way down the page where the text just wraps around it. Can I load all the file into a dynamic text box? Or do i have to split the file up into a main paragraph, middle paragraph & image and reassemble it all then on the stage?
Have never loaded text before so any hep would be greatly appreciated
Using Dynamically Loaded Text To Load An XML File
Hi, I would like to use the text loaded into a dynamic text field to act as the filename of a XML file I'd like to load. If someone could point me in the right direction here that would be great.
Cheers,
Jonahholliday
Dynamically Loaded Text File Doesn't Display In Text Box?
Hello People,
This is the scenario, hope you can help
I have a main mc, that loads into it an mc with a dynamically loaded external text file(" text mc")inside a text box(normal stuff). When the main mc load the text mc the external text file doesn't appear in the text box? When I execute the text mc by itself, it works sweet, text displays. I just need some help of getting the text to appear when it's loaded inside the main mc?
I've attached the text mc file so you can find the problem(note it will work fine, it's just when it's loaded inside the main mc the text doesn't display?)
thanks people
[F8] Load Dynamically External Images Via Variables In Txt File
i need something like below
http://www.infopia.com/includes/swf_files/partners.swf
i want to load unlimited images via variables in txt like
image1
image2
and thing is that i want to make them animated/fading... just like above
howz that possible plz help me
Dynamically Load Jpgs From Text File When Button Pressed
I have several buttons that each have a instance name. How can I load when I press a button load the right image dynamically into a mc.
I would like to define all my jpgs in a txt file.
example:
instance name jpg
1 450.jpg
2 122.jpg
3 542.jpg
...
[F8] Can Flash Load Text Without Changing It And Display Whats Raw In The Text File?
just curious... I just want flash to read a txt file and do nothing to it... just echo it out loud and display it in Flash...
is there a way to do this?
like if the text file had "the quick brown fox jumped over the lazy dog" in it and NOTHING else... no variable syntax or anything..
is there a way this can be done?
I appreciate anybody who can help
Dynamically Display An Image
Hey Guys,
Been searching and searching and I know this should be simple, but all I can find is loading of external images. For reference, I'm new to actionscript, but a programmer by trade, so catching on very quickly. Anyways, I have a frame in my movie where the user hits the end of the animation, and I need to change the background based on a variable. I have two PNG files in the library:
YOURSCORE_0.png
YOURSCORE_1.png
I need to display one of these two images based on a variable called "q1" equaling 0 or 1. I'll then be using the same actionscript to display other images such as the user's score and checks vs X's over top of it. I'm thinking there's got to be a way to make a symbol that I can swap the bitmap for on the fly, or something like that.
Thanks,
Ben
Dynamically Display Movieclips - HELP
I am working on a project that I need some help with.
The project is a build-a-chair deal. The different parts of the chair are in the library as movieclips. I want to be able to send the swf the parts of the chair that need to be shown and have it handle that. For instance builder.swf?back=750&seat=4&rarm=R4&larm=L4&color= 336699
I am working on setting up the movieclips so there are 2 layers. One is the color layer and the other is a semi-transparent image with the contours.
My problem is I have no idea how to dynamically get the options from the querystring and display them in flash.
Can anyone offer me any help or maybe point me to a tutorial that would get me started?
Thanks in advance,
Brent
Dynamically Display Symbol
Hello,
Ive been trying, and trying but it wont work. I have some actionscript, and when a user presses a button, some text appears dynamically on the stage, and I want an image to go along with it. I don't want the button to go to another frame inwhich the image appears, because there are multiple buttons, and multiple images.... to many combinations. So, how can i do this?
Thanks,
Donald
Display Data Dynamically?
hello friends,
how do i display data dynamically?
I already refered to the tutorial for displaying XML data in flash from Kirupa.com and the amound of data that i want to display varies and i want to display all of them at any given time. Currently what i am doing is adding the set amounts of text areas statically but if the amount of data exceeds that maximum amount, then i wont be able to display the rest?
Need help.
Tx.
How To Dynamically Display Images?
Hi all,
I have a client who wants me to create a flash file that would display an animation of different pictures that are submitted by the users. And everytime when the users submit different pictures, he would like the flash file to display the new pictures in the animation too. My question is, can this be done without changing the .fla files everytime after new pictures have been submitted?
Thanks in advance,
Monte
Dynamically Display Jpeg
I want to display a jpeg in a Flash movie based on a value in a MIME-format text file.
The text file is called "variables.txt", and contains the following:
inum=image1.jpg;
The following obviously works:
_root.createEmptyMovieClip("imageHolder1",200);
imageHolder1._x=0;
imageHolder1._y=100;
loadmovie("image1.jpg","ImageHolder1");
But how do I replace the hard-coded image name with the value of the variable?
Is it even possible?
Thanks.
Display Images Dynamically
I am making slide show of images
I want to upload images from a directory abcd
& file name as during run time
img1
img2
img3
Dynamically Load Data Into Dynamically Loaded Swf?
hi,
i have 2 swfs, 1.swf and 2.swf.
2.swf will be loaded into 1.swf using loadMovie(). but there is some data that is dynamically loaded into 2.swf when it's played.
these data get loaded successfuly when i play 2.swf individually. but when i play 1.swf and load 2.swf into 1.swf, the data supposed to be loaded into 2.swf are not loaded.
can somebody give me some leads?
thanks
Dynamically Know What Display Object You Hit Test
Hi,
I have a bit of a hit test puzzle.
In my main movie I have 2 movie clips A and B.
Both A and B have movieClips inside them of type "clip"(defined by me).
Also in my main movie I have a bar movieClip that scrolls vertically through my movie.
Im trying to find a way to get the "bar" movie clip to tell me when it hits a movie clip of type "clip" that is inside either A or B.
Any ideas at all?
Dynamically Display Contents Of A Folder Through Actionscript
I am attempting to display the contents of a folder dynamically through actionscript. The files then need to be accessable so thet they can then be clicked to load the content into Flash (JPG images, etc.) Is this possible to do through actionscript alone, or do I need to use Java or similar language and send it to flash? If there is a way I can figure out how to dynamically put the filenames into an array, then I can go from there.
How To Display The Name Of A Loaded Movie Dynamically In Text Box?
Hello fk.
I have jpegs and swfs that load into a blank movie clip. Is it possible to put a blank dynamic text box on the stage that will display the name of whatever movie of jpeg is loaded into my blank_mc?
For example:
Through loadMovie roses.jpg is loaded into blank_mc.
Text box with instance name textBox displays "roses.jpg" .
Also, to be extra tricky, could you tell it to leave off the .jpg or .swf at the end of the file name when displayed?
Display Data Dynamically And Make It Clickable
I would like to display data inside a Movieclip called "events"dynamically which come from a multidimensional Array. The Array looks like this:
events[i]["eventtitle"]
events[i]["startdate"]
events[i]["enddate"]
events[i]["city"]
The Movie Clip "events" is 170px wide.
How can the data be displayed so that it looks something like this:
12.08.2005 - 13.8.2005
Meeting 1
Moscow
/* Between the data there is supposed to be enough space so one can differentiate between them. */
19.08.2005 - 20.8.2005
Meeting 2
Berlin
// etc
"Meeting 1" and "Meeting 2", etc are supposed to be clickable,so that the details can be shown in a movie clip called "details".
I
I have no clue how to go about this. Could anybody kindly help me out here?
[HowTo] Display Navigation Dynamically On A Textfield
greetings...
here is what i want to create but i'm stuck.
I want to create a feedback of text to tell the user in which section he/she is.
Ex. user clicks about button a text in the upper part of the movie will show About... now that's easy... imagine that we have subsection. let's say the user clicks on portfolio then on project one then on image one. I want to display it like this "portfolio >> project one >> image one" . Usually i get these things but now I am stuck... i guess I have to do it in some sort of a function that i will call on the button handler and pass the variable....
Can anyone help me on this one.
Thanks in advance,
dim
Dynamically Size Stage And Display Area?
I have a slideshow that loads from xml and fades in a variety of sizes of images in random positions. I'm trying to set it up so that the swf (which is in a div tag in an interface) will resize depending on the browser size and will use the NEW stage size to determine the random x/y positions of the images (without resizing them) and will skip any images that are too big for the stage size...
Any ideas if this is possible? Dynamically sizing and determining the "working area" of a swf based on the browser/div size??
THANKS!!!!
How Do I Dynamically Display Paths In Flash To Get Files From?
Heres what I'm trying to do.
Make a flash site that can be upgradable by the user without my intervention.
Flash will read an XML or TXT file that will tell it how many galleries there are.
Then it will load the thumbnails based on the galleries. The galleries are all located in folders labeled with numbers.
What I can't figure out how to do is tell flash where to look.
For example, flash reads that there are 10 galleries.
the files are loaded out of
1 humbnail.jpg
2 humbnail.jpg
3 humbnail.jpg
4 humbnail.jpg
5 humbnail.jpg
etc
How can I make it look for dynamic paths?
Thanks!
Dynamically Get Text From Website & Display In Standalone App
Ok - maybe this has been answered somwhere already, but here's my problem:
I have a standalone CD project created completely in Flash and would like to display my current news items from my website in the Flash interface. Rather than just having a link to the correct webpage in my site, I want Flash to automatically go to my web server, grab the html from the designated page, and display it in a movie clip, or something. Then, if the links in the html ("more info", etc) are clicked, it would bring up a web browser screen with the correct html page - directly from our site. This way, if someone looks at the CD a year from now, the news items shown will be current.
Is this possible?? If so, have any examples or suggestiosn on how??
Thanks for any help!
3D Spiral Menu - Dynamically Display Button Text
I am fairly new to actionscripting and I use Flash MX. I downloaded the sourcecode for the Ultrashock 3D Spiral Menu, but I want to try to dynamically display the button text. For example, if it is the first button, make the text say Home, the second button Profile etc. And how can I add more buttons, what do I need to change in the actionscript. If anyone can help me, I would really appreciate it!
Adding/Moving Dynamically Added MovieClips To Display List
I'm stuck in my pursuit of transitioning from AS2 to AS3...
I have a little app that loads in xml and populates a list component on the stage. It is an elearning user interface in which the content is all loaded dynamically via the xml file. All of the content and title/subtitle is working fine. But the problem is with one last feature I want to add...
I have in the library a movieclip that contains just a simple orange box. I set it's linkage to 'ProgressIndicator'. I then, in the code, loop through the number of topics in the list component and for each topic in there I add an orange box (ie, ProgressIndicator) to the stage. This works fine. But the problem is I can't then change any properties of any of the progress indicators. What I want to do is, as the user progresses through the course, as they go through each topic I want to change the alpha property of the corresponding progress indicator on stage. Hopefully this makes sense. Here is a picture of what I'm aiming for:
Here is the code:
Code:
//Store total number of topics (zero-based so deduct 1 to get real num)
var totalTopics:Number = -1;
//Store reference to current progressIndicator
var currentProgress:MovieClip;
//render the number of topics on screen for user to see their progress during module
function renderProgressBar():void {
//Module progress - for each 'topic' in the listbox add an OrangeBox instance to the stage then highlight progress
//ref to right-hand side of status bar
var xStart:Number = 969;
var yStart:Number = 80;
//create and instantiate progressIndicators on stage based on totalTopics
for (var i:uint=0; i <= totalTopics; i++) {
var progressIndicator:MovieClip = new(ProgressIndicator);
//render the progressIndicators on stage
addChild(progressIndicator);
//change its name to correspond to topic number (zero based!)
progressIndicator.name = "progressIndicator"+i;
//position it
progressIndicator.x = xStart;
progressIndicator.y = yStart;
//add space for next indicator
xStart = xStart - 15;
}
//set first progressIndicator's fill to 'in progress' color of orange
currentProgress = this.progressIndicator0;
currentProgress.alpha = 0.5;
}
The progress indicators are rendering on stage fine and in the right place, but they are not referenceable via the 'progressIndicator0' or 'progressIndicator1' etc names that I *think* I've assigned them. Help!
[F8] Dynamically Load SWFs And After Load, Resize
Hi there
So as a further step of my simple flash eBook i need to scale my dynamically laded SWFs(They are large converted pdf pages). So far, after i have loaded the 2 first pages i correct the x and yscale property of my containers(i have 2(holderOne and holderTwo), each displaying one page) and that works.
But, if i define a ._width and ._height to my 2 containers(now holding page1 and 2) they both just disappear from my stage. My trace tells me that they are loaded correctly, but they are not there.
Here's the onLoadComplete function in which i specify the size of my containers:
Quote:
preload.onLoadComplete = function(targetMC) {
holderOne._visible = true;
holderTwo._visible = true;
holderOne._xscale = 75;
holderTwo._xscale = 75;
holderOne._yscale = 60;
holderTwo._yscale = 60;
bar._visible = false;
pText._visible = false;
trace(targetMC+" finished");
};
As mentioned the above works, but if i use the ._height and ._width properties (400x500 on each page) on holderOne and holderTwo it does not (or maybe it does but my pages disappear).
Anyone who has a clue about what's happening?
Thx in advance
Load And Display External JPG From XML
I'm sure I'll grow to love AS 3.0, but I'm finding it a bit of a slog right now! Anyway, I'm loading a random JPG from an XML file fine (running a trace to confirm this), but what is the best way to the display this JPG on the stage? I'm trying to use addChild() but it's not happening
Also, my AS is on the timeline at the moment, and I'd rather make it an external class. How should I package this up? Any help much appreciated! Here is my AS...
Code:
var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, onLoaded);
var xml:XML;
function onLoaded(e:Event):void
{
xml = new XML(e.target.data);
var il:XMLList = xml.file;// create list of XML data
var n:Number = il.length();// var to store number of covers
var myCover:String = il[Math.floor(Math.random()*n)]; // store random cover
trace(myCover);
}
loader.load(new URLRequest("cover.xml"));
And here is my XML...
Code:
<?xml version="1.0" encoding='UTF-8'?>
<cover>
<file>apres_29.jpg</file>
<file>DSC_0001.jpg</file>
<file>mechu_5.jpg</file>
</cover>
RAMDOMLY LOAD SWF Or TEXT DISPLAY
Hi. I did some research and did not find a simple movie or tutorial on the code to load random .swf or to randomly display text. Does anyone have the code to do this?
Thank you
Load A .jpg But Wait For An Event To Display
Ok, I have my 2 buttons on my stage and a mc called placeHolder_mc into which the .jpgs are loaded. when a button is clicked the jpg is loaded and a function is called that gets the width of the pic. The frame around the pic adjusts to the size of the pic depending on it's width. I'm trying to get the frame to adjust first before the pic is displayed but I'm not sure how to make flash wait to display the jpg until after the frame is set. any ideas? here's my source code so far.
How Can I Load A Photo With A Little Loading Display Before That...
how can i load a photo with a little loading display before that...
i've tried to add a loading display one keyframe before the actual photo... it works but the reaction of the loading is not good. and its efficiency is far away from those fashion site out there (e.g. www.ysl.com)
my code is as below:
// set variable
ready = Math.ceil(_parent.getBytesLoaded()/_parent.getBytesTotal()*100);
// show how many percent left to load
if (showPercent<100) {
showPercent = ready+"%";
} else {
showPercent = "loaded!";
}
// show how many size left to load
showSize = "("+(Math.ceil(_parent.getBytesTotal()/1024))+"kb)";
// loader aniimation
loader.gotoAndPlay(ready);
if (ready == 100) {
_root.play();
}
How Can I Load A Photo With A Little Loading Display Before That...
how can i load a photo with a little loading display before that...
i've tried to add a loading display one keyframe before the actual photo... it works but the reaction of the loading is not good. and its efficiency is far away from those fashion site out there (e.g. www.ysl.com)
my code is as below:
// set variable
ready = Math.ceil(_parent.getBytesLoaded()/_parent.getBytesTotal()*100);
// show how many percent left to load
if (showPercent<100) {
showPercent = ready+"%";
} else {
showPercent = "loaded!";
}
// show how many size left to load
showSize = "("+(Math.ceil(_parent.getBytesTotal()/1024))+"kb)";
// loader aniimation
loader.gotoAndPlay(ready);
if (ready == 100) {
_root.play();
}
How Can I Load A Photo With A Little Loading Display Before That...
how can i load a photo with a little loading display before that...
i've tried to add a loading display one keyframe before the actual photo... it works but the reaction of the loading is not good. and its efficiency is far away from those fashion site out there (e.g. www.ysl.com)
my code is as below:
// set variable
ready = Math.ceil(_parent.getBytesLoaded()/_parent.getBytesTotal()*100);
// show how many percent left to load
if (showPercent<100) {
showPercent = ready+"%";
} else {
showPercent = "loaded!";
}
// show how many size left to load
showSize = "("+(Math.ceil(_parent.getBytesTotal()/1024))+"kb)";
// loader aniimation
loader.gotoAndPlay(ready);
if (ready == 100) {
_root.play();
}
|