Finding A Media Address From Xml
I have buttons on my stage that use getURL(); to open media files. I've set variables for the location of the files that take the value from xml lables out of sight but on the stage. When I test my file it traces the video location as "undefined" despite the fact I can see the values in the labels. I've made a little test function that checks for the location of the files which works fine, but still my buttons say undefined. If anyone can help I would be most grateful.Thank you,BeatieAttach Code//*******************************// I used this to check the addresses and it worked fine//*******************************media_xml = new XML();media_xml.onLoad = function(success) {if (success) {findAddress();}};media_xml.load('media.xml');//************************************************************//here's the function to check the address that works fine//************************************************************function findAddress() {var video_location = this.video_lb.text;var audio_location = this.audio_lb.text;if (this.video_lb.text != undefined) {trace("working video location = "+video_location);} else {trace("Can't find the video.");}if (this.audio_lb.text != undefined) {trace("working audio location = "+audio_location);} else {trace("Can't find the audio.");}}//****************************************************//And here are my sad dysfunctional buttons that come up with undefined. What am I missing?!//****************************************************this.video_btn.onPress = function() {var video_location = this.video_lb.text;trace("working video location = "+video_location);getURL(video_location, "_blank");};this.audio_btn.onPress = function() {var audio_location = this.audio_lb.text;trace("working audio location = "+audio_location);getURL(audio_location, "_blank");};
Adobe > ActionScript 1 and 2
Posted on: 06/12/2007 10:22:12 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Finding The Address Of Clips In A Loaded Movie
hey there... I am having some troubles with finding the address of some clips in a loaded movie.
Basically I am loading a number of movies into a movie clip on my main timeline, then I want to be able to access the clips at runtime, to play them at different stages of the presentation...
So,
I have my main swf, which at runtime loads a number of secondary swfs (referenced by an xml doc) and in each of those secondary swfs are 3-5 movie clips which I want to be able to manipulate...
How do I do this?
anyone?
Media Controller Or Media Playback Wont Work
Im trying to stream http://internetradiopros.net:10042 into the default flash media controller or playback....I have NO idea how to do this. I know how to call mp3's and FLV's. I really need help on this badly.....
[CS3|AS3] Accessing Media Portion Of A Media Atom Feed
Hopefully someone could help me with this. I am using the as3 syndication libraries and an example provided here:
http://www.mikechambers.com/blog/200...ctionscript-3/
I am basically trying to integrate with YouTube ( http://code.google.com/apis/youtube/...list_of_videos) and test being able to pull in videos from their feeds. Using the code:
Code:
var rss:Atom10 = new Atom10();
rss.parse(data);
var rssEntries:Array = rss.entries;
for each(var entry:Entry in rssEntries)
{
trace(entry.title + " : " + entry.id + " : ");
}
I can access the children of <entry> just fine, but, things like the actual video url and thumbnails are in the <media:group> which looks to be outside the <entry> node, but I am not entirely sure, I am quite new to parsing Atom feeds. Does anyone have an idea on how I can access that portion of the feed? Do I need to create a new class for <media> like there is included for <entry>?
Here's an example feed for anyone to take a look at:
http://gdata.youtube.com/feeds/api/v...max-results=10
Thanks for any help anyone can offer.
Streaming Media Server Vs Flash Media Server
We have a streaming server here. Can this be used to stream flv files on its own? Or do we need to add Flash Media Server to it in order to to this?
Right now, I'm thinking something needs to be done, because I try to post flv files, and I try to use this code to access them:
var connection_nc:NetConnection = new NetConnection();
connection_nc.connect(null);
var stream_ns:NetStream = new NetStream(connection_nc);
my_video.attachVideo(stream_ns);
stream_ns.play("http://video.[myURL].com/testSTream/streamVideoTest2.flv");
stream_ns.onStatus = function(infoObject:Object) {
trace("NetStream.onStatus called: ("+getTimer()+" ms)");
for (var prop in infoObject) {
trace(" "+prop+": "+infoObject[prop]);
}
trace("");
};
and the trace I get from onStatus is always, NetStream.Play.StreamNotFound
Any help is always appreciated.
Thanks
Chris
Address Bar.
Hey,
I'm trying to make an address bar like that of the one in internet explorer, so that when you type in an address it's displayed, for example if the user enters 'www.mypage.com', then it should take the person to that website.
Thank you.
!phara0h
Ip Address
hello,
is it possible to get the users ip address by just using actionScript?
if there is what is the code?
if there isn't how else could i get the users ip?
thanks,
elo
http://www.transporter.at
Sub Address
hi, i have a flash website and want to upload another flash page to the site, but have it located at another sub address. so lets say the main website is at "website.com", i want to upload something to website.com/animation.
i want to be able to access website.com/animation directly, without going to website.com first.
how do i publish this?
thanks for any help, i probably should post this on the newbie board. but i'm not a newbie, i'm just dumb.
thanks
mc
IP Address
Can you grab a client's IP address through flash a flash movie?
Is It Possible To Know What URL Address You Are On?
Pardon my ignorance, but is there a way to find out what URL the page is on? or am I missing a fundamental stop(); and something else?
I have a menu that I use in my htm documents for a web site to navigate through it. When a page is selected, an animation is played and it graphically indicates the new page being viewed.
The problem I have is that as soon as the page loads, the movie plays from the begining as the swf gets loaded again. I have tried a stop(); at the first frame, but then the movie doesn't go to the frame where it is supposed to graphically indicate what page the user is on.
My tought is that if I can somehow read the URL I am on, then on my first page I can do some if statements to take me to the frame for each particular page so the user has the right graphical display.
Your help is much appreciated.
Is There A Way I Could Get The IP Address....
Hi you all!!!
Is there a way to get the IP Address (from within the movie) of the machine the Flash Movie is playing on?
Here's the scenario: I have multiple Flash Movies playing on remote machines, and each one has to validate against a SocketServer I have running on the Server from which the movies where downloaded from. Now the validation "UserName" has to be the IP Address.
I need to send this IP to the SocketServer so it (The Server) can look up each machine on a DB.
As always, I'll appreciate any help.
Thanks,
Francisco
Getting An IP Address
Does anyone know if you can snag an IP address in flash. Would like to be able to restrict only certain IP addresses from being able to get into my swf file. Any help would be greatly appreciated.
IP Address
I was wondering if anybody can help,
I have only just started using flash/dreamweaver....... I have made up a contact form in flash that posts to a CGI script. On the form itself I want to display the users IP address, this is to stop people abusing the form.
I have no problem using something like shtml to get the ip but I do not know how to pass that variable into flash or if there is an easier way just using action script itself
Thanks for the help in advance
Grimmis
Ip Address
i want to know the ip address of users who have entered my website
Ip Address
i want to know information about the visitors who entered my site like their
ip addres and their dns name and when they entered the site
Mx: Getting Address Url
If I have an swf [nav bar]say on www.site.com/games
is there a way I can read the address and have a text field display games, then if I had the the swf nav bar on the index page, make the text field display home?
I dont mean by using _swf, becuase that only gives the address of where the swf file was downloaded.
How Do I Get The Url Address?
this is probably a very simple one:
i have a simple SWF in an html page.
this html page can get a query (index.html?some=thing )
in my swf i need to get the whole url and then forward the query to another url.
how?
Get IP Address
Probably silly Q here but am going to ahead and ask. I basically need a way to obtain IP address in flash. What I have so far;;
In PHP:
<?
$ip = getenv('REMOTE_ADDR'); //~ get ip address
$ip = "&ip=".$ip."&"; //~ make it a flashable variable
echo $ip; //~ spit it out
?>
In FLA with dynamic text box named "myTextBox" and on the first frame- the actionscript is:
myLoadVars = new LoadVars();
myLoadVars.specificvariable = "Value";
myLoadVars.sendAndLoad("http://www.mysite.com/ip.php", this, "GET");
myLoadVars.onLoad = function() {
myTextBox.text = this.ip;
};
Now it's not working. Can anyone help me out to get this fixed? Thanks!
Get MAC Address
Hello folks,
I was wondering if there is any way to retrieve the MAC address of the client using AS?
Thanks
Swf Address
the sample code that swf address comes like this:
but as you can see, in the line below it uses timeline to switch pages
gotoAndStop('$/error/');
my question is what can i replace gotoAndStop with so i can build the pages dynamically
thanks
ActionScript Code:
// Custom utilities
function replace(str, find, replace) {
return str.split(find).join(replace);
}
function toTitleCase(str) {
return str.substr(0,1).toUpperCase() + str.substr(1);
}
function formatTitle(title) {
return 'SWFAddress Website' + (title != '/' ? ' / ' + toTitleCase(replace(title.substr(1, title.length - 2), '/', ' / ')) : '');
}
// SWFAddress actions
function btnClick(e:MouseEvent) {
SWFAddress.setValue(e.target.deepLink);
}
function btnRollOver(e:MouseEvent) {
SWFAddress.setStatus(e.target.deepLink);
}
function btnRollOut(e:MouseEvent) {
SWFAddress.resetStatus();
}
// SWFAddress handling
function handleSWFAddress(e:SWFAddressEvent) {
try {
if (currentFrame == 2 && e.value == '/') {
play();
} else {
gotoAndStop('$' + e.value);
}
SWFAddress.setTitle(formatTitle(e.value));
} catch(err) {
gotoAndStop('$/error/');
}
}
SWFAddress.addEventListener(SWFAddressEvent.CHANGE, handleSWFAddress);
stop();
SWF To Run Only On Specified IP Address
I'm designing and hosting Flash sites on my dedicated server.
Is there a way (script) for me to ensure that the SWFs only run if they are hosted on my server (IP Address)?
URL Address?
How do i know my application URL address??? Does it suppose to be like this...
http://localhosti forgot the port no.)/xxxxxxxx(where file/application existed)???
For your all acknowledgement, i'm installing flash comm sever under Developer Installation Mode and under Win XP OS, not under Window Server or any other web server... so am i suppose to have web server like apache or Window Server just to have the URL address??? am i wrong???
IP Address
I just added an option to send a text message to my cellphone on my site... I wanted to know if there's a way to get a users IP address using ActionScript, so that I can get it in case someone decides to stalk me...
Raf
Help With Mc Address
i need to include a text that is in a external file (txt). I can call him from the _root, but when i try to do the load from one movieClip it doesn't work.
this is the code that i put in the button:
on (release) {
loadText = new LoadVars();
loadText.load("data.txt");
loadText.onLoad = function() {
texto.text = this.historia;
location.text = this.location;
};
}
thanks in advanced!
Get URL From Address Bar
How can I have actionscript read the URL that is in the address bar?
I have an if statement that needs to compare the url in browser to a variable.
Code:
if(!pagesURL! == aLink) {
this.onpagebg._visible = true;
} else {
this.onpagebg._visible = false;
}
Ip Address
Anyone has any tips or has done displaying ip address in flash?
i just need to display in a simple flash page the ip address or location of the person who is viewing this file?
thanks.
SWF Address
I need to use this one a site I am working on, unfortunately the documentation isn't very good and I can't find anything else...
has anyone used this that can give me a quick run down?
Thanks!!
Help With Mc Address
i need to include a text that is in a external file (txt). I can call him from the _root, but when i try to do the load from one movieClip it doesn't work.
this is the code that i put in the button:
on (release) {
loadText = new LoadVars();
loadText.load("data.txt");
loadText.onLoad = function() {
texto.text = this.historia;
location.text = this.location;
};
}
thanks in advanced!
How To Address An Mc In A Different Swf?
Starting my mother.swf the movieclip mc_picture is loaded as well. Also a special button.swf is loaded into a level.
Pushing a button in this button.swf loads grandchild.swf. And when reaching frame 10 of this grandchild.swf I want the MC, namely the mc_picture to go to alpha=50.
I placed the actionscript on the keyframe in the timeline.
_root.mc_picture._alpha=10;
I also used the "new name" 'mcp' for the mc_picture,
(as I had loaded it with:
_root.attachMovie('mc_picture','mcp',3);
_root.he1._x=400.3
_root.he1._y=275.1
What do I do to address my mc_picture so that it will obey?
Thanks for helping,
Aribert
IP Address
Hi
I was searching the web about IP address and found this:
http://www.flash-db.com/remoting/?se...tion/Geography (I don't know if there is a better one or not)
You see, in any page that this swf is on, we can have the users IP address but what about saving IP addresses??!!
this technology dosen't worth if we can't save the IP addresses...
Plese tell me if there is a way to save the IP addresses or if possible give me a better link about this issue that can save the IP addresses too
Regards,
Ali
Ip Address
I have come across a few sites that show my I.P address listed on their page. Would anyone know where would I be able to find a tut on how to do the same for my site?
IP Address
Is there anyway that flash can actually get the IP address of the user as a text string? or in any shape or form
Z
Swf Address
How to use it? Or can anyone point me to a good links or documentation thanks.
Media Server Vs. Interactive Media Server
Hi. What are the differences between the Flash Media Server and the Flash Interactive Media Server? Is there a comparison chart?
We need to do live streaming video on the web as well as AMF server capability. Thank you.
Getting The End Users IP Address
I have a loadvariable command to load a variable into a Perl script. What the client wants is for me to get the IP address of the end user. What is the AS to call up the end users IP?
IP Address Locking
what i mean about ip address locking is that can i do a script in flash to lock on a certain ip so that my swf would only run on a server with my specified ip address?
Address To Clipboard ?
Hi,
IŽd like to give my users more comfort and let them copy my address (in my .swf-file) to her clipboard.
Is there a function in actionscript like"copyToClipBoard" or something like that? All my books beautiful Flash-books donŽt have an answer for this problem.
Can you help me?
THANX
MX ADDRESS ERROR
Everytime I open the actions panel in Flash MX I get the bomb and restart with the message 'address error' .
I have talked to customer and tech support and Macromedia and think it is the worst support program I have ever dealt with in my entire life. I am personally offended by how I am being treated as a customer.
Any help would be grateful.
I am running OS 9.2.2 .
I hear the gurus hang out in here : >
Eric
ericthelight@covad.net
Variable To Address A MC
This isn't working, please help...I think Flash is reading the variable cliptoplay)as a mc instancename...
this is the code in maintimeline:
var played;
var cliptoplay;
played = "no";
cliptoplay = "clip0";
This is the code on button one, will play clip1 after current clip (cliptoplay) finishes:
on (release) {
if (_root.cliptoplay == "clip1") {
continue;
} else if (_root.played == "yes") {
_root.cliptoplay.gotoAndPlay("end");
} else {
_root.clip1.gotoAndPlay("play");
}
}
whats the proper way to code a variable in a MC name?
Variable To Address A MC
This isn't working, please help...I think Flash is reading the variable cliptoplay)as a mc instancename...
this is the code in maintimeline:
var played;
var cliptoplay;
played = "no";
cliptoplay = "clip0";
This is the code on button one, will play clip1 after current clip (cliptoplay) finishes:
on (release) {
if (_root.cliptoplay == "clip1") {
continue;
} else if (_root.played == "yes") {
_root.cliptoplay.gotoAndPlay("end");
} else {
_root.clip1.gotoAndPlay("play");
}
}
whats the proper way to code a variable in a MC name?
Bookmarking And Address Bar
Please visit:
http://www.miniusa.com/crm/main.jsp
Do you see their toolbar on the top?
(Back, Forward, Bookmark, URL)
How do they accomplish this bookmarking and obtaining the URL Address? Is this just a cookie technology? Are they creating new web pages with different flash movies in them?
Can anyone share how to create a textfield in FlashMX that reads the browser's URL Address bar?
Thank you.
Address Bar In Flash?
I want an address bar like the one in Internet Explorer. But in flash how do I do it. I want it so if I type in an address it will pull up that site.
No Buttons ... And Still Get No Address Bar?
ok i have this code
on (release) {
getURL ("java script:NewWindow=window.open('http://www.blablabla. html','newWin','width=475,height=375,left=0,top=0,
toolbar=No,location=No,scrollbars=No,status=No,res
izable=No,fullscreen=No'); NewWindow.focus(); void(0);");
}
but its set for on (release), is there a way to make it so that if my website is launched and a flash animation auto-starts it will still be in an address-less window?
Movieclip Address
I have a movieclip(a) which can be loaded from any other movieclip, which could be anywhere in the main movie. When movieclip(a) unloads, I want to continue playing the movieclip that called movieclip(a). Is there an easy way of doing this? The only way I can think of is to somehow find the absolute address of the movieclip which called movieclip(a), but I dont know the commmand for doing that? Can anybody either tell me an easier way of doing this, or the command for reading absolute addresses of movieclips. Thanks
Address Error
Although I've reinstalled MX and reinstalled it, I keep getting the same annoying error when I try to access the Actions palette. "Address Error" and it crashes my system.
Is there anything that I can do about this? Not being able to script is severely setting me back on some freelance projects.
|