Actionscript 3 :: Flex - Get URL Of Current Page?
Sep 15, 2009How do I determine the URL of the current page from within Flex?
View 7 RepliesHow do I determine the URL of the current page from within Flex?
View 7 Repliesthere is no tags on flex paper. so make tag on flex paper.
How do i get the page number in flex paper. I want to add some events when page is changed.And i also want some events on particular some pages. so i need that current page number which is viewing by the user in flex paper.
I've embeded my swf file in .net application and after navigating to some pages in swf file and pressing f5 or refresh, its navigating to starting page of swf file and browsers path always shows the same path (main.aspx page) in which I am embedding the swf file. After navigating to some pages in swf file also it shows the sam path. So its refreshing the aspx page and giving the starting page. How can I control the browser to stay in current page of swf file.
View 9 RepliesI'm working on a pretty basic interactive children's book. I have it set up so that each page has audio relating to that specific page. Going forward, there is no issue with sound overlapping from the current and next pages. Going backward, however, there is an issue with sound playing on both the current and previous pages. How do I stop this?
Here is the script I'm using-
ActionScript Code:
stop();
import flash.events.MouseEvent;
[Code].....
I bought one of those templates, and i was able to get around most of the stuff. But one last thing that I have issue with is that there is an AS2 script for a button, where you can change the page that you want to be updated. But every time that I click that button, it opens the new page. but then if I use the same button in the new page, and click on it, another page will open and that current page will get closed.
[Code]...
I need to get the value from the current page url, (the value is sent by javascript)?
View 4 RepliesI need to sitelock a swf to All of the sitelock solutions I've found only lock the domain that the swf loads from, which means a user can still copy the source code of the page and load the page locally and alter the swf params (since the swf still loads from the same url
View 1 RepliesIs it possible to get page URL into flash ?
Without using ExternalInteface.call('window.location')
trace(this.loaderInfo.url) simply return URL from where flash was loaded.
I have built a pagination gallery and am having some trouble calculating the current set of pages from the current page (and whether it is the last set and if so does the last set have a full set or less than a full set).[code]...
View 2 RepliesI am building a flash component to be embedded on an html side - the flash will include buttons to 'share' - i.e. on facebook, twitter, etc. I want to be able to grab the URL of the page and put it into the coding on the button.
Currently the button says:
tweetbtn.onRelease = function() {
getURL("http://twitter.com/home?status=Check Out This Company at www.thiscompany.com",
[code]......
I have managed to create some buttons movie clips and understand how to link pages. The only question i have is how do you make the button/link for the current page highlight so the user can know what page they are on? Is there a way to have a current page indicator in flash as you can do with html/css?
View 2 Repliesthis is the first time I have used flash pro.I just edited the menu and everything works perfectly except for the highlighting of the link on the current page. If im on the home page, home is correctly highlighted. However after that it skips the next button (about). So when I am on the about page the next button (events) is highlighted.
View 4 RepliesI want to print the current page (web page) when user clicks on a button.
View 14 RepliesI am using a Flexbook which contains 2 BorderContainer. The code is shown below
<controls:FlexBook id="book" x="20" y="20"
width="100%" height="100%" horizontalCenter="0"
animateCurrentPageIndex="true"
showCornerTease="true" animatePagesOnTurn="true"
[Code]...
This code shows page1 as current page. I want to show the BorderContainer (id= page2) as my current page dynamically on a button click. I tried setting currentPageIndex = 1, but I get a blank page by doing this.
I want to highlight the current page in my navigation.
I have the code below (duplicated for each button on the page) which changes the colour of the text in the nav when you rollover and then back when you rollout. I'd like to have the text stay on the rollover colour if it is the current page.
I've been messing around with variables and have added the bit onto the onRelease function which displays the "page" variable in a dynamic text box. This works fine, but I'm now stuck on how to use this variable, everything I've tried hasn't worked.
I can understand the principle of what I want to do as I can do it in PHP or CSS. I need some kind of conditional statement, for example (in laymans terms):
if page equals 1 then make text colour red or if page equals 2 then make text colour red and so on...
Code:
var up = "0xC5B9B3";
var over = "0xC6006F";
_root.nav.button_1.onRollOut = function() {
[Code]....
whenever I put a link in Flash to another URL, the page always opens in a separate window. How do I change this?
View 1 RepliesI currently creating a website which content some pages. example of homepage and aboutpage.I want to make it as below.
If the user clicks the 'home_mc' button i want it to disable to the content cant be loaded twice. If the user clicks 'products_mc' i want 'home_mc' to be enable again, and then disable 'products_mc'.This to prevent user to currently reading on homepage when click on the home_mc button again will cause the homepage animate in again.
but i still cant figure out how to make it. can we use some code like
if(nextPage == currentPage)
{
//disable the mouseEvent listener of the currentTarget button?
}
[Code].....
how to copy current page's URL in clipboard on Right-click menu like they do in in2media website? Also I noticed that they incorporated Back and Next options in their Right-Click menu.(Is that possible only by using Flash?)
I already use SWFAddress in my project for DeepLinking and I am aware of the ContextMenu class.
Any way to work with .swf files exported from InDesign (with page curl effect in tact)? I'd like to add a zoom feature, and need the ability to keep track of the currently viewed page.
View 5 RepliesHow to find current page url from flash without calling javascript function. I was trying to get the url of the current page where my player has been embeded. I wrote this function.
function getCurrentUrl():String{
var Url:String = ExternalInterface.call("function get_url(){return document.location.href;}");
return Url;
}
This function works in firefox and chrome but doesn't works in IE.
I have a button that animates when you rollover and animates when you roll off. Let's say it is my home button. But I don't know how or what code to have so that my home button stays paused or stopped at the end of my rollover animation when the movie clip page associated with the button is currently displayed. And then if I click on another button like the 'About Us' button to make the 'about us' page load, to have my home button stop being highlighted when the home page is not displayed anymore.
So far this is my button code:
home_mc.onRollOver = function () {
home_mc.gotoAndPlay ("_on");
} home_mc.onRollOut = function () {
home_mc.gotoAndPlay ("_over");
}
I have a small flash tidbit that is basically used like a menu. It scrolls through the thumbnails left and right, when clicked the pages navigates to the appropriate location. However, the flash movie jumps back to the beginning of the movie. Is there anyway I can get it to stay in the same spot when the page is changed? I tried using iframes, but this did not work out, it had the same result. ref:[URL] to see the problem scroll the images to the right and select 'wall boarder buddy' (fourth image from the left) this takes you the page and the flash resets to its original position.
View 12 RepliesI have this code about navigation using movieclip buttons. I just made the currently selected button disabled when it is in the current page but I just cant figure out on how to maintain it in its hover state (It keeps on returning to its normal state).
Here's the code I've written on the first frame on the main timeline(scene1), I have 4 buttons namely mcButton1, mcButton2, mcButton3, mcButton4 and 4 labeled frames, page1, page2, page3 and page4.:
var page:String;
var btnArray:Array = [mcButton1, mcButton2, mcButton3, mcButton4];var pageArray:Array = ["page1", "page2", "page3", "page4"];
[Code].....
I have setup some nav buttons on my website. When I click one of the buttons, I want the current page to fade out, and I don't want the other page fading in until the first one is gone. This means I need a statement to go along with each button so that they all get rid of the current page, and don't fade in their respective pages until the first one is gone. Here is my current code:
buttons_mc.about_mc.addEventListener(MouseEvent.CL ICK,disappear);
buttons_mc.about_mc.buttonMode = true;
buttons_mc.about_mc.useHandCursor = true;[code]...
So, what do I need in order for this to all function correctly, once "home_mc" has reached its final frame?
So I know Flashvars uses a lot different methods in AS3 because of the loader classes and all that. How do I disable the button and make it only display the second frame to the button corresponding to the page that the user is currently on?I've called a variable in the HTML document using query string (or I could use Flashvars just as easy if that makes it easier) called "currentPage" and on each page in the HTML give it a page name.I know how to grab the variable from the HTML into a text field in the SWF (see this tutorial) but I'm having trouble manipulating my menu buttons.
View 0 Replieshow can make a button that makes the current page my homepage? im 99% sure there's Javascript involved and I've tried writing it my self P.S if its, I got one button to work (adding to favorites),
View 5 RepliesI have a .swf file containing a navigation bar and also an animation. I was going to use getURL on the nav buttons so that a different html page would launch onRelease. The animation in the swf file that contains the nav buttons plays as soon as the swf is loaded and there's also a movie clip in the file which continues its animation even after the file has loaded and played. As each of the nav buttons are pressed and the correct html page loads, I don't want the entire swf file to reload and therefore play the entire animation again as it did on the home page, but instead I just want it to appear as though it's already loaded but I do want the separate movie clip in the swf file to continue to play. Is there any way to make this happen?
Also, I wondered what code I'd need to make the current page nav button appear in a different state to all the other buttons to make a "you are here" effect.
Is it possible to create a screenshot from the current page the user is on? (It's for an Intranet enviroment).
I know this is not possible with JavaScript alone, but is it possible with Flash or maybe an Java applet?
I have been searching around but I couldn't find anything.
I have 3 pages view,
HomeView
ViewPg02
ViewPg03
In HomeView, has a List control and when user select an item it will goes to ViewPg02
[Code]...
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
width="1501" height="960" minWidth="955" minHeight="600">
<fx:Declarations>
[Code]...
i have a text inputbox in a config tab. when a user gives a input and click the "set new config" button it will go to a syatem where there will be a textbox.In thet textbox the prev input will be shown.how to do this?