Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Problems With GetURL Targeting - Loading Into _self [renamed]



Hi!

I'm having a problem using getUrl, can anyone pleeease help??

I've written my own code and used code from here:

on (release) {
getURL("http://www.kirupa.com", "_blank");
}


Everything works fine while testing in Flash, but if you try to load a page into "_self" whilst in a browser window, nothing happens. I'm sure this is something really simple I've missed, but what???

The code I'm using is from a function and goes like this...

//release instructions from function
mc.onRelease = function() {
this.gotoAndStop("down");
this.btnMask._x = btnOut;
getUrl (link, "_self");
}

//function call
btnMC1.onEnterframe =
function() {
menuControl(this, "http://www.google.co.uk")
};

Everything's working fine, except loading pages into _self. Can anyone please help??

Cheers in advance!!



KirupaForum > Flash > Flash 8 (and earlier) > Flash MX
Posted on: 09-01-2005, 01:30 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

GetURL _self
Hello,
I've created an html with a link calling a New URL, with certain measures and in which a swf is played. That works fine.

The idea is to make a slide show with next and previous buttons. So this swf, has a NEXT button with the order "on (press) {get
URL("mymovie2.swf", _self);}. This also works fine.
The new swf, has also this NEXT button calling mymovie3.swf in _self and so on, up to mymovie10.swf.

The problem is that after pressing a NEXT button for the second time, the next swf doesn't open in the same window but in a new one. Why? How can I resolve this?
Thank you.

GetURL _self
Hello,
I've created an html with a link calling a New URL, with certain measures and in which a swf is played. That works fine.

The idea is to make a slide show with next and previous buttons. So this swf, has a NEXT button with the order "on (press) {get
URL("mymovie2.swf", _self);}. This also works fine.
The new swf, has also this NEXT button calling mymovie3.swf in _self and so on, up to mymovie10.swf.

The problem is that after pressing a NEXT button for the second time, the next swf doesn't open in the same window but in a new one. Why? How can I resolve this?
Thank you.

GetURL _self Is There A Change From 6 To 8?
With a simple mc with the instance name "butt"

Very simple code:

butt.onRelease = function () {
getURL("../Revision01/home/home.html", _self);
}

If I publish in flash 6 and check in browser it works. (Opens the page in the same browser window)
If I publish in flash 8 and check in browser it opens up in a NEW window.

GetURL Problem Using _self
I have a simple button that is supposed to link to a web page that should come up in the same browser window. When I use _blank, it links properly into a new window. But when I changed it to _self the link does not work at all--nothing happens when you click. Firefox, Safari on a Mac, IE on a PC--all the same. Tried exporting as both Flash 8 and Flash 9--no difference. Hoping for an answer ASAP. Thanks

GetURL _self Not Working
Hello,

I am having a problem with getURL that I have not experienced before:

I have an html index page with some Flash controls in it. The controls act as buttons that lead to other pages on the site. If I use
Actionscript Code:
getURL("whatever_page.html", "_blank")
the new page opens up just fine. However, if I use
Actionscript Code:
getURL("whatever_page.html", "_self")
nothing happens. Or, if I leave off the "_self" option, the page should still load within the current page by default - still, though, nothing happens.

Does anyone know what the problem could be?

GetURL _blank Acts Like _self, Really?
I redid my home page and I'm confused because when I use


Code:
on(release) {getURL("http://mcaldwel.mystarband.net/", _blank);}
on(rollOver) {_root.rollText="Mike's Bobo Site";}
on(rollOut, dragOut) {_root.rollText="";}
why does this load up his page as if I had used _self, I've spent 2 hours on this, trying different things, and then another 45 minutes answering questions I can help with... now won't somebody get their brain around this for me?

http://www.ironmallet.com

[CS3] GetURL Not Letting Me Use _self In Firefox
Hi,

I am trying to get a getURL script to open in its self, but it is not working on Firefox (is on IE). The flash file is embedded into a wordpress template.

Here is the embed code I am using:


Code:
<object
type="application/x-shockwave-flash"
data="http://xxx.ie/wp-content/themes/xxx/intro.swf"
width="900" height="450">
<param
name="movie"
value="http://xxx.ie/wp-content/themes/xxx/intro.swf" />
</object>
Here is the script i am using in the flash file:


