AS3 :: Php - Retrieve And Set Page URL From SWF
Jan 2, 2012
I have seen more than a couple of sites using flash content and displaying it based on the URL string.
For example, accessing http://domain.com/ loads the site normally and the SWF object displays the home page and sets the URL to http://domain.com/#/home. Then accessing the About section sets the URL to http://domain.com/#/about
Also, if accessing http://domain.com/#/services directly (from the browser's address bar), loads the site and the SWF displays the Services section automatically.
View 1 Replies
Similar Posts:
Jun 20, 2009
above.the .swf is already embedded in html page. and i have couple of buttons from .swf file and how do i call call the html page with the button inside .swf file
View 7 Replies
Jul 23, 2009
How to retrieve xml data in an aspx page after sending it using URLLoader.load
This is the flash code i am using:
var urlLoader:URLLoader = new URLLoader();
urlLoader.dataFormat = URLLoaderDataFormat.TEXT; //tried by giving VARIABLES also urlLoader.addEventListener(Event.COMPLETE, handleComplete);
urlLoader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
[Code]....
I were able to accept data in above statement when i send a string in var1 say "test". But on sending xml above error is getting.I have tried to load the xml data in XMLDocument also.
In AS20 i used sendAndLoad method to send and reterive xml data.
View 2 Replies
Jan 26, 2009
i'm trying to build a flash site and ran into a problem... i have a gallery page with a bunch of page numbers at the top. when you click on one, a movieclip loads of some images coming in.so the problem i'm having is that i made a little animation for when you roll the mouse over the page number (they scale up when the mouse is over, scale back when the cursor moves away)... what it's doing is when you roll over, it goes to a certain frame in the timeline and plays that animation.that's all working cool, but i need it to not do that once it's clicked on. so basically when you actually click on a page number, the over script should stop until you go to another page... here's the code i've written,
function over(event:MouseEvent):void {
this.gotoAndPlay(30);}
function out(event:MouseEvent):void {[code].....
View 0 Replies
Jul 1, 2010
I have a master page and a child page and have placed the javascript code inside the child page for flash movie.
The problem is the movie seems working when there is a alert on, without at least one alert msg, the code does not work, I am sure you people can solve, I can see that the following code works well in both Mozilla and IE, but only if the alert is ON, if I put it off, then the code does not work. Can anybody tell me what is the workaround :
[Code]...
View 2 Replies
Aug 5, 2009
I have this XML data that is coming in and am unable to find out why it will not match a image name with the requested name. It seems to when traced to be showing [object Loader]. I tried converting it to a string, but it will not accept the attribute as a string[code]...
View 5 Replies
Jun 12, 2011
I have an AxShockwaveFlash object in a Windows Forms application, and load a (AS3) movie into it with LoadMovie. The movie plays correctly, but I am having a problem getting a variable from flash.I have tried using GetVariable but it always returns an empty string. How can I get the value of a variable from flash?
View 2 Replies
Jul 12, 2011
an easy answer for 99% of you. I have a custom class 'Users()'. In PHP I have all the values being populated correctly. When I go to Flash Builder - and do the test function - All the data comes back properly. However, when I click a button and refer to the lastResult property of the CallResponder - it comes up NULL the first time, and then if the button is clicked a second time it will return the correct result. What step am I missing? I had the same problem with something simliar last night and am getting BEYOND frustrated - especially since I know it is some SMALL detail I'm overlooking.So just for clarification - lets say there is a button named button1So button1's click handler:1) Validates the text input properties2) Asks the server if that user and password match3) If they do - then I want it to grab all of that specific users info and put it into a User class. Again - when I test this function/method from within Flash Builder all the values come back as they should. It's just on the first button click they come back NULL...he second click they populate fine - I.E.-
Alert.show(currentUser.userFirstName); (First Click - NULL)
Alert.show(currentUser.userFirstName); (Second click - "Jack")
View 1 Replies
Aug 4, 2011
How can I retrieve all MC in a Stage?
I want to call addEventListener for all MovieClip present in my stage and if it's possible in a selected frame number of my scenario[code]...
View 2 Replies
Oct 22, 2009
for example:
var retrieveMe:String;
box_mc.addEventListener(MouseEvent.CLICK, boxClick);
function boxClick(event:MouseEvent):void
[code].....
View 5 Replies
Nov 20, 2009
well after I made all of the conditional statements I came to the conclussion and the annoyance that I cannot retrieve the statements value, I need help:[code]it does not return the value.. why?
View 5 Replies
Aug 18, 2010
ActionScript Code:
package com
{
[code]....
View 5 Replies
Feb 21, 2011
I have a MovieClip and need to get the drawing information from the graphics property. Is there any way to retrieve an IGraphicsData vector from the graphics property? In fact is there any way at all of retrieving the drawing information?
View 2 Replies
Mar 21, 2011
basically i have a custom function for the array class. and within it i can refer to the aarray by using "this" however in a trace statement i want to be able to get the name of the array.
Code:
// i think getDefinitionByName() might be of some kind of help.
var myArray:Array = [1,2,3,4,5]
Array.prototype.functionName = function(){
[code]....
View 6 Replies
Jul 26, 2011
Is it possible to retrieve the name of an XML node and his successors?
I wanna do a news program in flash that interface with an XML file.. The flash program have to inserted text and images retrieved from XML[code]...
View 5 Replies
Mar 17, 2009
1. Create a XML/PHP driven menu that uses PHP to generate a XML file with database results.
2. Use flash to retrieve the XML and dynamically add movie clip, menu buttons that have label values, IDs, and whether or not the menu item is published from XML, to the menu.
I found some code from a tutorial that took XML data and added a movie clip to the stage, added a label, and an ID; however, I could not get it to get a URL property to the button and initiate the navigateToURL to actually get the unique variable to come from the XML to each instance of the button. I have attached the ZIP file with the original tutorial AS file.
View 3 Replies
Feb 9, 2010
i want the value of "newAngle" to be accessible outside of this function.
I am doing something dumb i'm sure....
Code:
function aim(e:MouseEvent):void
{
adj = mouseX - gun_mc.x;
opp = mouseY - gun_mc.y;
[Code].....
View 6 Replies
Jun 26, 2009
I am getting a very strange error:
error I get when trying to execute static function createDeadShip in Deadship:
Quote:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at global$init()//references to the line public class DeadPlayerShip extends DeadShip
[Code].....
This is truly the strangest error i've ever seen.
View 16 Replies
Feb 4, 2010
I am trying to access data from an array. The array is in the root and I am trying to get it's data into a submovie. In as2 it would have been:
mylabel.text = _root.myarray[1];
So, i have tried:
mylabel.text = root.myarray[1];
and
mylabel.text = (this.root as Array).myarray[1];
and tons of other configurations.. I get the 1119 error no matter what i do. I am beginning to think I just can't get the info from the array in a sub movie..
View 1 Replies
Feb 20, 2009
I am using the setStyle to set the text label on some buttons in flash. AS3.Set font to bold and color to red. myButton.setStyle ("textFormat", redBoldFormat);I do this on as part of a function when the button is clicked.Is there a way to retreive the textformat settings (like bold, etc) so I can un-set the format? I have 5 buttons, when one is clicked, it goes bold and red.When a different button is clicked, I would like the previously clicked button to go back to "not bold" and "not red" and so on,
View 1 Replies
Jul 13, 2009
I will try to state this simply. If required I can post my code. I have created a class that extends the MovieClip. It is basically a retangular shape, with a color and a label that can be set via the "properties" concept. The label.text property is public.
I create a "new" object of this item (more or less a button) depending on reading an xml file.
If the file has 3 names (titles like "Lesson 1", Lesson 2" etc). I create a new "button" for each name in the xml file.
so I can get 3 instances of the object on the stage. Which I get. I create each new object like this:
var link:linkBase;
var menu:linkBase;
I use a for loop to read the xml data, and create the instances:
for ....
menu = new linkBase();
// i try to give it an instance name like the
menu.name = xmlList[i].name // name = "Week1", "Week2", "Week3", etc
i push the menu object into an array like this: nav_button.push(menu), in the for loop.
I can draw the three objects on the stage. I have a stage listener that will trace the target name if I click on the instance. I get "null" if I click off the button. My problem is that I get the target name for only the second and third instances, and not the first. If I comment out the menu.name line, and click each instance on the stage, I get "instance9", instance12, instance15. So I know there are three objects there.
I can do something like this to get a name on the first instance: nav_button[0].name = xmlList.week, or hard code a string like "Week1".
But I want to be able to do this in a loop of some sort. I am trying to create a user friendly name for each instance, so I know what I am clicking on, and take action depending on the name "week1", "week2" etc.
what I am missing in terms of naming a instance on the stage?
View 3 Replies
Oct 25, 2009
I would like to retrieve a value from a function(e.MouseEvent)?
[Code]...
When not, which solutions does replace this attempt?
View 24 Replies
Jan 23, 2010
Inside my loop, where i get my XML objects I added a code to draw and add the mask:
var myMask:MovieClip = new MovieClip();
// settings for width height x y color fill etc etc.
myMask.name = "NAME-"+i; // set the NAME
myContainer.addChild(myMask);
myContainer.mask = myMask;
the mask looks fine on the stage.now since i name it, i want to use it for other purpose like moving it now i want to actual call myMask
i get my number "num" from other function, that works fine
function applyMask(num:int):void {
// need to call myMask("NAME-"+num)
}
i have tried myContainer.getChildByNamehave tried:
var masking:myContainer=getChildByName("NAME-"+String(num)) as myContainer;
i have traced for options i can think of myself, but all result no property found.
View 3 Replies
Feb 27, 2010
How do we retrieve data in a webpage for comparasion? I need to do this because I dont have complete control or curtain aspects and need to change menu tilte data ( French or English ) depending on what the Webpage Title data is displayed. I have serverside code in the title eg.{title} that will start with either "Welcome" or "Bienvenue".
So I need to retrieve the first word or amount of characters compair.
if var webpdata =="Welcome" then var menuitemdata=english
else var menuitemdata=french
The above is just a idea and not actuall script of course
View 3 Replies
Oct 18, 2010
I'm doing an order form, where the user can input his contact information and then choose a product in a dropdown menu.Untill now, I just gave the dynamic text fields a variable and used this code:
on (release) {
form.loadVariables(order.php, POST);
}
[code]......
View 5 Replies
Apr 5, 2011
I'm trying to retrieve values from AS2 to AS3. Here's my codeAS2
code:var as2Txt;as2Txt.text = "My text!"loadMovie("as3.swf", mc_holder);AS3 code:var as3Txt;as3Txt.text = _root.as2Txt;//
View 1 Replies
Jul 15, 2011
I have this simple xml i but when i run it i dont see anything traced even though there is no error message:
var myXML:XML;
var nodeId:Number;
nodeId = 25;
var myLoader:URLLoader = new URLLoader();
[Code]....
View 18 Replies
Feb 25, 2012
I am trying to place a condition statement so that it will only do an action if the swf loaded into the varaible is the same or empty. I start of with loading the sample1.swf into the movieclip swf_holder
Code:
var loadSwf:Loader = new Loader();
swf_holder.addChild(loadSwf);
loadSwf.load(new URLRequest(sample1.swf));
loadSwf.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);
In order for me to get the sample1.swf to play, I create a variable so that I can just call on it
[Code]....
View 1 Replies
Apr 15, 2012
here's the thing, i need to store different values in a 2d array (or something conceptually similar). The idea is to create a 2d map with tiles and the array would save the ID of every tile in the map. I'm trying to create something mildly efficient, specially because i need to save some memory usage for later use (it has to do with AI) and it must run on a low end PC, but simply creating an array seems to be a waste of space since i only have about 50 different IDs at any given map.i thought about creating a 2d array of 8bit chars would be sufficient, but that's out of the question with actionscript 3, it doesn't have 8bit char data type.
View 1 Replies
Sep 30, 2009
I use flex and php to retrieve information from my sql database. What i have been doing is formatting the result from the database query into xml and then putting the result into an arraycollection. It all works fine except one of my database fields contains a lot of text that website users enter and as xml doesn't like tags like <> so I leave it un formatted but I would like to format it. Would I be better using flashvars or text than xml? Or is there another way?
View 3 Replies