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




Targeting Issue?



I have some btn's in my main movie, and a test.swf that i am loading in a loaderclip. How do it call test.swf?


on (release) {
loaderclip.myclip.gotoAndPlay(10);
}

I hope this make sense..



KirupaForum > Flash > Flash 8 (and earlier) > Flash MX 2004
Posted on: 04-21-2005, 08:00 PM


View Complete Forum Thread with Replies

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

Targeting Issue ......
Hello

- 2 scenes
- a button inside an MC in scene 1
-button actions tell _root to gotoAndPlay scene 2

problem is it's not working......I believe it's targeting issue.....it's not telling the main timeline to goto the next scene. I t only tells scene 1 to gotto frame 1.

Any help? or suggestions?

thanks

cheers,
nigel

Targeting Issue
i have a button that i want to have an action on mouse down to target a loaded .swf on a layer and set the property alpha.

so.. can i target a layer for setting the property? if so how?
ive tried the 'set propery' taregting the layer but it seems not to be working correctly.

thanks

Targeting Issue
Hi,

I have a main movie (index.swf) that I'm loading several other movies into. One movie that loads into index is a movie that holds all the global navigation (treeNav.swf). Then I have other movies that occupy the right half of the stage and hold main content that I swap out as needed (chap1.swf, chap2.swf, etc). I've got the treeNav timeline sectioned out with labels so I can navigate to various portions. I'm trying to figure out how to load a specific point in treeNav from chap1.


In the navigation movie (treeNav.swf), I have this code in frame 1:


Code:
switch (_global.chapter){
case credits:
gotoAndPlay("credits");
break;

case chap_1:
gotoAndPlay ("chap1");
break;

case chap_2:
gotoAndPlay("chap2");
break;

case game_1:
gotoAndPlay("g1");
break;

case game_2:
gotoAndPlay("g2");
break;

case game_3:
gotoAndPlay("g3");
break;

case game_4:
gotoAndPlay("g4");
break;

case game_5:
gotoAndPlay("g5");
break;

case game_6:
gotoAndPlay("g6");
break;

case chap_3:
gotoAndPlay("chap3");
break;
}



Then from chap1.swf, I have this code:


Code:
bog_btn.onRelease = function() {
loadMovieNum("treeNav.swf", 2);
_global.chapter = chap_2;
unloadMovieNum(1);
}


The button loads treeNav.swf, but it starts it at the beginning instead of starting at the chap2 label. I tried putting "chap_2" in quotes ( _global.chapter = "chap_2") and that didn't make a difference. Can anyone see what I'm doing wrong?

Targeting Issue?
I'm having trouble accessing any of a series of MC's placed on my stage.

ActionScript Code:
//Slide preview
function slidePrev(){
    for(var i:Number=1; i<=20; i++)
    {
        //preview
        _root["slidePreview_"+ i].loadMovie(slides[i], 1);
        _root["slidePreview_"+ i]._xscale = _root["slidePreview_"+i]._yscale = 15;
        _root["slidePreview_"+ i]._visible = false;
    }
}

For some reason, even though I set the visibility of all my "slidePreview" MC's to false they are all visible on my stage.

Also, I've been unsuccessful in accessing MC's within my "slidePreview" clip.
I've used the following path without success:
ActionScript Code:
_root["slidePreview_"+ i].container.loadMovie(slides[i], 1);// does not load images
_root["slidePreview_"+ i].loadMovie(slides[i], 1);// does load images

Any advice?

Thanks!

Targeting Issue
Why are my buttons not being targetted properly.


Code:
_root.createEmptyMovieClip("bg", this.getNextHighestDepth());
this.createEmptyMovieClip("header", this.getNextHighestDepth());
this.createEmptyMovieClip("polo1", this.getNextHighestDepth());
this.createEmptyMovieClip("polo2", this.getNextHighestDepth());
this.createEmptyMovieClip("polo3", this.getNextHighestDepth());
this.createEmptyMovieClip("polo4", this.getNextHighestDepth());
// -----------
loadMovie("images/bg.jpg", "bg");
loadMovie("images/header.png", "header");
loadMovie("images/poloroid1.png", "polo1");
loadMovie("images/poloroid2.png", "polo2");
loadMovie("images/poloroid3.png", "polo3");
loadMovie("images/poloroid4.png", "polo4");
// ------------

header._x = 160;
header._y = 2;
// --
polo1._x = 210;
polo1._y = 120;
// --
polo2._x = 350;
polo2._y = 100;
// --
polo3._x = 190;
polo3._y = 280;
// --
polo4._x = 420;
polo4._y = 390;
// -------------
polo1.onRollOver = function(){
_root.i += 2;
this.swapDepths(_root.i);
}
polo2.onRollOver = function(){
_root.i += 2;
this.swapDepths(_root.i);
}
polo3.onRollOver = function(){
_root.i += 2;
this.swapDepths(_root.i);
}
polo4.onRollOver = function(){
_root.i += 2;
this.swapDepths(_root.i);
}