Code:
myButton.onRelease = function()
{
var targetUrl:String = "http://xxx.ie/?page_id=4";
getURL(targetUrl, "_blank");
}
Thanks!!!! Id really appreciate the help!!

GetURL: Why Does _blank Work, But Not _self?
I can't get my getURL to work. It works when I use "_blank" but not when I use "_self" or "_parent" or "_top" or leave it empty. What's the deal?

I've got it right off the main timeline. I've also tried putting it within an onRelease function.

So, this doesn't work:

Code:
getURL("images/aboutus.jpg", "_self");
But this does:

Code:
getURL("images/aboutus.jpg", "_blank");
Any ideas? Thanks a bunch!

GetUrl Will Not Load In _self Window
I have a simple action on a button to get a url and open it in its own window. my code is:

on (release) {
getURL("contour_bios.swf", "_self");
}




but it's not working; it's loading it ontop of my movie. The url is actually another flash movie; is there another or better way to load another movie in a new window?

Thanks in advance

GetURL(varLink01, "_self"); Variable Not Passing?
i'm passing varLink01 from PHP to a flash file no problem (it loads into a dynamic text field fine).

but when i try and load this variable to the getURL command the link is not working, the flash takes me to a "page not found." here is my code:

DECLARE VAR
var passed:String = varLink01;
(different layer, same frame)

ACTION SCRIPT
on (release) {
getURL(varLink01, "_self");
}

i've put hours into this.... any help???

Thanks, Joe

GetURL(varLink01, "_self"); Variable Not Passing?
i'm passing varLink01 from PHP to a flash file no problem (it loads into a dynamic text field fine).

but when i try and load this variable to the getURL command the link is not working, the flash takes me to a "page not found." here is my code:

DECLARE VAR
var passed:String = varLink01;
(different layer, same frame)

ACTION SCRIPT
on (release) {
getURL(varLink01, "_self");
}

i've put hours into this.... any help???

Thanks, Joe

GetURL(MYVAR, "_self"); FF Bug Why?
Hey not sure if anyone here has experienced any issues with FF and the getURL method when using variables.
its annoying me to no end.

any ideas??

