ActionScript 3.0 :: Parent Directory - Navigating To Another URL

Aug 18, 2009

I am making a site, this site is in a folder, inside of this folder I have the index.html file and a load of other html files. I then have a folder, flashheader. with a flash header that has 5 tabs on it. When I click a button, I want to navigate to another URL, this URL being in the parent.

PHP Code:
tab1.addEventListener(MouseEvent.CLICK, myBtnClicked1);
function myBtnClicked1(e1:MouseEvent):void {
var url:String = "../index.html";
var request:URLRequest = new URLRequest(url);
try {
navigateToURL(request, '_self');
} catch (e1:Error) {
trace("Error occurred!");
}}

There is my code, it listened for the tab to be clicked, and when it is, it loads the URL.

View 2 Replies


Similar Posts:


Loading Movie From Parent Directory?

Jun 20, 2009

I am doing some testing with various methods of deep linking in a flash site and have created a test site with the following structure:
/index.html
/simple.swf
/two/index.html
three/index.html
 
The index.html file located at the root of the site loads the simple.swf file using an absolute reference to the file (view the source of [URL]). The index.html file located in directories "two" and "three" are exactly the same as the index.html file in the root directory with the exception that I have added a defined a "base" parameter pointing to "../". [Right now, I am passing the same "flashvars" parameter in each of these files, however, once I resolve this issue, I will change the flashvars value.]

For some reason, the simple.swf file loads in the root level index.html file but not in the index.html file located in directories "two" or "three". I am confused why this is not working since I am using an absolute reference to the file. The only possible meaningful difference I can see is that the simple.swf file is only located in the root directory.

View 2 Replies

ActionScript 3 :: Mport A Class From A Parent Directory?

Sep 13, 2011

I have seen similar questions, but not this specific problem. I have a folder structure like this:

[Code]...

View 3 Replies

ActionScript 3.0 :: URLRequest String Parameter : How To Point It To Parent Directory With URL

Mar 3, 2009

I just have a simple question how do i point to the parent directory from where i curently am in URLRequest string parameter?in other words my folder structure:

my_site/flash/button.swf

How must string look to tell flash to locate solarij.html that is in my_site folder one folder up(parent) from current swf position.?

ActionScript Code:

var link:URLRequest = new URLRequest(""); navigateToURL(link, "_self");

View 2 Replies

Actionscript 3 :: Why Moving A Symbol's Class File From Top-level Directory To Deeper Directory Break

Feb 9, 2010

When I have a class linked to a MovieClip in my library and that class takes an argument in its constructor method. That class will compile properly ONLY when it's located in my top-level directory (same dir as the .fla and Document.as files). If I move that class to a deeper directory, say com.place, and update the package statement and symbol link appropriately, the compiler will generate error "1136: Incorrect number of arguments. Expected 0."Create flash project and put a rectangle on the stage. Covert it to symbol and assign it to class TestPanel - or whatever you choose. Also configure the fla so that is uses a Document (Main) class.Create Main.as and TestPanel.as in the same folder. In the Main class, instantiate a instance of TestPanel and add it to the stage. Flash will, predictably, add the rectangle symbol and everything is fine.Now modify TestPanel so that its constructor method takes a Number and have Main.as pass some number to TestPanel.[code]You now get the error: 1136: Incorrect number of arguments.Expected 0.When I move the TestPanel.as into a deeper directory, Flash somehow is looking elsewhere for the base class for Symbol, even though I'm mapping that Symbol to com.place.TestPanel.

View 4 Replies

ActionScript 3.0 :: Positioning Parent MC In Order To Center Child MC On Parent's Parent MC

Feb 5, 2010

[code]All clips are squared.Ok, on the PlayerPlane, there are little soldiers, which have hotkeys. The effect I'm trying to create is I want to position the GameStage so that the currently selected soldier appears in the center of the GameClicker clip.The GameStage is movable by the player (to scan other areas of the map)by holding the CTRL key, so it's easy to kinda lose track of where your players are.I have tried using localTo Global and globalToLocal techniques, but I think I'm lost on the actual math of getting the GameStage to move the correct distance so that the selected soldier is centered to the GameClicker.[code]

View 2 Replies

ActionScript 3.0 :: Remove Parent.parent.parent Child?

Jan 3, 2010

I got a "preloader" that creates an movieclip and loads an SWF. Now in the loaded SWF i want a close button to go back to the "preloader". The preloader isn't an actuall preloader but some sort of mainclip.Now i tried this:removeChild(MovieClip(e.currentTarget).parent.pare nt.parent)But i get error:ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.at flash.display::DisplayObjectContainer/removeChild()at MethodInfo-6()