Targeting Issue
I build a button class and I'm trying to have it target a function I have on the main time line but I cant get them to talk.

for example I have this preloader on the main timeline


ActionScript Code:
/*************************************************
FILE LOADER
**************************************************/
var myLoader:Loader = new Loader();
myLoader.load(rIntro);
myLoader.contentLoaderInfo.addEventListener(Event.OPEN,showPreloader);
myLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,showProgress);
myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,showLoadResult);

/*************************************************
LOADER FUNCTION CALL BACKS
**************************************************/
function showPreloader(evt:Event):void {
    addChild(loadProgress_txt);
}
function showProgress(evt:ProgressEvent):void {
    var Per:Number = Math.round((evt.bytesLoaded / evt.bytesTotal)*100);//Var that getsthe % loaded
    loadProgress_txt.text = Per+"%";
    lBar_mc.gotoAndStop(Per);
}
function showLoadResult(evt:Event):void {
    removeChild(loadProgress_txt);
    removeChild(lBar_mc);
    addChild(myLoader);
}

/*************************************************
LOADER FUNCTION RESET
**************************************************/
function resetLoader() {
    removeChild(myLoader);
    loadProgress_txt.text = "0";
    lBar_mc.gotoAndStop(1);
    addChild(loadProgress_txt);
    addChild(lBar_mc);
}

Now my button calls this function when its clicked


ActionScript Code:
public function upDateMovie(e:MouseEvent):void{
            resetLoader()
            myLoader.load(rIntro);
        }

But, when I export I get a compiler error, undefined method and properties.

1180: Call to a possibly undefined method resetLoader.
1120: Access of undefined property myLoader.
1120: Access of undefined property rIntro.

Targeting Issue
Hi there,

I am making a website which includes sliding pages and a popup menu.

The sliding pages are in their own movie clip and the buttons to control this slide are located in a main menu movie clip both running in the main timeline.

I can control the slider using the following, if the buttons are located on the main timeline directly:

_root.buttonName.onRelease = function() {
endX = 985;
andY = 0;
};

for example.

When trying to use the buttons in the movieclip 'menu' the targeting selection gives me:

_root.menu.buttonName

but in conjunction with the above:

_root.menu.aboutpage.onRelease = function() {
endX = 985;
andY = 0;
};

I have no luck.

Would realy appreciate if someone could shed some light.

Thanks.

Targeting Issue?
I have some btn's in my main movie, and a test.swf that i am loading in a loaderclip. How do it call test.swf?


on (release) {
loaderclip.myclip.gotoAndPlay(10);
}

I hope this make sense..

Targeting Issue - Again
Never Mind anout the targeting issue below,

It seems it is a hover location issue. When the swf is previewed by itself, the capition is in the right location. But when loaded into the main swf, it show at the bottom.

I seem to continue to run into targeting issues.

Can someone help me make this relative?

This is a capition script I got from Kirupa.


PHP Code:



b1.onRollOver = function() { captionFN(true, "Contact Me", this.cap); this.onRollOut = function() { captionFN(false); }; }; captionFN = function (showCaption, captionText, bName) { if (showCaption) { _root.createEmptyMovieClip("hoverCaption", this.getNextHighestDepth()); cap.desc.text = captionText; cap._width = 7*cap.desc.text.length; cap._alpha = 75; // if ((bName._width+bName._x+cap._width)>Stage.width) { xo = -2-cap._width; yo = -17; } else { xo = 2; yo = -17; } hoverCaption.onEnterFrame = function() { cap._x = _root._xmouse+xo; cap._y = _root._ymouse+yo; cap._visible = true; }; } else { delete hoverCaption.onEnterFrame; cap._visible = false; } }; 

Targeting Issue
hi all, i'm trying to load an swf into a movie clip that's nested inside of another movieclip. however, i'm trying to do this from an external text file that's loaded into a dynamic text box. i'm using the a href mode of html linking within a dynamic text box, and targeting the movieclip in various ways, such as: target="_parent.container.gallery" "parent.gallery.container" "gallery.container" "_self" "_root.container.gallery"
etc... but all open a new window. this is relatively easy to do when loading into an iframe (just using the name of the frame). have been looking around for posts addressing this, but haven't found any. any help would be greatly appreciated!
best from berlin.
paul

AS3 Targeting Issue
Hello all,

I'm building an mp3 player and I'm having problems targeting the "background" bar of my button on rollover. The button is pretty simple. It has a black bar bg, white text on top. Right now the rollover state is targeting "e.target", which I know is wrong, since that is the whole button sprite and I just want the bg bar. So when I try "e.target.sndBtnBg", that doesn't work. Anyone know how I can target the "sndBtnBg" on rollover? I'm attaching an image of what the player buttons looks like.

Thanks in advance!

Here's the code I'm using to generate the buttons:


Code:
for (var i=0; i < songlist.length(); i++)
{
var soundButton:Sprite = new Sprite(); //Button Container

var sndBtnBg:Sprite = new Sprite(); //Black Bar
sndBtnBg.graphics.beginFill(0x000000);
sndBtnBg.graphics.drawRect(0,0,950,45);
sndBtnBg.graphics.endFill();
sndBtnBg.y = 60 + sndBtnBg.height * (i * 1.025);
soundButton.addChild(sndBtnBg);

var sampleText:TextField = new TextField();//Text sampleText.autoSize = TextFieldAutoSize.LEFT;
sampleText.multiline = true;
sampleText.wordWrap = true;
sampleText.width = 195;
sampleText.text = songlist[i].title;
sampleText.y = sndBtnBg.y + 8;
sampleText.x = 14;
sampleText.setTextFormat(format);
soundButton.addChild(sampleText);

addChild(soundButton);
enableBtn(soundButton);

trace("[" + i + "]", songlist[i].title);
}
}

private function enableBtn(e:Sprite):void
{
e.buttonMode = true;
e.useHandCursor = true;
e.mouseChildren = false;

e.addEventListener(MouseEvent.MOUSE_OVER, btnOver);
e.addEventListener(MouseEvent.MOUSE_OUT, btnOut);
e.addEventListener(MouseEvent.MOUSE_DOWN, btnDown);
}

private function disableBtn(e:Sprite):void
{
e.removeEventListener(MouseEvent.MOUSE_OVER, btnOver);
e.removeEventListener(MouseEvent.MOUSE_OUT, btnOut);
e.removeEventListener(MouseEvent.MOUSE_DOWN, btnDown);
}

private function btnOver(e:MouseEvent):void
{
TweenLite.to(e.target, .2, {tint:0x008BAA, ease:Quad.easeIn});
}

private function btnOut(e:MouseEvent):void
{
TweenLite.to(e.target, .3, {tint:0x000000, ease:Quad.easeIn});
}

Mac File Targeting Issue
In every other situation I've ever had flash targets urls relative to the
htm page it's embeded in, but in this case it's trying to go relative to the
swf.

I have a site with htm pages at the top level. Some of these have swf's
embeded in them. The swf's are located in a folder called "Flash".
Everything seems to work fine on every computer that I've tested it on
except for one report from a Mac user. ( I've tested it on 1 other Mac and
it works fine ) I can see what is happening but can't explain it. Here's an
example...

One of the swf's, that is embeded in the home page contains a link to a page
called "history.htm". History is in the same folder as Home. The link in
the swf says Get URL ("history.htm") and it's absolute path would be...

root_folder/history.htm

Because the swf is in a folder called Flash the browser is trying to open it
like this...

root_folder/flash/history.htm


Any Mac users out there that have a suggestion?

Weird Targeting Issue
I'm using attach movieclip and my target path is like this _root.mov + i.mov and every time one is attached i becomes a progressivly higher number like this: _root.mov0.mov _root.mov1.mov and so on. My problem occurs when I try to target it. What I'm doing is I have a variable on the inside of the movieclip after it gets created the variable on the inside equals the i on the root frame. Basically I want the movieclip to be able to target itself with an absolute path because using a relative path seems to cause problems. Like a remove movieclip targeting the wrong one. Check out what it currently is at http://www.typhoonent.com/body invader.swf

I Swear This Is A Targeting Issue.. :(
...but i am so lost. everything's pretty explanatory in the fla attached. basically i'm trying to find a way to either make te animation that i have play appropriately, or a way to not use the animation and script the effect alltogether. any help would be greatly appreciated. and thanks in advance to all those who reply.

Please, Help Solve A Targeting Issue......
Sorry for the newbie question, and I've searched several forums trying to find what I'm missing and I just don't see it. Please kick me in the right direction!!!

I'm trying to build an animated menu with seven buttons, 3 of which need a submenu. I have 4 regular buttons and 3 mc's on the main timeline.

After creating the first mc with 6 submenu items that appear onRollover and trying to target the submenu buttons to open a new page nothing happens when I click on the button.

I attached this code to the submenu button while it in the "Over":

Code:
on (release) {
this.skiMenu_mc.skMain_btn.getURL("ski/sk_main.htm", "_self");
}
Here's the complete fla file if you're interested

BTW, I'm using Flash MX 2004 if that helps!!!

Targeting Issue That I Can't Seem To Work Out
I've been pounding my head against this for about an hour and a half. It should be easy, but I can't seem to get it right...

When you click on the big button, two small buttons (contained in the movie clip "flyOout") fly out. When you click on those small buttons, they attach a movie clip to a "container" mc. But they don't seem to track as buttons!!

Here's the AS:

ActionScript Code:
_root.bigBtn.onEnterFrame = function() {    if (rewind == true) {        flyOut.prevFrame();    }};_root.bigBtn.onRollOver = function(){    rewind=false;    flyOut.play();}_root.flyOut.subBtn1.onRelease= function(){    rewind=true;    _root.container.attachMovie("circle","blueCircle",2);}_root.flyOut.subBtn2.onRelease=function(){    rewind=true;    _root.container.attachMovie("circle copy","greenCircle", 2);}


It's probably very obvious, but I can't puzzle it out. Thanks in advance!

Targeting Issue And NextHighestDepth() ...
Hi everyone,
I am trying to built an API/white board thingy ...
and would like to create kind of a stamp/clone tool, putting multiple
instances of a star on the stage.
There is also a color palette that changes my fillColor. Right now I have:


Code:
holder = _root.createEmptyMovieClip("container", 200);
star_stamp.onMouseDown = function() {
if (star_stamp.isActive) {
var r = holder.attachMovie("star", "star", holder.getNextHighestDepth());
r._x = _root._xmouse;
r._y = _root._ymouse;
new Color(r).setRGB(fillColor);
}
};
Everything works, except when I choose a color and MouseDown on the stage,
the initial r changes the color and not the new r (if that is understandable ???)
I just cant figure out how to target the new instance of r. Is there a way to do so???

Thanks for any advice and help.

Button Targeting Issue
Hi guys,

I have a 2 part button that consists of a bitmap arrow and a textfield for the name. They are both wrapped in a container, which I'm using as a eventlistener for the button states. The problem is that when I do the "out" state of the button, it tweens both my bitmap and my text, where I only want it to tween the text. The arrow is white and the text is gray so on hover I want the text to be white, and the arrow to not change, then on the "out" the text go back to gray.

Here's my code:

Code:
var tmpBitmap:LinkArrow = new LinkArrow(14,13)
link1 = new Bitmap(tmpBitmap);
link1.x = 562;
link1.y = 350;
link1Container.addChild(link1);

linkTxt1 = new LucidaText(link1String, 10, "bold", 0x333333);
linkTxt1.x = 582;
linkTxt1.y = 349;
linkTxt1.alpha = .9;
link1Container.addChild(linkTxt1);

link1Container.addEventListener(MouseEvent.CLICK, linkClick);
link1Container.addEventListener(MouseEvent.MOUSE_OVER, linkOver);
link1Container.addEventListener(MouseEvent.MOUSE_OUT, linkOut);

function linkOver(e:MouseEvent):void
{
trace("over");
TweenMax.to(e.target, 1, {tint:0xFFFFFF, ease:Quad.easeOut});
}

function linkOut(e:MouseEvent):void
{
trace("out");
TweenMax.to(e.target, 1, {tint:0x333333, alpha:.8, ease:Quad.easeOut});
}
Thanks in advance!

Yianni

Please, Help Solve A Targeting Issue......
Sorry for the newbie question, and I've searched several forums trying to find what I'm missing and I just don't see it. Please kick me in the right direction!!!

I'm trying to build an animated menu with seven buttons, 3 of which need a submenu. I have 4 regular buttons and 3 mc's on the main timeline.

After creating the first mc with 6 submenu items that appear onRollover and trying to target the submenu buttons to open a new page nothing happens when I click on the button.

I attached this code to the submenu button while it in the "Over":

Code:
on (release) {
this.skiMenu_mc.skMain_btn.getURL("ski/sk_main.htm", "_self");
}
Here's the complete fla file if you're interested

BTW, I'm using Flash MX 2004 if that helps!!!

Preloader Targeting Issue?
Hiya, I am loading a .swf(portfolio.swf) into another .swf's(main.swf) mc. I have a preloader on the first frame of the portfolio MC which is a movie clip and the MC itself contains the following as::


Code:
onClipEvent (load) {
total = _root.getBytesTotal();
trace(total);
}
onClipEvent (enterFrame) {
loaded = _root.getBytesLoaded();
percent = int(loaded/total*100);
trace(percent);
text = percent+"%";
gotoAndStop(percent);
if (loaded >= total) {
_root.gotoAndStop(2);
_global.homeLoaded = "true";
trace("global="+_global.homeLoaded);
}
// end if
}

So the preloader just shows up at the very last second... I am guessing that it is a targeting issue somewhere around the _root.getBytesLoaded().

Any thoughts!?

Happy Holidays y'all!

Movie Clip Targeting Issue?
Hey guys,

I am having a problem with a dropdown stlye menu that I am working on.
I have a MC on the root timeline called "navIdent_mc". This MC has a onRollOver action attached to play frame two of itself. Inside on "navIdent_mc" I have four other MCs which serve as menu items called
"id1_mc" , "id2_mc" , "id2_mc" ,"id2_mc". Each of these Mcs have a onRollOver script which simply changes each ones text color. Every thing loads properly except that the "id_mc" do not respond when rolled over.

Here is the code I am using on frame on of the root timeline. (there is no empty MCs or external content loaded in.)
This is just an example of the script for "navIdent_mc" and it's child "id4_mc"

Code:

stop();
this.navIdentBtn_mc.onRollOver = function() {
   navIdentBtn_mc.gotoAndPlay(2);
};
this.navIdentBtn_mc.onRollOut = function() {
   navIdentBtn_mc.gotoAndStop(1);
};
this.navIdentBtn_mc.id4_mc.onRollOver = function() {
   navIdentBtn_mc.id4_mc.gotoAndStop(2);
};
this.navIdentBtn_mc.id4_mc.onRollOut = function() {
   navIdentBtn_mc.id4_mc.gotoAndStop(1);
};


Here is a link to the FLA:
[url]
http://www.liquidpentium.com/file_post/ ... est_f8.fla
[/url]

Targeting Issue With Nested Movie Clips
For a multiple choice type quiz, I am have problems targeting a nested movie clip. The design calls for the answers of each new question to change to a defined color. I am using .setTint on "ans_btn_bg_solid_mc" to accomplish this.

Nothing happens.

As a test, I set some other properties of the movie clip - changing its rotation and x coordinate - to test if it was just the tinting, or a targeting issue. While I saw no rotation change or x coordinate on screen - it seems that is has set the new rotation and x coordinate b/c they trace back the new values!

I don't think it's a matter of the tint of rotation being overwritten, b/c they are not set anywhere else. I don't get it.

Thanks for reading!


Code:
function setUpAnswers(whichSide):void{
//not true randomization, this finds a random starting point for looping through the answers
if (randomize){
var r:Number = Math.floor(Math.random()*answers_scores.length);
}
for (i=0; i<answers_scores.length; i++){
if (randomize){
r++;
if (r > answers_scores.length - 1){
r = 0;
}
}else{
r = i;
}
var whichAns = this["answer" + i];
whichAns.atext.htmlText = contentXML.questionAnswers.page[pagenum].answer[r];
whichAns.anum = r;

// change the color of the answer background for each question
var ct:Color = new Color();
ct.setTint(0xff0000,1);
whichAns.answer_btn_bg_mc.ans_btn_bg_solid_mc.transform.colorTransform = ct;

//itilize answers off stage for tweens onto stage
whichAns.aname.x = -999;
whichAns.atext.x = -999;
whichAns.visible = false;
//controls positioning and y-reflection of movie clip based off whichSide
if (whichSide == "top"){
whichAns.y = 300 + i * 65;
whichAns.answer_btn_bg_mc.scaleY = -1;
whichAns.answer_btn_bg_mc.y = -115;
} else if (whichSide == "btm"){
whichAns.y = 135 + i * 65;
whichAns.answer_btn_bg_mc.scaleY = 1;
whichAns.answer_btn_bg_mc.y = 147;
}
}
}

Targeting Issue With Multiple Attached Slideshows
My flash file creates multiple slideshow instances. These slideshow's are each controlled by some buttons and AS code that reside within the attached container clip. The code for buttons and slideshow nav is as follows (this resides on first frame of attached movie, not on _root):


Code:
// next and prev buttons
Prev_btn.onRelease = function() {
prevImage();
};
Next_btn.onRelease = function() {
nextImage();
};
// next and prev functions
prevImage = function() {
//goes to previous image
}
nextImage = function() {
//goes to next image
}
This works fine and when I push these buttons it controls the slideshow that they are part of as expected.

Now, I want to add the option of navigating with the keyboard using arrow keys. I've set this up like this:


Code:
var keyListener:Object = new Object();
keyListener.onKeyDown = function() {
if (Key.isDown(Key.LEFT)) {
prevImage();
} else if (Key.isDown(Key.RIGHT)) {
nextImage();
} else {
//nothing
}
};
Key.addListener(keyListener);
The problem is that instead of just controlling the slideshow for which you are viewing, the keys control all other slideshows as well at the same time. Where the buttons, when you click them, control only the slideshow that they are contained in.

I've tried writing an absolute path to the specific slideshow movie in question like:


Code:
_root.theInstanceName.prevImage();
...And it does correctly target only this slideshow, but for some reason targeting it like that completely messes up the prevImage animations--image size, animation timing, etc. is all off.

So I need to find a way that targets only the specific slideshow in question but also plays nicely with my navigation functions. Any ideas?

Targeting Issue With Preloader And Trans For Dynamic Files
Hello all!
I was modifying the tutorial for a Preloader and Transition for Dynamic Files - for reference, it's located here....
http://www.kirupa.com/developer/mx/p...transition.htm

I have [almost] everything working beautifully, but have been stumped at getting the initial screen to load, and am at my wits end.....

the directory containing all of the files is located here:
http://faculty.cmsu.edu/twhite/kirupa/

The directory contains all of the files to display, and .fla for any code inspecting....
postcard.swf loads container.swf into it (which in turn loads 2 other swfs into container...). container.swf houses the preloader and transitions. This file seems to work wonderfully on it's own, but when I try to view postcard.swf, it will not display the initial movie (when i use the buttons to view the other swfs - they work great).

The easiest way to see what I'm talking about, is to first view container.swf - this will display the movie that i'm talking about.....

then view postcard.swf, and you'll notice that it does not display.

I am really frustrated.... I'm almost positive that it's a targeting issue, but have exhausted all of the possibilities I could think of.

Any help would be MUCH appreciated, as I'm running out of time on this project. Don't hesitate to contact me if I was unclear, you you need more info.

Thanks!
Trent

OnClipEvent Inside An External Movie Targeting Issue
I've been asked this question several times and don't have an answer so I'm hoping someone can shed some light on this for me. People using the form mailer decide to load it externally and when they do they discover that the form won't go to the "thank you" frame. The onClipEvent (data) I assume fires but then you have
ActionScript Code:
_root.nextFrame();
which works fine when the external is tested as the main movie. Now, I've tried using
ActionScript Code:
this._lockroot = true;
on the main timeline of the external swf and that didn't work. What is the secret to firing an onClipEvent inside an externally loaded swf?

[CS3] Still Having Clock Time Zone Issue---and Dynamic Text Box Issue
I'm trying to do a clock that displays another time zone. The problem I'm having is that instead of running on a 12 hour clock, its on a 24hr one.

any insight as to how I can change the time?
Currently the clock is displaying
23:00p-Jul.22

I want it to display 11:00p-Jul.22

var dayText:String;
var dateText:String;
var monthText:String;
var AmPm:String;
_root.onEnterFrame = function() {
var myDateate = new Date();
//var sec:Number = myDate.getSeconds();
var min:Number = myDate.getMinutes();
var hour:Number = myDate.getHours();
var day:Number = myDate.getDay();
var date:Number = myDate.getDate();
var month:Number = myDate.getMonth();
//var year:Number = myDate.getFullYear();
//sec = sec<10 ? "0"+sec : sec;
min = min<10 ? "0"+min : min;

//AM/PM
if (hour>12) {
hour = hour-12;
AmPm = "p";
} else {
AmPm = "a";
}


//day
if(date == 1 || date == 21 || date == 31) {
dateText = date+"";
} else if(date == 2 || date == 22) {
dateText = date+"";
} else if(date == 3 || date == 23) {
dateText = date+"";
} else {
dateText = date+"";
}

//month
if (month == 0) {
monthText = "jan";
} else if (month == 1) {
monthText = "feb";
} else if (month == 2) {
monthText = "mar";
} else if (month == 3) {
monthText = "apr";
} else if (month == 4) {
monthText = "may";
} else if (month == 5) {
monthText = "jun";
} else if (month == 6) {
monthText = "jul";
} else if (month == 7) {
monthText = "aug";
} else if (month == 8) {
monthText = "sep";
} else if (month == 9) {
monthText = "oct";
} else if (month == 10) {
monthText = "nov";
} else if (month == 11) {
monthText = "dec";
}

//display
dateDisplay.text = hour+":"+min+ AmPm + "-" + monthText+"."+ dateText;
};

Complex Audio Issue..or Maybe Just Syntax Issue
what's up peoples. I'm building a new site for my studio and having some audio issues i can't explain very well, so here goes:

I've got an external .swf successfully loading into _level6 of my project with it's own audio. and from reading thse forums, i know that if i want to control the audio independently of other audio, i need to attach the sound object to a seperate movieclip, which i'm doing and I can control the audio just fine. However, when i click to load in a dynamic image into a dynamicly loaded movieClip, the volume button no longer works. Both the soundobject's mc and the dynamic mc's are being loaded into the nextHighestDepth() so i don't think one is kicking out the other. Here's what i've got:

Code to attach the soundObject when the section starts:

Code:
this.createEmptyMovieClip("soundstage6",this.getNextHighestDepth());
work_sound = new Sound(soundstage6);
work_sound.attachSound("myaudiofile");
work_sound.start(0, 999);
Code to control the volume:

Code:
this.testVol.onPress = function () {
this._parent.work_sound.setVolume(0);
}
Code that loads in my dynamic images:

Code:
this.testLoad.onPress = function () {
_root.attachMovie("infoClip", "infoClip", this.getNextHighestDepth(), {_alpha:0, _x:491.1, _y:193.9});
}
that testLoad button does severl other things when clicked, but when i comment out that particular line of code, the volume control button contines to work. I'm sure this has something to do with the fact that all of this is occuring on _level6 but i have no idea why or how to fix it!!!

Anybody have any ideas? Sorry for the long and complex explination!!

Mac Textinput Issue + New Player Fullscreen Issue
Please inform me if I am a total idiot,... but it appears that holding down backspace while in a TextInput on a mac will only delete one character rather than deleting chars as long as the button is held down. I have tried making the simplest project consisting of only a base sprite and a textinput, and it fails (i thought i may have been preventing the event from bubbling or something.) I tested the movie on PC and holding down backspace works fine. Is this a known issue? and so I just have to extend textInput?...

Also, it seems like when coming back from fullscreen in a swf embedded on a page causes some flickering of the swf content upon resizing the browser window, 3 people I know have also encountered this problem.

Thanks for any help,

Chris Laan

Button Issue In Flash - Program Issue
all of a sudden when i create a button and place it on stage i cant click it to drag it, scale or whatever...instead when i hover over it it behaves as in a compiled swf file (cursor changes into a hand,...).
How can i change that to the way it was? Anyone had this problem before? It is becoming really irritating.

Level Issue Or Version Issue?
hi,

wondering if anyone knows why this movie here:

http://www.pixel360.com/dev/zoompan.html

works fine as it is, but when loaded into another movie, into an MC called 'blankmc1' it will drag, but not zoom?

Also when i try exporting it as AS 2 and Flash8 the zoom handle sticks to the top of the screen?

source here:
----------------------------------------------
http://www.pixel360.com/dev/zoompan.fla

weird?

Help With Crash Issue/actionscript Issue
Hello all,
My name is Josh and I want to say thanks for even reading my post, I appreciate any help I can get. I am here at work trying to edit a flash intro I bought from templatemonster (no im not a newbie, but this is the one my boss really liked, so what he wants he gets). Im trying to edit it here and i first opened it in Flash 8 which is what i normally use. So, im editing it and usually after I edit a few things I would like to get a glimpse so i test the movie real quick. Well, everytime the "export movie" dialog box came up, it stops at about a little more than half way and the box goes away and NOTHING comes up. IT doesnt freeze, but my test movie doesnt show like something usually would. So i tried installing/uninstalling it to no avail. Finally my boss went out and purchased flash cs3 and we installed that. So im editing it again, and went to test movie, and this time it gets 3/4 way done and "flash has unexpectedly quit" etc etc. So im starting to think its something with the actionscripting maybe?? i dont know but im really frustrated and need some help here. And also, even if I tried to just plain export the movie to swf, crashes too!
Thanks everyone!
-Josh

Flash 8 Pro Issue Interval Issue
Hey, I've been working on my site for a few weeks trying to get it all just right, and I'm making it import text, to text fields from external documents, I've been using loadVariablesNum() and createTextField() to post the text onto the flash document.


ActionScript Code:
//0x393c39;
       
this.createTextField("forum_box",this.getNextHighestDepth(),212,3,162,120);
forum_box.wordWrap = true;
forum_box.border = true;
loadVariablesNum ("forum_txt.php", 2);
function ftv() {
   if (_level2.forum_txt != undefined) {
      trace(_level2.forum_txt);
      forum_box.htmlText = _level2.forum_txt;
      clearInterval(ftt);
   }
}
var ftt:Number = setInterval(ftv, 100);

this function keeps looping, it is in a frame that is only called once, i tested this by placing a trace at the very begining , just to see if it would echo it to the output screen more than once, It seems my interval isn't stopped by clearInterval(). if anyone can see my issue here it would be greatly helpful.


Thanks

Targeting...
Hey, is it possible to target a Movie clip to load an external swf file? I think it is, just not 100% on how to do it.

Targeting One Swf From Another?
I have a master swf file [master.swf] containing an empty MC [empty] containing another swf file [second.swf].

I would like second.swf to have a back button that needs to unload itself from the MC in the master.swf - is this possible and what is the correct syntax for this?

Any help appreciated.

Targeting Mc's.....
I have several html pages, each with a swf movie. Can I target different Mcs and frame labels from one html doc to another html doc? Does that make sense? I bascially have a standard menu for all these swf files, and I want to be able to target specific areas in these pages...or do I have to wait until the page loads and then navigate to these areas???

Targeting
I have a button in a movie (old.swf) in level 1. This button loads a new movie (new.swf) into level 1 thus replacing old.swf.

The problem is I want the new movie to go to frame 10 when it loads. At the moment I can only get it to go to frame 1 when it loads.

I have tried
on (press)
load movie ("new.swf",1)
tellTarget ("_level1")
gotoAndStop ("10")

This doesn't work...
Is it because old.swf which has the button and thus the tell target command is being replaced by new.swf?

Can anyone help me?

Thank you for your time
Regards
Slade Smith

Targeting URL
HI,

can someone tell me if its ok to put in just filename.html without specifying directory when wanting to open a url from within a flash clip. ( i want to put in onto either cd or disk, but am not sure..thats why am asking)

and is ''window'' , the frame where you want the url to open in?

thankyou.

Need Targeting Help
I have my main movie. In it I have a MC (instance is named outer) which contains a button. The button's down state contains a MC (instance named theclock). The "theclock" MC was designed originally as just two frames, the first did date calculations and the second just sent control back to the first fame to repeat and update constantly.

I was thinking it might be better if I used the onclipevent(enterframe) control in the button's down state to run the date calculations instead of running the calculations within the movieclip itself. First, will it make any real difference if I have actions of the MC instance "theclock" run the calculations instead of running the calculations from within the MC itself. Second, if I should do that, what's the proper path so that the onclipevent(enterframe) calculations target the text fields in the "theclock" MC? I thought this.textfieldname=whatever would work but it doesn't. Any help is appreciated.

Targeting Swf
say i have a html with 2 swfs in it, how do i sent variables from one swf to another?

Targeting
I'm having trouble targeting a certain object and using hitTest.i want to do A hitTest on board1 and railtop


onClipEvent (enterFrame) {
if (_root.guy.ollie.board1.hitTest("/rail/railtop")) {
tellTarget ("/guy") {
gotoAndStop (11);
}
}
}

railtop is in the clip rail. and board1 is in ollie, that is in guy.when they touch i want them to play frame 11 in the clip "guy". I dont know what i did wrong. if any1 can help please do.

Targeting
I asked about pop up windows in another post. I was wondering if I wanted to have a button loaded in an empty movie clip open up a pop-up browser window if i has too target the button as in _root.empty3
Shesssh I'm SO lost!

Targeting A Swf
i am working on a website where i want my global features to remain constant, while my content is all in separate swf files. This works fine if i make the swf the same size as my level 1 movie, but i ran into a problem with pages where i need to use a scroll. what i am trying to figure out is how to open a smaller size swf on top of the global and target it to the xy where i want it to open. I know it's probably something simple- but I'm kinda new at this....

Targeting Help
OK i have a file named red, another blue.
If a had a dynamic text box in the center of my screen, and a red and blue button to the left of it, how would i make the red.fla open in the text box once you click on the red button (same with the blue)...?

Help With Targeting?
Hello. I need help with a script.
I have a movie clip, news_box, with a button, details_b, inside the movie clip. The news_box mc is placed on the main timeline of my movie, upcoming.swf . So when I press the button, details_b, I want to advance to a different frame labeled, show1,on the main timeline of upcoming.swf . I tried this code, but It doesn't work. I know it's something simple:

on (release) {
gotoAndStop._root."show2";
}

any help appreciated!

Please Help With Targeting
Please help with target
I need a button to load a movie .swf and then go to a specific frame label. How would the code look?

mark

Targeting MC's Within MC's
Hi there guys how do I target a movie clip within a movie clip.
For example I have a movie clip called ‘Dom’ with a movie clip inside that called ‘the_bom’ what I want to do is get ‘Dom’ to do something (this part works fine) however load a url into the ‘the_bom’ MC, however since the MC ‘the_bom’ is inside the MC ‘Dom’ the following syntax will not work.

on (rollOver) {
dom.gotoAndPlay(“start”);
loadMovie("picture1.swf", "the_bom");
}

I know the problem is down to the latter part of the load movie line, however I have no idea how to target an MC ‘the_bom’ that is embedded with another MC ‘Dom’

Really simple question if you know how – thanks is advance

Targeting...
Hi
I have a movie clip on my main timeline.
When the clip is triggerred to play, it contains a "close" button.
On release, I want the movie clip to play, AND send the main timeline to frame 37.


The close button contains this action:

on (release) {
_root.gotoAndStop(37);
play();
}

This isn't working...it's sending my main timeline to the first frame. I tried replacing _root with _level0 and that didn't work either.

What am I doing wrong?!
Thanks

Targeting
Hi all,

I am making a simple futuristic jousting type game. The opponent will be coming towards you and you will have to hit the target (a shield) by aiming your lance at it with the mouse. I guess this could be a variation on a shootng type targeting system!?

I want the lance to wobble so that it is not too easy to aim. Is this quite easy and does anyone know how this type of thing can be done? I also need some type of simple scoring mechanism...any help appreciated!

Targeting
First let you take a look at my first website:

http://www.ddrnetwork.net/ali/index.html



ok now the problem you cna probably see is that it is annoying that once you clik the link it has to load a whole new page. is there a why i can for example, click on the story link when i'm the home and it loads up in a specific part of the flash document? plz help me. i'm on a schedule.

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