ActionScript 1/2 :: Watching For A Variable In An External Swf
Feb 15, 2010
I'm trying to load an swf game, and then repeatedly run a check to see if the game has ended by accessing one of it's variables. Reading the forums and searching the web has gotten me this far:
[Code].....
"testing" appears on the output window so I know it's being loaded correctly, the game is also playing correctly. When I run the game in debug mode, it shows that the variable _level2.LOCAL exists and has a value, but the main loop just keeps kicking out "undefined."
View 1 Replies
Similar Posts:
Mar 7, 2009
I'm currently working on a portfolio site, which, among other things, loads external swf files into the stage. The problem starts when I load a 400x300 swf file into the stage, which is 900x800. The result is that I get all objects which are outside the stage area in the loaded swf, on my main stage. I tried everything from changing the width and the height to loading it into a movieclip. It's always the same, I get all the elements from outside the stage of the loaded swf (if I try to change the width/height, the objects outside the scene still remain) This is the code I'm using to load the external AS2 swf:
[Code]...
View 2 Replies
Mar 19, 2008
Is there a way to find out when someone is watching to the swf? For example i have a swf loader but it preloades all swf behind each other [swf]-[swf]-[swf]
I can slide between each [swf] but the swf contains animations, they start playing when he preloads the [swf]'s. Is there a way i know when someone is watching the swf and then start the animation?
My first solution was a onmouse but it doesn't work when you don't have your mouse on the [swf].
View 1 Replies
Sep 8, 2009
In my flex app I have a public bindable property.I want it so that every time the value of that property changes, a function gets triggered. I tried using ChangeWatchers, but it seems those only apply to built-in components like a text box change.i would like to do that same behavior with a property that changes at runtime.
View 4 Replies
Apr 9, 2003
How can I get my preloader to look at the size of individual clips?I have taken the percentage preloader code from this site and simply added the instance name of the clip I want to preload, but it doensn't work?
bytes_loaded = Math.round<b>(_root.images.</b>getBytesLoaded());
bytes_total = Math.round<b>(_root.images.</b>getBytesTotal());
getPercent = bytes_loaded/bytes_total;
[code]......
View 1 Replies
Nov 15, 2011
how can I find that on server side which user is watching a stream
View 2 Replies
Jan 10, 2012
I'm using a regular flash video player to play rtmp streams hosted on a cdn. Does anyone know if it is possible to get a count of the number of users watching a stream, through actionscript or flash?
View 1 Replies
Feb 8, 2010
I have 2 movie clips, one being loaded into a container MC via "loadMovie();"In the main movie there is a variable with no value, in the external movie there are 5 frames, each with a value to update the variable in the main movie.
IE: if on frame 1, global value = 1 / if on frame 2, global value = 2 / etc etc I'm familiar with passing variables INTO an external swf, but am stumped on how to do it the reverse way.
View 1 Replies
Aug 26, 2009
I've got a page laid out that houses a nightly live webstream of music at a venue. Every night (except Sunday) the stream turns on from 8pm-2am Eastern Standard Time. Some nights, I notice there is nobody watching the stream, yet the stream plays everyday no matter what. In the interest of saving bandwidth per month, I'm trying to figure out how to only stream if somebody is watching.So basically the camera would be recording locally, and when someone connects to the website something tells the server to start broadcasting. If the person leaves, the server stops broadcasting. Has anyone ever tried doing this? I'm using Influxis for my media streaming and they've assured me I can execute server side scripts.
View 12 Replies
Nov 12, 2009
I would like to put an eventListener on an ArrayCollection's length proprety, but I don't know how to go about this.
I want to do this because I only want code to execute when a certain number of things are in a certain ArrayCollection. I want Flex to wait to execute this code over the next object until that length property drops back to an acceptable level. I think I should do this with events instead of a while loop that sits there spouting NOOPs forever (which I don't know how to do either).
View 2 Replies
Nov 14, 2011
So I'm having a problem with AS2 when loading a netstream video.[code]I can actually listen to the audio in background but for some reason I can't see any picture. I tried with only a video object without a movieclip, and the other way around and the result is only audio, no video whatsoever.
View 4 Replies
Sep 8, 2003
I want to load an external variable called name from a text file into a local variable in flash called my_str...here's what I have:
var loadText = new loadVars();
loadText.onLoad = function(success) {
if (success) {
[Code]....
I need to have the variable my_str available outside the function..
View 3 Replies
Sep 10, 2003
I have a LoadVars object called loadText in which an external variable is loaded from a text file. Now, the whole thing works, I just want to create a template to optimize the system, so here is what I need: The external variable (in an external text file) is called page1. I am assigning that external variable to a local variable (at this point the external text has already been loaded in loadText, of course):
[Code]...
View 2 Replies
Nov 28, 2010
It's natural for users to find something interesting and record it when subscribing to a live video,
but so far I can only record it when publishing,
View 14 Replies
Dec 5, 2010
I have Windows 7, 64bit and Flash V 10,1,102,64My problem is with watching a Ustream live webcam on an Eagle nest in Maine, USA,Whilst I can watch it, the streaming keeps on and on buffering, or just stopping and starting. I don't lose the picture but it plays and freezes and then plays and freezes every few seconds. It's off more than it's on.Is there something wrong with my version of Flash, my video card, my computer? I've tried it with Internet Explorer 8, Firefox and Google Chrome and still have the same issue
View 3 Replies
Dec 16, 2010
When I set a breakpoint and debug my application, Flash Builder 4 is not displaying static variables within the variables window. I'm using flash builder 4 to execute flex unit tests on one of my AS3 classes. I set a static variable within the [Before] function, which is accessed in each of the tests. I've set a breakpoint within one of the tests to see why it is failing, but I notice that static variables don't appear when I expand the 'this' object within the variables window. (In this case my static variable is the only variable associated with the class, so the only object in the variables window is the "this" object). How to make static variables appear in the variables window?
View 2 Replies
Apr 6, 2009
HI installed flash media server 3.0.4 on a Windows 2003 server.I am using the default LIVE application and broadcasting to it using FME version 3.0 Inside FME I choose MP3 as the audio codec, stereo and 128kbps When I watch the stream everything works fine but after a minute (sometimes 2 minutes) the sound disappears and I can only see the video run.If I refresh the page that contains the SWF that plays the stream then the sound works again but then again after a minute the sound stops and only the video continues to play. It is important to say that this only happens when I play a live stream from a server that is located outside of my local LAN. If I play a stream from my development FMS server in my local LAN this problem doesn't happen using the same SWF and same settings in FME.Moreover, if I use the nellymoser audio codec then everything works fine and this problem doesn't happen also. The thing is that I want to broadcast a live event and it is very important that the audio sounds good (stereo and 192kbps) and if I use the nellymoser codec the results aren't that good.
View 5 Replies
Oct 20, 2010
I just received a new Dell Studio. I have the latest Flash installed. I can view Flash websites fine, and I can watch videos on all sites... except, [URL]. In fact, the video loads and a picture is displayed. The problem is that the picture is badly distorted. See the screenshot below. The top of the image is crystal clear, but the bulk of the video can not be viewed. This is different than the other threads with Flash/NHL problems. I can see something, and hear the videos fine. but... Its as if the video is in digital purgatory.
View 2 Replies
Oct 4, 2010
I've managed to publish video now: ns.attachAudio (mic);ns.attachCamera (cam);ns.publish ("name","record"); But without time information.
View 22 Replies
Dec 9, 2009
I have a problem with my AS3 files .I'm loading an external SWF, from that SWF I need to change a Boolean var that was set in a DocumentClass.My main DocumentClass is:
Code:
package {
import org.papervision3d.materials.special.CompositeMaterial;
import org.papervision3d.materials.WireframeMaterial;[code]..............
View 2 Replies
Jun 15, 2009
Trying to Change a value in a external swf file.
have a Dynamic text field called
text1 in the externalfile
in the main movie I have var my_loader:Loader = new Loader();
my_loader.load(new URLRequest("Menu.swf")); then I have in a function on a button click:
function loadMenu(event:MouseEvent):void [code]...
My Question is how can I change the text property in the external .swf file ?
View 1 Replies
Mar 12, 2010
I want to pass external XML a variable. How do I do this?
WHAT I'M AFTER
- update my variable with COUNT XML
WHAT I'M NOT GETTING
- The integer to String values
- How to pass XML to a variable
time.xml
<?xml version="1.0" encoding="utf-8"?>
<SESSION>
<COUNT TITLE="starting position">-77777</COUNT>
</SESSION>
[code]....
errors:coercion errors and null references with anything I attempt.
View 1 Replies
Jun 24, 2009
I've created a Flash video player that I regularly embed into HTML pages and use flashvars to update the path of the video to be played. The variable that I reference is named "videoURL" and is passed as a flashvar using "'flashvars', 'videoURL=myVideo.flv,"
The problem that I am having is when passing that same variable into my SWF when it is loaded externally into a new Flash file. I load the child SWF into my main FLA using the Loader class and I am able to run a successful trace on my variable using "trace(MovieClip(loader.content).videoURL);"
Obviously, I can't overwrite the variable with "videoURL = 'newVideo.flv'" as I have not defined videoURL in the main FLA. So my question is, how do I target my child SWF and what method do I use to pass it a variable? I'd assume that the correct method would also allow me to call a function from within the child SWF.
I hope that someone can explain this to me as every "solution" I've come across either suggests using HTML or Javascript, references AS2, or simply doesn't directly address my problem.
View 7 Replies
Jun 17, 2010
I searched for external SWF and got 500+ results but i couldnt see what i needed.Lets say you have a basic SWF file which contains a ball whose instance name is ball.Is it possible to load this SWF and access ball by name?The issue i have is that lets say you have 12 different heads... I need to load these heads in when required.. but each head.swf has a sprite called skinColor. need my main movie to have access to the skin layer sprite so i can Tween it. SWFs have much more details, but the skin sprite is on the bottom layer... so i cant just "color tween" the entire SWF.
View 1 Replies
Apr 20, 2006
i have a gallery that when any thumbnail is pressed it implements the following variable:[code] Now im trying to acces that variable "thumb" in ProjectFrame.swf but i cant seem to do it. Anyone know how I can pass the variable out?
View 14 Replies
Apr 5, 2007
I think i am screwing up the syntax. let's say I have a global variable, like. _global.something = mymovie
And then, the code to load in the external swf.... loadMovie((something)+ ".swf", _root.ec); Well, it doesn't work, and I'm just not sure where to put the quotes, and how many parenthesis are needed. How do I use a global variable and access it for this loadmovie code?
View 1 Replies
Sep 20, 2009
I'm creating part of my code to only be executed if a textfile on my server says it's okay. textfile.txt = "Okay=1 or 0"
I can get it to display in a textfield, but I cannot figure out how to simply put it in a variable for further actionscripting..
So how do I get the text from my external file, into a variable:string?
View 6 Replies
Mar 18, 2009
If I have an external text file with a variable, (let's say it's called names) with a list of names,... how do I load that variable into an array in flash?. Does it have something to do with Split() to separate the different values on the list separated with commas?
let's say the external file is:
names=john, peter, veronica, alfred.
How do we load that in flash so we have something like:
[code].....
View 7 Replies
Oct 30, 2009
Im running AS2 on Flash CS4 for this: I've found a million posts on similar topics, but none seem to do what I want, even though I feel like its very simple. I've tried a ton of different codes and can't get anything to work. All I want is for Flash to pull a number variable from an external file, lets just say a txt for now. I then want to be able to use this variable for calculations within flash. The only thing I can get to semi-work is having a txt file that says MyNum=5 and then putting the following in flash: loadVariables("Test.txt" , _root);
If I trace the variable "MyNum" it will output the right value, but its as a string no matter what I do. My most recent attempt to get it to be a number is to put the following on a later frame:
var NewVar:Number = MyNum;
var NewVar2:Number = NewVar + 1
trace(NewVar2);
Despite hardcoding multiple variables to be numbers, the output I get is 51, which means its still displaying as a string. My other issue is that you have to wait several frames before the variable is recognized. Do you have to wait numerous frames to use these loaded variables? If so, is there a way I can code it so that flash will just wait until it has the variable before moving on? I can't seem to get any loading function to work for it, but I don't just want to pull my next action down the timeline some arbitrary number of frames and hope its enough for flash to pull that number from the file.
View 10 Replies
Aug 6, 2010
I have an external log file which name changes each session, with the format XXXXX.log
I need to load it inside a swf to show its data, but each time the logs name is different, I need to open the .fla, changing the name of the file and then republishing the swf.
So I have made a simple script to load another .txt, to type manually in it the 5 number of the logs name and load it externally inside the swf:
Code:
var logNumLoader:URLLoader = new URLLoader();
logNumLoader.dataFormat=URLLoaderDataFormat.VARIABLES;
logNumLoader.addEventListener(Event.COMPLETE, loadedLogNum);
[Code]....
While I cannot assign the value of logNum to the last function, the .log cannot be opened.
View 2 Replies