View 1 Replies

ActionScript 3.0 :: Referencing Stage - Add Bullets To The Stage Rather Than Using Parent.parent.parent.addChild?

Jul 10, 2009

I'm currently making a platform game and when the player shoots i want to add the bullets to the stage. The players gun class is in charge of adding bullets. The "players gun" is a child of "players gun holder" which is a child of "player" which is a child of the stage. is there a better or more dynamic way for the "players gun" to add bullets to the stage rather than using parent.parent.parent.addChild (bullet);

View 2 Replies

ActionScript 3.0 :: Add A Clip To The Stage As A Child And Remove The Parent And Set The Parent Equal To Null?

Sep 11, 2010

if I add a clip to the stage as a child and remove the parent and set the parent equal to null, does the child get collected and removed from memory? What if the child has an image loaded into it as its child? 

In my application I'm loading a series of png images as overlays that can be tinted for customizing in this app. When I trace my memory, the basic app idles at 64,000 k. The exact second I load those overlay images it goes up to 205,000k. If I remove those clips and "clear" the stage I should go back down to 64,000 k if everything is removed and collected correctly, right? It's not, it's hanging at 215,000 k. Are my images being cached and that is the reason for the memory staying up? If so, how do I prevent that. Or upon removing the parent of the image how can I un-cache the image.

If a user switches between models and loads several different items then the application actually crashes the Flash environment because of too much memory usage. It also does the same to browsers.

View 29 Replies

ActionScript 3.0 :: Error 1120: Access Of Undefined Property Parent + Movieclip(parent)?

Mar 15, 2011

I am trying to access a function that is on my document class for my AS3 project, from a nested class. That is, the Document Class calls Class A which then calls Class B. So I am trying to access a function from Class B, I am trying to use MovieClip(parent).function(); but I am getting error 1120. The MovieClip(parent) (fixed to reflect my document class, etc) works when I try it from other classes but not from this nested class.

View 9 Replies

Flash :: Drag And Drop Application Where Mc Is Dragged Out Of One Parent Mc And Dropped Into Another Parent Mc?

Nov 13, 2010

Simple drag and drop application where mc is dragged out of one parent mc and dropped into another parent mc.All works OK until I added 2 text boxes to the mc's -- one is a non-selectable dynamic text box (a label) which is set by the code, the other is selectable input text that the user can amend.

Finger cursor disappears when user hovers over the section of the mc that contains the text fields (even non-selectable text??) When the user trys to drag the mc by inadvertantly click-dragging anywhere within both text areas it causes this error: TypeError: Error #1034: Type Coercion failed: cannot convert flash.text::TextField@2374a381 to flash.display. MovieClip (same error appears for both text boxes)

The input text box may confuse the user - how do they sometimes click to drag and sometimes click to amend? I need to create an overlay area within the mc that is click-detected for the drag? Here's the relevant bits of code:

