ActionScript 2.0 :: Restricting/Allowing Navigation Between Pages?
May 29, 2007
Here's the thing. I'm implementing a navigation system into a project, that requires you to click a button, so that you may advance to other pages.it goes like this: it is a slide-based navigation system, with 4 buttons. To advance to page 2, on page one you must click a button, and so on. Otherwise, no matter how much you click the button linked to page 2, it will never work. And the cycle continues. I guess it's not all that easy to understand..so i've attached a link to the .fla [the file does not have any navigation restrictions
View 1 Replies
Similar Posts:
Mar 29, 2010
I think this can be really easy however i'm not reaching the answer of this question. i have text inputs .......and i want to restrict the input to only Numbers...mytextbox.restrict = "0-9"; now when i try entering the values it works fine.....but but.....i doesn't accept any special characters.and i want it to atleast accept '.' because i want to accept decimal values
View 1 Replies
Feb 13, 2010
How to do navigation via flash webpages by scrolling and scroll to exact place by pressing buttons ? this is example of navigation i want to do[url]...
View 4 Replies
Feb 28, 2008
I'm trying to create a site with HTML pages and Flash based navigation, which basically means that the site content itself is standard in HTML/CSS format, but the main menu bar with the buttons and all is an SWF file. Needless to say, each lit-up button on the menu bar has to dim out on release and take to the corresponding page, e.g. clicking the 'Contact Us' button would cause it to dim out (as if unavailable) and open the 'Contact Us' page. Clicking a different button afterwards, would re-light the previous button and dim-out the newly clicked button and take to the page that corresponds to the newly clicked button, etc, you get the idea. There are 4 buttons for 4 pages.
Anyway, so far I've tried two methods which have failed:
Method A.
I exported four duplicate SWFs from the same FLA, with the only difference being the one unique button dimmed out and the other three lit up (a total of 4 combinations). Then, I put a different SWF on each page. This, the 'Contact Us' page would have the copy of the SWF with the 'Contact Us' button already dimmed out; the 'Home' page would have the one with the 'Home' button dimmed out, and so on. The obvious problem with this approach is that an SWF needs to load over again every time the page changes, which results in a brief, but, nonetheless, annoying enough blink. I hoped to combat this latency issue by loading all bitmap elements in the flash files externally, as opposed importing them to the library. I assumed that since all SWF copies accessed the exact same bitmaps from the exact same location, they would be cached in the memory somehow and not need to be loaded every time, so there'd be no latency. Then again, I was two days younger. This method failed. As Eric Bogosian's character said in the movie Under Siege 2, "Assumption is the mother of all" (you-know-what-ups).
Method B.
At a couple of other message boards, I was suggested another technique, which would require only one single SWF. A guy gave me a tiny peace of Java Script that would use a variable to inform flash about which page is called so it would know which button in the menu bar to dim out. Although this technique rid me of the necessity to use multiple SWFs, it didn't fix the nasty blinking problem AT ALL!!!
Method C.
I was also advised to "put info in a div and generate server requests to bring the appropriate info up". "You need to use ASP or PHP or some other server language" he said. Well, ASP is absolutely out for me, so I won't even consider it. As for PHP, unless there exits a very simple and straight-forward tutorial with source files, which I could very easily figure out, modify, and implement for my needs, I can't get into it because since I don't know PHP, it takes me a really long time to learn how to do a simple thing with it, which is something I can't afford right now with my deadline and all.
Method D.
I basically want to put the page contents into an iFrame window. Even all drawbacks of using iFrames considered, I still thing this is the optimal way for me. So here's where I currently am on this:I learned how to change the iFrame content using a function. Here's a simple test example, and here are the HTML and JavaScript codes for that example:[code]What I need now is to be able to call that JavaScript function and pass it the URL argument using action script instead.
View 5 Replies
Sep 25, 2009
Making buttons that open another url is easy enough, but for some reason I'm having a huge amount of trouble having a navigation button open new content on my website, such as moving from the Home content to the Menu content (the layout is static, only one small section filled with content changes.
I think the issue is that I can't figure out how to code it due to the fact that there are a good amount of nested movie clips, I'm not sure how to direct it to the place and frame I want.
I couldn't quite uplaod the file, so I've got it on filefront here: [URL]
View 2 Replies
Apr 28, 2009
Looking for a tutorial to make individual pages (jpg or gif) into swf pages so we can add links in an on-line flip book. I have flash, but have not learned as of yet.
View 2 Replies
Jan 25, 2011
I would like to know how to track my pages with google analytics to see which pages are getting the most clicks. My site is XML / Flash the menu is xml. Could I put the tracking code on each of the menu items in the xml file?
View 7 Replies
Oct 3, 2011
I'm using FileReference to upload PDFs and PHP to email it.Is there any way to find out the number of pages within the PDF using either Flash or PHP?
View 5 Replies
Feb 5, 2010
I'm trying out a page-flip program that tells me to create the pages as jpegs within a folder named "pages" in the Library. When I try to run it, it tells me it can't find the jpegs. I can get it to work locally by including the full URL (i.e., "...My Documentsedinnerpartiesimagesp3-large.jpg), but I know this isn't embedded in the swf file.
View 1 Replies
Dec 6, 2009
Is there a way I can set a cookie or only allow an IP address to edit my XML with my SWF file only once a day?
View 1 Replies
Mar 7, 2010
I have a situation where my main SWF file loads many external SWF files. However, those external SWF files are just sitting in the public folder of the web server. Is it possible to restrict the SWF visibility to only my main SWF file (the one that loads the external SWFs). In the current state, any user who knows where to look can just type in the URL and get to the SWFs, not to mention rogue bots that don't follow robots.txt.The reason for this is very simple. Users user a username/password to log into the main Flash application and the main Flash application in turn loads the SWF files and ONLY then they are available to the user. Also, depending on who the logged in user is, some SWF files are restricted and not loaded.
View 2 Replies
Oct 21, 2009
My stage size if 300x300 and I have three movie clips each of size 100x100. So there will be three movie clips on the stage. Now my problem when I Click on one movie clip, the onMouseDown event handler of all the three movie clips are being executed. Is there any way for restricting the event handling to only that particular movie clip which was clicked by the user ..?
View 2 Replies
Dec 8, 2002
how do I make it so that the an object only follows your mouse between certain points? I have a square with the code startDrag("", true). Then I put an if then statement saying...
if(this._x <=200){
startDrag("", false)
}
View 12 Replies
Mar 9, 2005
I'm using this simple code to drag a clip on stage:
on (press) {
startDrag ("");
}
on (release) {
stopDrag ();
}
how I can restrict the drag to the X axis only?
View 7 Replies
Mar 6, 2006
As we have in other languages like C, Java that once we define the length of an array we cannot assign any value to the array beyond it's length.[code]This kind of stuff is not possible in C and Java.However AS2.0 calmly accepts the value and increments the length of ii (array) from 3 to 5.Is there any means to restrict the array to accept only particular number of data.
View 10 Replies
Apr 16, 2009
I know how to do motion guides, but now I also want to control this movieclip with actionscript code, so that I modify the x and y properties, but STILL restrict the position of the movieclip only to that motion guide. I see that once I modify the x or y properties, the movieclip jumps off the motion guide
View 1 Replies
Aug 13, 2009
iam tryin to create a login system .i want the username to b only "mayuresh"& password to b "mayuresh" blow is my code
stop();
go_btn.addEventListener(MouseEvent.CLICK,perform)
function perform (event:MouseEvent):void[code].......
View 3 Replies
Oct 6, 2009
I have created a website with one flash animation banner.The banner .swf has 5 menus. Each menu goes to different movieclips inside the .swf file. and at the same time i want to load the corresponding html file when i click the menu button and place the html content into the bottom area of the main html page without refreshing the html page.
View 2 Replies
Mar 24, 2010
I've got a website where I want people to be able to upload their own SWFs which are then displayed on the page - mainly for timed image displays etc...I'm concerned about javascript security as flash can call JS functions, theoretically if you knew which JS commands to call (e.g. some AJAX stuff) then external people could do some real damage.So my question is, is there anyway I can disable calling javascript from within flash? Possibly something in the embed object paramaters tags?
View 2 Replies
Jan 16, 2012
I have a TextInput field that should be restricted to either capital letters, lowercase letters, numbers and underscores. This is the code I'm trying to use to restrict characters:
restrict="A-Za-z½-9 \_-"
I'm using MXML for this Textinput component.
Unfortunately this does not restrict the character, which is the last character I'd like to restrict.
How can I add the backslash to the list of restricted characters?
View 1 Replies
Jan 23, 2009
I have an object that is being moved along it's x axis a certain amount each time an button is pressed. I want to be able to restrict the movement of that object along it's x axis so that it can not go past a certain point.
View 2 Replies
Jan 30, 2009
I am using loadMovie to load an image that a user has uploaded. If I have the loadMovie target as a movie clip of size 300x300 and the user loads an image of size 600x600 it does not restrict and scale that image down to fit within the 300x300 box.
Is there anyway to restrict this? Like setting the properties of the uploaded image to fit within the movieclip?
Another issue is that I am using the following code to edit the size of the preview pane (according to a users input):
ActionScript Code:
setProperty(_root.dimension_preview, _width, Number(_global.dimension_width));
setProperty(_root.dimension_preview, _height, Number(_global.dimension_height));
Now when I load an image into this it actually magnifies it by the amount the user entered, is there anyway to prevent it doing this?
If it is easier, I can upload the bits and pieces.
View 0 Replies
Feb 1, 2009
I'm working on an interface for our online courses using Flash 8/AS3. I have a little scrubber bar timeline, and I have the player head moving correctly, it's draggable, and works fine. I want to be able to click anywhere on the timeline and have the player head jump there. It works, but what's happening is that no matter where I click on the flash stage, whether I am over the timeline or not, it jumps to that time. The other problem is that if I click to the right of the timeline, it jumps back to the beginning. I had this all working in AS2, but AS3 is new to me.Here is the code for the timeline:
//////////////////////////
//---TIMELINE CLICKER---//
Controls.Scrubber.timeLine.addEventListener(MouseE vent.CLICK, clickMove);
[code].....
View 2 Replies
May 24, 2005
I've got a few text boxes address1, address2 etc which I've restricted using
address1.restrict = "A-Z 0-9";
All seems well if you input your address manually, but also there is an automatic feature on the web catalogue I'm working on, where you can enter your postcode and the relavent addresses will be generated in a scrollable list box. You can select an entry from this list box and click OK to confirm this is your address, which will then conveniently fill in all your address1, address2 etc input text fields.
But, when the addresses are generated in the list box they are not displayed in caps for example 92 Green Lane, Moston, Manchester. Like this... and so when you confirm your address each text box is filled in the same case, NOT in Uppercase like I've specified. Anyway to correct this once it passes the address variables into the text fields?
View 1 Replies
Apr 28, 2007
i'm trying to restrict the movement of a mc to the diagonal. so even if i click and drag it towards the x direction, it moves the corresponding distance on the diagonal which is, the 45 deg angle line.same with the y direction..so when i click and move the mouse haphazardly, all the object does is to follow it on the diagonal.But i just cant figure out the math for it. i mean, theoretically i think i need to use the x-component of the mouse when its angle is < 45 and the y-component when its angle is > 45. but how do i find those angles in flash?
View 2 Replies
Mar 3, 2009
How would I restrict double space but still allow single space in a text box?
View 1 Replies
Mar 6, 2009
My problem is that my final .swf is embedded onto an html page and stretches for the entire width of the users screen. This means that if they have a particularly high resolution, the width of the .swf file stretches significantly beyond the initial stage settings. I'm okay with this, as I really need the .swf to fill the width of the screen.
However, it means that the cursor is able to be pointed more than 100% left or right of the stage, causing the panning image to move further left or right than it should.
What I need to know is how to get around this. I'm assuming I could set a boundary at the left and right of the stage where the code wouldn't be active?
Here's my code:
Code:
this.onMouseMove = function() {
constrainedMove(bg_mc, 4, 1);
constrainedMove(fg_mc, 4, 1);
[Code].....
View 13 Replies
May 18, 2009
If number of characters in dynamic textfield exceeds 92, find the last word before that limit and put three dots(...) at the end
so, lets say this is the text, and there are 96 characters (I havent been counting but lets imagine it)
[Code]......
View 6 Replies
Aug 9, 2010
1. How do I prevent my scuba diver from leaving the screen? As when i hold either up, down, left or right long enough he will leave the stage entirely.2. How can I make my sharks enter the screen at random rather than having them enter from the same position each time? Here is my code:
(FOR MY SCUBA)
onClipEvent (load) {
xspeed = 10;
[code].....
View 3 Replies
Oct 12, 2010
I wanted to know how to restrict the number of viewers for an application. I tried this
{
if(application.clients.length > 10)
application.rejectConnection(client)
}
I put that inside application.onAppStart = function() - but it didn't work
View 2 Replies