[F8] [MX] GetURL("file.mp3","_self) Kills All Javascript Calls
Hello fellow flashers.....

I am looking for a solution to the following error.

I have created an application that can download an mp3 using the browsers "download a file" functionality.

getURL("songlink.php",_self);

The php file changes the content type of the window to initiate this download.

Upon doing so, if another button my application tries to make a Javascript call to the browser, the event is not triggered in Internet Explorer. It just makes a sound, and the screen flickers. However the functionality works fine in Mozilla.

Flash 8's ExternalInterface class corrects this issue, but I am developing this as a base for use with flash player 7.

Has anyone come across this issue before...

Thanks

GetURL("file.zip", "_self") Blocked By IE Online
has anyone else experieced this?

See image below.

Targeting A Frameset With GetURL
How can I target a frameset with getURL in flash?

Thanks

GetURL Not Targeting Iframe From Button
Thanks in advance.... i've done a lot of searching for an answer to this.

I'm loading a flash file into an iframe which contains a button "skip intro", and is set to load the next page into the same frame. The button code is the basic:
on (release) {
getURL("main.html", "main");
}

And I know the iframe code is correct, and i'm using both name="main" and id="main", and have tried not using both.

I need to serve to IE 6, and yet it works perfectly in Firefox. I've even tried "_self" in the target and IE won't take it, but, again Firefox does.

Anyone know what's up?

Thanks so much,

K.

GetURL Targeting Unnamed Window From Popup
I don't know javascript very well (if at all) and have gotten myself into a corner I can't seem to find my way out of:

I have an swf movie playing in a named popup window.

When the user clicks a button in that movie I need the popup window to close and the original (parent?) window to go to a new URL (created from concacted variables).

I am currently using a getURL targeting "_parent" with a closewindow() javascript included, but it does not work. When I remove the closewindow() the new URL simply loads into my popup.

Please be specific and include code samples in your suggestions as I really don't know javascript and am at a deadend.

Firefox GetURL Problem- Targeting Frames
Hi everyone
I've found many a thread through google search on the internet that encounter this problem, but no-one's been able to provide an answer! So I thought I'd post it up.

It seems pretty simple- I have a HTML frameset, containing 2 frames, one called "topFrame" the other "mainFrame". Flash menu in the top, I want to be able to control the mainFrame through the flash menu. So I use getURL

Code:
getURL("music.htm","mainFrame");


That should work right? It works with IE, but in firefox it opens a new window. Why on earth!?

I put up an example. Try it on FF and IE ->
http://www.zen26398.zen.co.uk/test1.html

Can anyone help?
Cheers

Targeting The GetURL Function To One Consistent Window ?
I have a flash site that I am building and I have pop-up windows from the main page to galleries and other pages. I create the window with the following code and subsequently needed javascript code in html.

The getURL function looks like this:

on (release) {
getURL ("javascriptpenNewWindow('galleryflash.html','th ewin','height=700,width=700,toolbar=no,scrollbars= yes');");
}


My question is....Is there a way to target the window so that all of my different getURL functions open within the same window so that my user has only two windows to deal with when using my site and not so many that they hate me and get confused and never come back?

Problems With GetURL And Local Frame Targeting In FP9
I have a two frame page - the left frame is a custom flash Tree object that parses an IMS-compliant manifest (basically a tree menu structure) and the right frame displays the loaded page/object in that manifest. If i run this from a server, it works fine and displays all links in the right frame. But if I run it from a local or network drive it opens all links in _blank.

Adobe have a technote on the new allowScriptAccess and getURL in FP9 (http://www.adobe.com/go/50c1cf38) but dont mention anything about this issue (that i can locate).

Can anyone confirm that targeting frames locally via getURL under FP9 is now not possible?

Cheers,
Darren

Problems With GetURL And Local Frame Targeting In FP9
Hi all - have a strange issue that I cant seem to find any help for from other forums (including Adobe forums) so thought I might try here...

I have a two frame page - the left frame is a custom flash Tree object that parses a number of IMS-compliant manifests (basically an XML tree menu structure) and the right frame displays the href of the tree object that is clicked. If i run this from a server, it works fine and displays all links in the right frame. But if I run it from a local or network drive it opens all links in _blank.

Adobe have a technote on the new allowScriptAccess and getURL in FP9 (http://www.adobe.com/go/50c1cf38) but dont mention anything about this issue (that i can locate). I also cannot see how opening all pages in _blank can fix any "security" issues.

Can anyone confirm that targeting html frames locally via getURL under FP9 is now not possible or has been changed? or is this a bug (sorry - undocumented feature)?

Cheers,
Darren

Targeting An Html Anchor Using GetURL() Without A Page Reload
I have my whole site contained within one html page. I am using flash for the navigation and I would like to have it link to the HTML anchors without reloading the page!

Can someone please help me?

Thanks

Loading Two Swf's Next To Each Other [renamed]
ok wow!! i need HELP big time with some stuff! first of all..im trying to load an .swf movie (or file which ever it is) into my main movie...well the way im doing that is by clicking a button and then the movie loads...then im wanting to be able to click another button and load a different movie BUTTTT when i do this right now the second button's movie loads right over the first buttons movie!! what do i do?!?


also im wanting to make a text scroller with JUST the slider. how can i go about this?

p.s.
would appreciate just verbal help b/c i would like to try to do this without using someone elses stuff ...if thats ok...?!

Loading Two Swf's Next To Each Other [renamed]
ok wow!! i need HELP big time with some stuff! first of all..im trying to load an .swf movie (or file which ever it is) into my main movie...well the way im doing that is by clicking a button and then the movie loads...then im wanting to be able to click another button and load a different movie BUTTTT when i do this right now the second button's movie loads right over the first buttons movie!! what do i do?!?


also im wanting to make a text scroller with JUST the slider. how can i go about this?

p.s.
would appreciate just verbal help b/c i would like to try to do this without using someone elses stuff ...if thats ok...?!

[fmx] Problems With Loading Into A MovieClip Via A String [renamed]
Alright, I know this is a mess, please forgive me.
I'm trying to get it to load into one of the movies that its creating but it doesn't seem to like the string, if I manually enter _root.holder_mc.mc_0 it works fine.

Any ideas?


Code:
#include "com.qlod.LoaderClass.as"
var depth = 0;
var myLoader = new com.qlod.LoaderClass();
var picPath = "";
var pics = ['winterrangep1.jpg',
'winterrangep2.jpg',
'winterrangep3.jpg',
'winterrangep4.jpg',
'winterrangep5.jpg',
'winterrangep6.jpg'];
var picText = [''];
var picCount = _root.pics.length - 1;
var objIndex= 0;
var nextX = 265.4;
var nextY = 293.9;
var prevX = 0;
var prevY = 297.4;
MovieClip.prototype.loadObj = function (file, i) {
if (file.length) {
trace(i);
objWhereToLoad = "_root.holder_mc.mc_"+i;
objWhereToLoad = objWhereToLoad.toString();
trace(objWhereToLoad);
myLoader.load(objWhereToLoad, file);
var mc_loader = _root.attachMovie("loader", "mc_loader", 4);
mc_loader._x = nextX-mc_loader._width/2;
mc_loader._y = nextY;
mc_loader.loadBar.onLoadProgress = function(loaderObj) {
this._xscale = loaderObj.getPercent();
trace(this + ' Progress: ' + loaderObj.getPercent());
};
mc_loader.loadBar.onLoadComplete = function(success, loaderObj) {
removeMovieClip(mc_loader);
current_index++;
load****();
trace(this + ' Complete');
};
myLoader.addListener(mc_loader.loadBar);
} else {
trace(this + ' No Image to Load');
}
};
var holder_mc = _root.createEmptyMovieClip("holder_mc", _root.depth++);
current_index = 0;
load**** = function () {
//var mc = loadMovie(""+pics[current_index]+"", holder_mc["mc_"+current_index]);
loadObj(pics[current_index], current_index);
if (last_index == current_index) {
break;
}
var last_index = current_index;
};
load****();
for (i=0; i<pics.length; i++) {
holder_mc.createEmptyMovieClip("mc_"+i+"", depth++);
}

How'd They Do That? - Loading External Content With Transitions [renamed]
This is the site: http://www.void.pt/void.php?lng=en

the opening squence i suppose it's all just movie tweens between files, but how is this thing done, when you click a button, the middle screen/part of the site, has a transition effect, loads, and there is a new page! i know how to do the transitions, and the loading bar, but how do i exactly tell my button, where to load an external movie file!...

basically, i want it when somone goes to the site, the while site opens, there are transition effects, and three different movies open at three different spots on the site...just like it happens at www.void.com when you enter their site, they got the main window, and the botton right and left windows!

Please if someone could give me a helping hand on this i would really appriciate it!!!!

-AlBERT

Loading Random Background Problems [renamed]
I am looking for someone skilled with Flash, a Wizard hopefully...

I have been trying to create a .swf that loads a Random background image (like the one on Kirupa's MX tutorial on this site) ... and my skills are just too insuficient.. I got it working but the images loads in sequence too fast and my general composition and work is kinda messy...

Is there someone here who is interested in helping out ?

The project is for our website, we are a non-commercial gaming clan, and alot of programmers, but none of us have any serious Flash experience. We are able to advertise/link back to anyone who might wanna help us out.

Contact me on email: therseus@gmail.com

Loading An Image Into A MovieClip, Then Into BitmapData [renamed]
Hello,

I am trying to load an image into a movieclip and then draw the contents of the movieclip to a bitmapData object. Below is some sample code.


Code:
target.jpg_mc.loadMovie(url);
target.createEmptyMovieClip("loader_mc", 100);
target.loader_mc.bmc = target.jpg_mc; // movieclip where to load original image
target.loader_mc.tmc = target.bmp_mc; // movieclip with smoothed image
target.loader_mc.onEnterFrame = function(){

bl = this.bmc.getBytesLoaded();
bt = this.bmc.getBytesTotal();
if (bl >= bt && bt > 4 && this.bmc._width > 0 && this.bmc._height > 0){
//target._parent._visible = true;

this.bmc._visible = false;

var bitmap = new BitmapData(this.bmc._width, this.bmc._height, true);
this.tmc.attachBitmap(bitmap, 100,"auto", true);
bitmap.draw(this.bmc);

Stage.addListener(target);

target.gotoAndPlay("in");
this.removeMovieClip();
}
}
For some reason it always draws a white box rather than the image. Has anyone ever seen this happen with the bitmapData class?

Thanks for any help!

Wade

[fmx] Problems With Loading Into A MovieClip Via A String [renamed]
Alright, I know this is a mess, please forgive me.
I'm trying to get it to load into one of the movies that its creating but it doesn't seem to like the string, if I manually enter _root.holder_mc.mc_0 it works fine.

Any ideas?


Code:
#include "com.qlod.LoaderClass.as"
var depth = 0;
var myLoader = new com.qlod.LoaderClass();
var picPath = "";
var pics = ['winterrangep1.jpg',
'winterrangep2.jpg',
'winterrangep3.jpg',
'winterrangep4.jpg',
'winterrangep5.jpg',
'winterrangep6.jpg'];
var picText = [''];
var picCount = _root.pics.length - 1;
var objIndex= 0;
var nextX = 265.4;
var nextY = 293.9;
var prevX = 0;
var prevY = 297.4;
MovieClip.prototype.loadObj = function (file, i) {
if (file.length) {
trace(i);
objWhereToLoad = "_root.holder_mc.mc_"+i;
objWhereToLoad = objWhereToLoad.toString();
trace(objWhereToLoad);
myLoader.load(objWhereToLoad, file);
var mc_loader = _root.attachMovie("loader", "mc_loader", 4);
mc_loader._x = nextX-mc_loader._width/2;
mc_loader._y = nextY;
mc_loader.loadBar.onLoadProgress = function(loaderObj) {
this._xscale = loaderObj.getPercent();
trace(this + ' Progress: ' + loaderObj.getPercent());
};
mc_loader.loadBar.onLoadComplete = function(success, loaderObj) {
removeMovieClip(mc_loader);
current_index++;
load****();
trace(this + ' Complete');
};
myLoader.addListener(mc_loader.loadBar);
} else {
trace(this + ' No Image to Load');
}
};
var holder_mc = _root.createEmptyMovieClip("holder_mc", _root.depth++);
current_index = 0;
load**** = function () {
//var mc = loadMovie(""+pics[current_index]+"", holder_mc["mc_"+current_index]);
loadObj(pics[current_index], current_index);
if (last_index == current_index) {
break;
}
var last_index = current_index;
};
load****();
for (i=0; i<pics.length; i++) {
holder_mc.createEmptyMovieClip("mc_"+i+"", depth++);
}

How'd They Do That? - Loading External Content With Transitions [renamed]
This is the site: http://www.void.pt/void.php?lng=en

the opening squence i suppose it's all just movie tweens between files, but how is this thing done, when you click a button, the middle screen/part of the site, has a transition effect, loads, and there is a new page! i know how to do the transitions, and the loading bar, but how do i exactly tell my button, where to load an external movie file!...

basically, i want it when somone goes to the site, the while site opens, there are transition effects, and three different movies open at three different spots on the site...just like it happens at www.void.com when you enter their site, they got the main window, and the botton right and left windows!

Please if someone could give me a helping hand on this i would really appriciate it!!!!

-AlBERT

Loading Random Background Problems [renamed]
I am looking for someone skilled with Flash, a Wizard hopefully...

I have been trying to create a .swf that loads a Random background image (like the one on Kirupa's MX tutorial on this site) ... and my skills are just too insuficient.. I got it working but the images loads in sequence too fast and my general composition and work is kinda messy...

Is there someone here who is interested in helping out ?

The project is for our website, we are a non-commercial gaming clan, and alot of programmers, but none of us have any serious Flash experience. We are able to advertise/link back to anyone who might wanna help us out.

Contact me on email: therseus@gmail.com

A Little Help With Loading Web Site Content With Button Click Please [renamed]
hi all!
i'm getting closer to my finished site just a few final glitches to clear up.

i have the main guts of the site load up and then when you click on a button i have action script that loads content upon release and the buttons stay put and the page loads up on the left hand side.
http://www.freewebs.com/ex_iled/

however, i do have a page (left side) that i want to have load when the initial page loads up for the first time (the home page). now the buttons and the pictures stay put during all page transitions, okay? so no reloading of those.
how do i get my home page (left side) to load at the same time as you first open the site and also to load if you were to press the home button without causing the buttons and the pics to reload again?

sorry, if this is hard to understand.
i know what the hell i'm trying to say, the question is do you understand what i'm saying!? lol!

thanks!

Loading Dynamic Text Breaks Formmail Forms [renamed]
This matter is something I haven't been able to solve for long and now I'm really desperate to find out an answer.
Here's a link to a very simple zip file (as example) containing the conflictive fla and other files, for those of you who may want to have a look at it.

TO SIMPLIFY THINGS:
It seems that whenever I use a couple of AS instructions to load some Dynamic text from a text file, Forms which are based in formmail, stop working (no matter if these forms are made of dynamic or static text). Why??

INTO MORE DETAILS:
In the attached fla example file here, I've simplified things very much by just leaving 2 Forms (one made with Dynamic text and another one without any dynamic text on it).
Very peculiar, if in frame 1 I call the variables from the text file:

ActionScript Code:
webcontent= "File.txt"loadVariablesNum (webcontent, 0);

the 2 Forms stop working properly: The static one doesn't even seem to submit data and the dynamic one, it seems data has been sent but data is never received.
As soon as I delete these 2 lines of AS, they work properly again (although of course, no words can be seen in the Form made with dynamic text).

Both submit buttons contain the following AS:

ActionScript Code:
on (release) {        subject = "Customer Form from your Web";        recipient = "info@mydomain.com";        loadVariables ("http://www.mydomain/cgi-bin/formmail.pl", "", "POST");        _root.Form.gotoAndStop ("Thanks");}

So...I don't have the least idea of what's going on with this all.
Perhaps any of you could explain what's wrong with such a simple thing like this and how to avoid this strange behaviour.

Thank you very much!

Loading Dynamic Text Breaks Formmail Forms [renamed]
This matter is something I haven't been able to solve for long and now I'm really desperate to find out an answer.
Here's a link to a very simple zip file (as example) containing the conflictive fla and other files, for those of you who may want to have a look at it.

TO SIMPLIFY THINGS:
It seems that whenever I use a couple of AS instructions to load some Dynamic text from a text file, Forms which are based in formmail, stop working (no matter if these forms are made of dynamic or static text). Why??

INTO MORE DETAILS:
In the attached fla example file here, I've simplified things very much by just leaving 2 Forms (one made with Dynamic text and another one without any dynamic text on it).
Very peculiar, if in frame 1 I call the variables from the text file:

ActionScript Code:
webcontent= "File.txt"loadVariablesNum (webcontent, 0);

the 2 Forms stop working properly: The static one doesn't even seem to submit data and the dynamic one, it seems data has been sent but data is never received.
As soon as I delete these 2 lines of AS, they work properly again (although of course, no words can be seen in the Form made with dynamic text).

Both submit buttons contain the following AS:

ActionScript Code:
on (release) {        subject = "Customer Form from your Web";        recipient = "info@mydomain.com";        loadVariables ("http://www.mydomain/cgi-bin/formmail.pl", "", "POST");        _root.Form.gotoAndStop ("Thanks");}

So...I don't have the least idea of what's going on with this all.
Perhaps any of you could explain what's wrong with such a simple thing like this and how to avoid this strange behaviour.

Thank you very much!

Loading Levels And Targeting Them
I have two swfs. content.swf and music.swf(a movie with only an event sound and a preloader)

I need to have music.swf load completely before content.swf begins. When music.swf is loaded I need to have it play as well as I need to have content.swf start playing.

I have tried starting with music.swf and have a loadmovie content.swf into level 1. but I this does let both movies start playing at the same time. One starts before the other unless the movies are cached.

I need to have two separate movies because content.swf contains frame targets where the timeline stops.

Thanks in advance for your help.--JOE

Targeting A Level Without Loading
Anyone know if it's possible to add content to a level without loading a movie into it?

For example, I'm creating a preloader that loads an image into _level1. I'd like the preloader to sit on the level above the image (_level2), but I can't seem to target _level2 from _root in order to set up the preloader.

Any ideas?

Targeting And Loading External .swf
ok, i've got a set of menu buttons on the left. when one button is clicked, i want it to load an external .swf in the open space on the right, next to the menu. i've created a movie clip in that space on the right and called it "hold."

i want to set up the button to onRelease, open up that .swf (at a particular URL) in that "hold" movie clip space. My problem is finding the right way to target the button to open in that space. What terms/variables should I be using???

I tried preloading the clip and telling it to open when I tied the button to gotoandplay another frame, but didn't work. I'm probably making this more complicated than it really is. Help!

Thanks!

_self
Any reason this:

Code:
getURL("index2.htm",_self);
isn't loading into the same page?

Its on the main timeline and calling a new page that is supposed to load in the same window, but its opening another one...

How To Add _self Tag AS3
Hello All!

Need my AS3 links to open in the same window. Anyone know where to put the "_self" tag?


Code:
//links

import flash.net.URLRequest;
var LogoLinkURL:String = "http://www.google.com";
var EmailLinkURL:String = "http://www.google.com";
var GalleryLinkURL:String = "http://www.google.com";
var TagLinkURL:String = "http://www.google.com";

btnLogo.addEventListener(MouseEvent.CLICK, logoClick);
btnEmail.addEventListener(MouseEvent.CLICK, emailClick);
btnGallery.addEventListener(MouseEvent.CLICK, galleryClick);
btnTag.addEventListener(MouseEvent.CLICK, tagClick);

function logoClick(event) {
LinkTo(LogoLinkURL);
}
function emailClick(event) {
LinkTo(EmailLinkURL);
}
function galleryClick(event) {
LinkTo(GalleryLinkURL);
}
function tagClick(event) {
LinkTo(TagLinkURL);
}
function LinkTo(linkToUrl:String) {
navigateToURL(new URLRequest(linkToUrl));
}

Loading Movies And Targeting Issues
I'd like to load an external swf, but am having a few problems. If I use the target method and load the swf into an empty mc, then it doesn't work. There's problems with the _root. The swf works fine if I load it into a level.

But I need to place the external swf in a set position in the main movie and I can't do that if I use the level method?

Any ways around this? Any help would be much appreciated! I saw an earlier post RE something similar, but didn't quite understand it! Thanks, G

Targeting A Frame And Loading A Url From Combo Box
Hi there I'v been having trouble with this a bit.. i'm trying to make a combo box load url's in a html-framed page. The Target name of the HTML-Frame is "MAIN" Now What code would i add to this to load up html files into a frame. The data is wrong i'll just put the whole url in there eg, www.masons.org.nz/002.html or something like that.

I can't find any info in the micromaedia help. because it's all dealing with targets and frames in action script not html. I'm a Bit lost.

cb.dataProvider = [
{label:"Brickie Trowels", data:"btrowell02.swf"},
{label:"Bolt Cutters", data:"http://www.masons.org.nz/002.html"},
{label:"Chisels", data:"003.swf"},
{label:"Crow Bars", data:"http://www.masons.org.nz/001.html"},
{label:"Hammers", data:"btool04.swf"},
{label:"Jointers", data:"btool022.swf"},
{label:"Knifves", data:"013.swf"},
{label:"Lines & Chork Lines", data:"015.swf"},
{label:"Levels", data:"btool02.swf"},
{label:"Marking Tools", data:"018.swf"},
{label:"Nips", data:"019.swf"},
{label:"Rulers", data:"020.swf"},
{label:"Levels", data:"btool02.swf"},
{label:"Sliding Bevels", data:"012.swf"},
{label:"Snips", data:"023.swf"},
{label:"Staplers", data:"024.swf"},
{label:"Squares", data:"025.swf"},
{label:"Tapes", data:"026.swf"},
{label:"Tools Boxers", data:"027.swf"}
];
cb.editable = false;
cb.selectedIndex = 0;
cb.addEventListener("change", form1);
function form1 (){
main.target = cb.value;

// some where here i need to change something. not sure
// what tho.

}

Loading .swf And Targeting Frame Labels
This is my .FLA to show the idea for loading the .swf and on the menu buttons clicking to other frame labels within the first same loaded .swf timeline.. i.e they all will target the same timeline if I can get that far

Ideally I'd actually like the Timeline to load on statup.







Attach Code

stop();
fscommand("fullscreen", "true");//projector

//Load funny movie
var myLoader:Loader = new Loader()
hClip.addChild( myLoader )
intro_btn.addEventListener(MouseEvent.CLICK , clickIntro)
function clickIntro ( evt ){
myLoader.load( new URLRequest("funny.swf") )
} // above works so far


//Load Timeline Slideshow
selling_btn.addEventListener(MouseEvent.CLICK , clickselling)
function clickselling ( evt )
{
myLoader.unload()//Unload funn.swf if playing
myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, fnToAddSwfAndSeekFrame)
myLoader.load( new URLRequest("1_tabs_heather.swf") )
}
//untested but should put you in the right direction...
function fnToAddSwfAndSeekFrame(e:Event)
{
// assumes loaded object is a swf...
var newSWF:MovieClip = MovieClip(e.target.data);
addChild(newSWF);
newSWF.gotoAndPlay("selling");
}

//
//CLick to goto PUSH chapter in timeline
push_btn.addEventListener(MouseEvent.CLICK , clickpush)
function clickpush ( evt ){

gotoAndPlay("push");
}


//Click to goto SLEEP chapter in timeline
sleep_btn.addEventListener(MouseEvent.CLICK , clicksleep)
function clicksleep ( evt ){
myLoader.unload()

gotoAndPlay("sleep");
}



//END

























Edited: 12/12/2007 at 09:57:19 AM by GLOZONE

Problem Targeting Empty Mc For Loading Swf's
Hey guys, i need some help figuring this out. I did the tutorial on the infinite navigation menu, and it all worked out. My problem is when i assign the loadmovie action to the buttons in this nav. menu to load seperate swf's, only the level method works. When i try to target a blank movieclip i created in the main timeline, nothing happens. Anyone got any suggestions?

Window _self?
I tryed to make a button link to a URL and open in its own window. For window I put _self, and that's supposed to open it in its own window right? Well it just opens in the window the flash is in. Is there any other way to make it open in it's own window?

_self, _parent What Gives?
I am trying to get my button, when pressed to open another page in the same window, but for some reason it keeps opening up a new browser. I have tried both _self and _parent but it still does the same thing. I know the solution is probably rather simple, can anyone help me? Thanks!

Here is my flash file:

Link to my .fla file.

How To Use _parent Or _self
Trying to get the URLRequest to open in the same window..

Btn_GemStones_mc.addEventListener (MouseEvent.CLICK, link_gem);

var GemPage:URLRequest = new URLRequest
("http://www.xxx.net/xx.html");

function link_gem(event:MouseEvent):void
{
navigateToURL(GemPage, _parent)
}

I get

Warning: 1058: Migration issue: The property _parent is no longer supported. Use the parent property instead..

_self Not Working
I made a site that opens in a new full screen window. I have some links to an external website that open in a new tab using _self

Everything was working OK but now, without changing anything, instead of opening in a new tab it opens in a different window. I donīt know if something changed in Firefox 3 or what.

Any idea? it is quite annoying

Thanks

Preloading Into _self
Dear All,

Well I am afraid it is yet another preloader question..... I have searched the forums, but don't seem to get the answer I need. OK....

I have a large flash website, with a functional preloader - the problem is that it takes a while for the swf to download, therefore by the time the preloader comes up the site is approx 50% loaded already. But before this the page remains blank.

My question is.... if I create a preloader in it's own swf, can I get it to show the progress of the main swf loading, therefore when the preloader has finished it loads the main swf ontop of itself - in other words when done...unload preloader swf and load the preloaded main swf.

I hope this makes sense!

Can anyone help!?!

Thanx,

Eternal Student.

Question About Loading Movies Into Empty MC's And Targeting, Etc
Hello -
I have an empty movieclip in which I can successfully load an external swf. Somehow I cannot enable the empty movieclip to act as a button. I've checked in the debugger and the movieclip isn't enabled.

In the frame script, I have myMC.enabled=true

myMC is the empty movieclip.

I've checked (what I believe is) everything. The instance is named correctly and everything seems to be in place. I even put a black box inside the empty movieclip thinking it needed something in there (besides the loaded movie) to work. Is it not possible to enable and empty movieclip to act like a button?

thanks
tony

Copyright Đ 2005-08 www.BigResource.com, All rights reserved