ActionScript 3.0 :: Variables Passed Different To FP9 Versus FP10?
Sep 20, 2010
I have been using the flashvars from swfobject for a long time to pass info into my swf for specific outcomes. I am just starting to publish everything using flash player 10 and wasnt able to get my variable to be seen by the swf. maybe i was doing something incorrectly with this new file? but i then took code from my older files and they didnt work either... then i published down to flashplayer 9 and it worked perfectly... ???
i am using swfobject 2.2 and my code for passing the flashvar is
I am trying to use the tutorial on this site to create a simple form submission to my database via ASP. I couldn't open the sample - I am on MX. But I followed the steps on the webpage.My variables are not being passed. All of the Response.Write statements in my ASP page are coming up blank.So I have the 3 input text fields. I specified each with the same variable name as used in the tutorial (fname, lname, email, message). I also used those same names as the instance names but that didn't help so I've deleted it. So currently there are no instance names, just variable names.And then there is a submit button with the code from the tutorial:
I am trying to use the tutorial on this site to create a simple form submission to my database via ASP. I couldn't open the sample - I am on MX. But I followed the steps on the webpage. My variables are not being passed. All of the Response.Write statements in my ASP page are coming up blank.
So I have the 3 input text fields. I specified each with the same variable name as used in the tutorial (fname, lname, email, message). I also used those same names as the instance names but that didn't help so I've deleted it. So currently there are no instance names, just variable names. And then there is a submit button with the code from the tutorial:
Basically, I have an XML object which is pulling layout variables, and then those variables are being passed to another XML object which is sourcing some video thumbnails.And its actually working fine, but only after some tinkering. It seems that the passed variables have to be redifined in some fashion within the scope of the new function.It might be easier to explain with the code:
function makeGrid(backwidth, thumbHolderX, thumbHolderY, numCols, tSpacing) { trace(backwidth); trace(tSpacing);both trace just fine but (See spacing variable below)
I'm using swfObject to load my flash. I need to call a function or pass new variables into the flash file without it reloading. The user clicks on a button and the flash text needs to change. I have it working but it reloads the flash file and looks very choppy.
I'm having a bit of a problem with external vars and timing.I'm building a custom FLV player. In the parent HTML I have some boolean variables that I'm passing to the SWf, stuff like autoStart and loopPlayback.[code]The problem is that line gets executed before the external var gets in, I think. If I place a dummy var at the top of the AS then everything works fine. And the external var is definitely getting passed in, I have setup a check for that.I would need something like loadVars.onData ...but I'm not using loadVars, I wnat the vars to come in from the SWFObject HTML, or maybe a query string.
pros and cons of either using a Singleton that enforces only one instantiation of itself, versus creating one common class with static vars which can be accessed by all other classes that import it?
In my testing, importing but never instantiating works fine. I can even change the value of one of the variables and then have another class see that changed value later on in the program.
If I *know* I will never actually create an instance of my Global class using the New command (but will instead just reference the variables using the class's name), then why should I need to make it a strict Singleton?
I'm basically trying to extract a series of variables that are passed in URL from another flash movie. I have researched flash vars and the like and didnt really get far.[code]I was able to get the URL into Flash!So flash now has a variable called "section" that holds a string like this.url...My question is; how do i get the values held in each of these days, weeks, years, etc into a format that can be used with in the flash movie. Ideally into seperate variables where the values can be returned in a textbox.
I'm trying to create an application that receives variables passed through FlashVars and makes use of the new TLFTextField. I have run into an issue with accessing the FlashVars after declaring a TLFTextField variable.
The code I have is as follows:
ActionScript Code: import fl.text.TLFTextField; var tf:TextField = new TextField();
[code]....
The HTML file is passing a FlashVars value of "title=ThisIsTheTitle" If I run the code, the tf TextField is empty. If I comment out the last line that creates the TLFTextField, the FlashVars come through fine and the tf TextField displays the "title" variable that was passed through FlashVars.If I change the last line to read:
ActionScript Code: var titleTLF:TextField = new TextField();
It works fine (the "title" variable from FlashVars is show in the tf TextField). I don't understand why delcaring a TLFTextField prevents the FlashVars from being accessed.
I'm having a little trouble with my move to as3, (surprise surprise huh?) Basically when I create a movieclip, I wan't to pass some values into it, like so:
What is the correct syntax to initiate a function in a class similar to constructing an associative array? I have a function that's custom variables is ballooning out and I'd like to label them in the call for sanity sake.
Anybody notice any issues when resizing windows that are embedded using the new "gpu" wmode? Like a noticeable lag and some scaling issues for about a second before it fixes itself? Its not a big problem but it is a lot less smooth than previously...Edit: I threw together a quick demo so you can have a look. I'm working on a site and it really has to use the new gpu wmode since it improves the performance quite significantly.
So I am learning AS3 slowly.First project in it.I am having some troubles. (I know I need to learn to code class based, working on it, familiarizing myself with some of the basics before I change my style completely).I have set up my stage to have four instances of a movieclip named silverScreen0 - silverScreen3.Each of those has a content layer in it which I am dynamically loading an identical swf.I then have a mask I put over each clip so that it only show a specific area.
-First issue comes up that hte fourth mask seems to move/distort on load, as you'll see in the swf.
-Second issue comes up when the loaded swf comes in ... the mask seems to shift if the swf has a motion animation, click the second white circle above chapter1 to see this.
-Third issue comes up when I move the content layer inside of the silverScreen# clip ... the mask seems to move as well. No example of this but if you download the source files you can see it.[code]
Flash files I embed have faulty plugin detection - it does not recognize FP10 as an upgrade from FP9. This is in the knowledgebase, but it does not suggest a solution. "Some websites will ask you to install or update Flash when you already have the Flash 10 plugin installed. This is not a problem with your Mozilla browser or your Flash plugin, but with certain websites that misidentify Flash 10 as Flash 1 due to a faulty detection scheme. Contact the website and ask them to correct the problem or, on Windows, you can try the site in Internet Explorer, since the Flash ActiveX detection may work even though the plugin detection does not."
I'm messing around a bit with the new fp10 drawing api and drawtriangles. i've created a little something i think is kinda of cool, though i can't seem to get the uv-mapping working as i want. since i'm just moving points in z/y direction i don't really have and z-value to calculate the uv with. though the bitmap texture gets distorted. i've tried to calculate a "fake" z-value with x and y, but since my maths skills are terrible i can't really get it to work.
i've thrown together a little sample here below (code obviously needs cleaning up, but i'm gonna worry about that when i've got it working as i want to). in this example z-val will always be 1 and no perspective fixing will be done. so i really need your to figure out how i can take my calculated x and y point and turn them into a "fake" z-point and use that to avoid distortion in the map/texture.
i'm messing around a bit with the new fp10 drawing api and drawtriangles. i've created a little something i think is kinda of cool, though i can't seem to get the uv-mapping working as i want. since i'm just moving points in z/y direction i don't really have and z-value to calculate the uv with. though the bitmap texture gets distorted. i've tried to calculate a "fake" z-value with x and y, but since my maths skills are terrible i can't really get it to work.
i've thrown together a little sample here below (code obviously needs cleaning up, but i'm gonna worry about that when i've got it working as i want to). in this example z-val will always be 1 and no perspective fixing will be done. how i can take my calculated x and y point and turn them into a "fake" z-point and use that to avoid distortion in the map/texture.
I can just create a new project, target Flash Player 10.2 and paste this into frame code:
[Code]...
The event never fires off. I look in the reference for StageVideo and I see it's available in Flash Player 10.2. What's up with this? edit: If I target AIR for iOS, this event does fire (I have AIR3.0 overlayed).
I'm trying to debug an old AS2 project that uses an old version of MDM Zinc and its driving me mad not having a decent debugger. Especially as I need to debug on several platforms,e.g by Zinc exe works fine in XP but not in Vista.I tried downloading the latest XRay stuff from GoogleCode but it doesn't seem to work as my player is the lastest FP10 I suspect that this could be the result of FP10 sandbox security changes to local connection.
PS. I did look at DeMonster debugger but I can only find an AS3 version
I have run into a small graphics glitch in Flash.It seems to be both in FP9 - Exported via Flash CS3, and FP10 Exported via the Flex 4 beta SDK.The glitch /problem manifests itself as embedded text at a small point size "blooming" under certian conditions.It basically looks like the antialiasing becomes fatter at some level of text brightness. I have made a small test case below. (Obviously) You will need to embed the Arial font in your compiled SWF for the below code to work.[code]You can see an example of the problem by rolling over the graphical element here: url..It's not really an option to change to AntiAliasType.NORMAL as it makes the text way less readable at this point size.
i'm having problems tweening 3d objects using the built in fp10 3d engine. i have a timeline tween that i want to create a tweenlite tween from and then duplicate it for other objects. i am using the bezierthrough plugin as well to tween along a path. i have used the motion editor in the ide to copy all values that change along the path into a tweenlite instance as follows:
We create Flash games which are embedded within third party wrapper SWF files, which are exported for FP9.If I create an FP10 SWF which uses classes specific to FP10 (Pixel Bender classes such as Shader, ShaderData), when I run them in an FP9 wrapper within an FP10 player, an error is thrown VerifyError: Error #1014: Class flash.display::Shader could not be found.I thought this may be something to do with ApplicationDomains - maybe the child SWF was forced into using the global classes from the parent SWF, but assigning a new ApplicationDomain to the child didn't make any difference. Is there any way to get access to these FP10 classes - or does the version of the outermost wrapper SWF always determine what's available to child SWFs? It seems odd that the FP10 classes are not available in a FP10 player.
When I target flash player 10 in flex builder 3, the index.html template along with some other files (history.js, etc) are removed and no wrapper html page is built.Anyone else experiencing this? I have an ant build script as well, but I was trying to run the built in fb builder.
As in subj. Is it possible to make a video player which will run on FP9 and when FP10 is detected use some of its features as Stage video API or pixel bender shaders?.I've tried to access FP10 classes via getDefinitionByName but it doesn't work
I'm making a simple drag and drop game, but the strangest thing is happening on IE with FP10: the sub-assets of the draggables shift their positions when the parent is dragged quickly.The mouseChildren of the draggables is set to false, and the cacheAsBitmap is set to true. And it functions beautifully on Safari and Chrome. This is client work, so I can't really post a link here without their permission.
I'm working on a Mac. Now I made a site and when I compare colors on pc I get a huge difference:s. My green grey looks like it's black. How do you manage to get the colors wright on both platforms? The calibration of my screen is perfect for print.