var itemArray:Array = [
{iname:"police",ititle:"POLICE OFFICER"},
{iname:"insurance_assessor",ititle:"INSURANCE ASSESSOR"},[code].............

View 1 Replies

ActionScript 3.0 :: Tab Indexing Loop Through Parent, External Child Swf, Back To Parent?

Nov 11, 2009

I have a parent swf which loads many child swfs (though only one is displayed at a time). My intention was to use the loaded SWFs document class to retrieve an array of objects to be assigned a tab index, combine this with the parent's own array of objects and apply sequential tab indices to them all. But what happens is actually that the parent's objects are assigned an index, but the external swf is unaffected. In fact, the external swf retains its automatic tab indexing, when I would expect that having set a value for InteractiveObject.tabIndex, automatic tab indexing would be disabled.

I've seen similar tales elsewhere. Most posts I've read are wanting to load an external swf, give it focus and loop through those objects, then close the swf and return to looping through the parent. However I would like loop through all objects as one. including manipulating the focus manager(s), and basically fiddling with every tab-related property I know.

View 2 Replies

Navigating Between The Swfs?

Feb 2, 2011

I'm a born-again newbie, as it's been awhile, so bear with me...I have a main movie, with the menus and some basic info. I would like each section of the portfolio to load as a separate swf (to save on file size)...we were hoping to have the back/next, copyright buttons on top of a full size image...but my question is how to navigate the home button to return to the main movie with the menus...the old site had separate sections loading into an mtClip with the following code:

loadMovie("vr4.swf", 1);

then when you click home:

on (release) {
gotoAndStop("home");
unloadMovieNum(1);
}

how to code the home button on the section swfs to unload the movie, but return to the main movie without reloading?

View 2 Replies

ActionScript 3.0 :: Navigating In 3d Box

Nov 4, 2009

I made a 3d box using flash cs4 built in 3d tools and I'm trying to "walk around" in it. I do this by moving the box accordingly.

[Code]...

The Problem: When you go to close to the back wall and look around the whole perspective gets messy. I know I'm not supposed to move Z like that.. I think.. I have no clue what properties to change for this to work.

View 9 Replies

ActionScript 2.0 :: Navigating From One .fla To Another?

Aug 5, 2008

I have two .fla's i'm working with. The first is called index.fla. this file holds a button that when pressed loads a swf into a placeholder layer. the second .fla is the one being loaded in the form of a .swf. what i want to do is write a code on the second frame of the .swf that will send index.fla to the 5th frame.

View 2 Replies

Actionscript 3.0 :: Parent.parent.movieClip.visible = False; - How The Heck Do Climb The Ladder Then Go Back Down Again Into Another Clip

Dec 10, 2009

I've struggled with this for a long time and have thrown in the towel. How the heck do you climb the ladder, then go back down again into another clip?

View 2 Replies

ActionScript 3.0 :: No Longer Can Reference Preloader In The Parent Swf (extract From The Parent Swf)

Jun 2, 2011

I have been using:

yourbutton.addEventListener(MouseEvent.CLICK,f);
function f(e:Event):void{
Loader(this.parent).load(new URLRequest("newswf.swf"));
}

which was suggested to me in a different post to target the parent loader class, however i now no longer can reference my preloader in the parent swf (extract from the parent swf):

[Code]...

View 5 Replies

ActionScript 3.0 :: SetChildIndex And SwapChildren - On Mouse Over Set The Parent Of The Moused Over Text Field To The Highest Depth Child Of Its Parent

Sep 29, 2011

trying to on mouse over set the parent of the moused over text field to the highest depth child of its parent i tried both of these: [code] private function

[Code]...

View 3 Replies

Actionscript 3 :: Assign A Parent's Variable From The Parent's Child?

Nov 7, 2011

i want to pass the variable from parent to child .How Can i pass the Variable.Here i paste my code.

My Parent Class

public class PlayerStrobe_domaincheck extends Sprite
{
private var myService:NetConnection = new NetConnection();
private var _loader:Loader;

[Code]....

View 3 Replies

ActionScript 3.0 :: Navigating Without Going To A New Window?

Jun 29, 2009

Trying to make a link in flash and it brings up a new browser or browser tab every time instead of taking the page it is on and actually navigating.

View 1 Replies

Navigating Between Two Movie Clips?

Jul 7, 2009

Within my animation I have two movie clips, one movie clip "clipA" runs to a certain point then a series of buttons appear when you hit the button it loads another movie clip "clipB" into the first movie clip "clipA". Whith in the second movie clip "clipB" I would like to be able to, at a certain frame navigate to a different frame within "clipA" is this possible to do with actionscript 2.0

View 1 Replies

ActionScript 3.0 :: Stopping .flv When Navigating?

Oct 5, 2010

I'm trying to teach myself actionscript 3 and going insane over an issue with an .flv video that I can't stop.
 
The problem I'm having is that I can't make video (an .flv within the "FLVPlayback" component set as a movie clip) stop when navigating to another tab. Navigating away from and back to my video page/frame even results in 2 audio streams playing simultaneously. I think the problem lies with me not being able (or knowing how) to identify the video/movie clip with "(name)".stop();

Here's the source file (the first and last navigation tabs on the left are complete, video is on the last tab) SOURCE:
 
[URL]
 
and my code (all my references to the FLVPlayer/video were wrong so I've removed them to try again) -

[Code]....

View 7 Replies

ActionScript 3.0 :: Navigating To And From Different MovieClips

Mar 7, 2011

I am a real noob at AS3. Its so frustrating now to try to re-learn how to navigate to different movieclips on different levels in my flash demo... Or for that matter, how to navigate at all with buttons on the timeline. I have a movieclip called mc_Flyouts on my main timeline. Inside of it are a left and a right side arrow which when clicked trigger a tween and flyout buttons appear. I want it so when the user clicks any of these flyout buttons in this movie, they jump to a different keyframe back out on the main timeline. I got the following code to work, but its giving me errors:

[Code]...

View 3 Replies

ActionScript 1/2 :: Navigating From Cue Points In A FLV

Sep 24, 2011

I am using Flash CS3 and AS2 on a PC. I am making a CD in Flash, for a client. The CD has videos, images and text. What I need is be able to go to the next scene once an FLV has finished playing. Also if a new FLV can be loaded once the curent ends. The FLV is in the FLVPlayback component. I need to add Cue Points which I can use to navigate with. The client would prefer a minimum of buttons, and thus auto navigation once a point is reached.I would prefer to avoid the need for me to use third party software or add-ons unless absolutely necessary.

View 3 Replies

Flex :: Navigating From One Swf File To Another?

Mar 8, 2011

I have a swf file which requires a username and password to log in. When the user enters the values and clicks the submit button I validate it using asp.net. What I want is if the validation succeeds then I want to navigate to the home page of my application which is also a swf file. How can I do this? This is my mxml code

<?xml version="1.0" encoding="utf-8" ?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Style source="d:/style1.css"/> [code].....

View 1 Replies

Sound Not Stopping When Navigating Away

Jan 27, 2009

I have several swf files which are completed screencasts with voice overs, which I need to integrate into a flash application to distribute on CD to new students.

To play the screencasts in my flash file, I'm navigating to a new frame for each one which has a movie clip on it (instance name myscu3 for example). The myscu3 movieclip has about 20 frames of animation to grey out the screen behind, and then a couple of frames with actionscript on them, which 1) first frame shows a loading screen while the screencast swf is loading via a Loader and then navigates to the 2) second frame where the screencast coords are set and addChild is used to show the screencast via the Loader.

All works fine EXCEPT ... if I navigate away from the parent timeline frame where the myscu3 clip is ... the screencast disappears (as it should, as the myscu3 clip isn't on other frames, but if the screencast hasn't finished playing before I navigate away, the sound keeps playing.

how to stop the sound playing, as the loader is in the child movieclip, and the navigation away from the frame containing it is accomplished by clicking on any of the tabs at the side (on the main timeline). Any ideas? Is there actionscript code which will just stop any current sound playing (without stopping the ability to play sound) which I could add into the tabs navigation code?

View 1 Replies

ActionScript 3.0 :: Navigating To Time Code With XML

Jun 28, 2010

How would I go about using an XML file like the one below to control an mp3 in a player and show a jpg at the same time? Basically the mp3 is about a presentation, and the image is a slide of the presentation. If you click forward it needs to progress to the next chapter marking and display an image. If you click back it needs to go to the previous chapter marking and display the previous image.

[Code]...

View 2 Replies

Way Of Navigating Through Website Without Use Of Multiple Pages

Aug 6, 2009

I was wondering if there is an easy way of navigating through a website without the use of multiple pages and eliminate the use of a navigation bar. My idea, which I'm sure has been done before because people are always coming up with new inventive ways to browse the internet, is to be able to allow the user to free roam the entire website on one page. I wouldn't be asking if I found it so I figured I could put my mind at ease and ask someone.url...In this map, it allows the user to free roam this map and find different cities. My idea is to have the user to browse a map of a website to different parts of what would normally be links to other pages. The whole web map would be one page and the user could just move their cursor up or down or left to right to each section of the website. Once they get to a section, they can click on certain parts. There is one website that is similar to my idea, but I want to eliminate the use of a navigation bar.I am new to flash but I love web design. I want to come up with a new way to navigate.

View 5 Replies

Flash :: Navigating Through Site With Animation

Nov 18, 2009

Basically, what i want to do is have a home page with some images and things on it, and a menu. When the user clicks on a menu button, i want the images on the homepage to animate away, and be replaced with the chosen page (animated in). I understand how to animate things using Tweens in the timeline and also in As3 using the Tween Class, but for the animation i'd like to do it's so much easier to use the timeline (i don't think i'd be able to use as3 to do really complicated things yet).

I can figure out how to make the home page disappear, but i can't figure out how to then animate in the correct page. If anyone can point me in the direction of a good tutorial or just give me some hints i'd be sooo grateful!! I think i'm just struggling to get my head into it.

View 10 Replies

ActionScript 3.0 :: Stop Flvplayback Vid When Navigating To Another Nav.btn

Feb 2, 2011

I've got to add a video (flv) to my videobtn (navigatiopanel). I made a flashfile in CS3 actionscript 3, placed the flvplaybackcomponent at the scene (layer 1, frame 1) and linked it to webserver for the streaming. So far so good, I made an swf of it an everything worked fine. Except for one major problem : de vid doesn't stop playing when I navigate to another button in the nav.panel. In fact when I click once more on the videobutton, there are two vid's playing at the same time

View 29 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved