ActionScript 3.0 :: Reference A Specific Frame Inside A MC In .swf File?

May 30, 2009

I'm trying to reference a specific frame inside a MC in my .swf file from an .as file.What I want is to capture the current frame of the movie clip for the .as file. It's for the purpose of points when you shoot each plane. It's an easy trick of frame 1's plane would be worth 100 points, frame 2's plane 200 points, etc.I thought I'd write a line like this in my collision detection section of my .as file.

Code:
planePoints = currentFrame * 100;

The only problem is, of course, it grabs the current frame of the main .swf timeline that my flash file uses, and not the movieclip that's being called to produce the planes.So I thought I'd be able to specify a path to the movie clip (in this case it's called Airplane in the MC's linkage properties)

Code:
planePoints = Airplane.currentFrame * 100;
Then, of course, it freaks out and says that 'access of possibly undefined property currentFrame through a reference with static type Class.'

I still get confused with AS3 and the way items are handled vs AS2. I've lost track of how many times I type _root.

View 2 Replies


Similar Posts:


ActionScript 2.0 :: Goto A Specific Frame Inside A Movieclip?

May 14, 2010

I have a time line with 2 frames only. On frame 1 I have a Movie Clip that contains a gallery and its called "gal1" on frame 2 I have another Movie clip called "gal2". Now I have 2 buttons to call each of these galleries which this code in them[code]...

But when I am in gal1 and I want to click on the second botton to call gal2 with the same exact code attached to button2, it doesn't work!

View 5 Replies

Actionscript 3 :: Get Parent Frame Reference From Inside A Function?

Jan 5, 2012

This is my code in Flash/AS3, in a frame's action:

import flash.events.Event;
stop();
this.addEventListener(Event.ENTER_FRAME, loading);
function loading(e:Event):void{

[Code]....

This is because I believe it is referring the splashTimer1 function by "this".

How can I refer to parent frame there, so that I can remove its event listener.

View 2 Replies

Flash :: Methods To Objects Inside A Movieclip With Reference To Frame Label/number?

Mar 14, 2011

there is a movieclip named movie with instance name movie.Inside this movie there is a textbox in frame 1.I want to give properties and methods to that textbox.

View 1 Replies

Action Script :: Open Swf File At Specific Frame?

Apr 25, 2010

I have a main website witch has a photo gallery, in an album for example I have 5 photos in thumbnail mode, I created an independent slide show in SWF called genova.swf where I have inside the 5 high res. photos found as thumbnail in the main website, and I used the following script to call it :

var mcLoader:MovieClipLoader = new MovieClipLoader();
mcLoader.addListener(this);
function onLoadInit(mc:MovieClip) {
mc.close_btn.onRelease = function() {

[Code]....

I would like to have an action script that permits me to click on a thumbnail and to load the genova.swf to a specific frame, that way if the user need to see immediately photo #3 without having to cycle through photo #1 and #2
he would click on the thumbnail photo #3 in the main website and the genova.swf will popup at image 3 from the slideshow.

View 2 Replies

ActionScript 1/2 :: Stop Looping File At Specific Frame?

Oct 19, 2011

Ive created a banner ad in AS 1.0-2.0. The ad can only loop 4 times then it must stop. The following code does this at frame 170. The timeline is 170 frames in length, and this code is keyframed on an actions layer on frame 170 - however, I'd like the final stopped flash swf file to occur at frame 155. I can't just put this code on frame 155 - it skips a whole section of  animation (from frames 155 to 170) that I want to keep in the loops. 
 
loop = loop + 1
if (loop < 4) {
this.gotoAndPlay(2);
} else {
this.stop();
}

View 3 Replies

ActionScript 2.0 :: Link To External Swf File With Specific Frame?

Jan 15, 2006

How do I link from one specific frame in one swf file to another specific frame in another swf file?It should be something like...

on(release){_root.gotoAndStop(8)}

...but where I want to get linked to another file in frame 8.Do I just simply rewrite _root to something else?

View 6 Replies

ActionScript 2.0 :: LoadMovie() Jump To Specific Frame (another Swf.file)

Jun 19, 2007

My problem is :

A.swf : 5 frame (ie, page1, page2, page3, page4, page5)
B.swf : 2 frame (ie, page6, page7)

When click on back button in the page6(B.swf), wish to jump back to page5(A.swf) instead of page1 as normally

Script using :

back_btn.onRelease = function() {
loadMovie("A.swf",0);
};

B.swf jump to A.swf, but go to frame 5 instead of frame 1 in A.swf.

What should i do for the script to achieve what i mentioned above?

View 5 Replies

ActionScript 2.0 :: Load Movie To A Specific Frame In External File?

Nov 7, 2007

The title of my main file is "Gabriel96.fla". Inside this file I have a movie clip called "home movie". Inside this movie clip i have a button called "Symbol 32". Once this button gets clicked, I'd like it to go to frame "joe" which is inside a movie clip called "porrtfolio", which inside a separate file called "portfolio55.swf".

View 4 Replies

Jump To Specific Frame On Movie File When Relevant Button Clicked

Aug 26, 2009

I have many buttons in a few movie files, i need to select a few of these buttons and store them in an array so i use....

var twocolourbuttons:Array = ["mybutton1", "mybutton23", "mybutton34"];

I then need to show a movie file if the button that has been clicked on is in the array. so something like...

if e.target.name is in the array show the movie twocolor.visible = true;

i then need to go to a certain frame of the movie, depending upon where the button is found in the array. So if the button is at position three of the array, i need to jump to keyframe 3 of my movie.

View 1 Replies

ActionScript 3.0 :: Load And Play A Swf File Form A Specific Frame Number?

Jul 14, 2009

i want to load and play a swf file form a specific frame number

So when a swf finishes i want to load another swf file from frame number 6430.
Is it possible or not

View 3 Replies

ActionScript 3.0 :: Linking - Calling An Specific Frame Or Movieclip From A Loaded Xml File?

Apr 28, 2010

Anyone knows if there's a way of calling an specific frame or movieclip from a loaded xml file? I have some xml text loaded to my flash site and i want to have a link in this text that when clicked loads a comment form that is in a different frame in the timeline. I've been looking and googling and i havent found any solution to this.

View 1 Replies

ActionScript 2.0 :: Laod Movie Make It Goes To Specific Frame In Separate File

Nov 6, 2007

I have a movie clip within file A.fla. This movie has buttons. Each of the buttons should go to their respective frame within a movie clip from a separate file.

View 4 Replies

ActionScript 3.0 :: External Loaded Swf Completes Playing Should Jump To Main File Specific Frame

Nov 28, 2009

when a external swf file gets loaded into main swf file, i need to detect while playing external file reach to end so that i can unload that file and move to another frame on root of main file. I am not getting how to identify external swf play reach to end so that i can unload swf and jump to root specific frame of main swf.

View 1 Replies

ActionScript 1/2 :: Link A Button Inside A MC On Frame1 To A Frame Inside Another MC That Is Located On Another Frame?

Apr 25, 2011

is there any way I can link a button inside a MC on frame1 to a frame inside another MC that is located on another frame.Ive got 2 frames in total. On the first frame Ive got an Mc and inside this one Ive got a button that needs to be linked to frame number 50 which is inside a MC located on frame number 2.

View 1 Replies

ActionScript 2.0 :: Change The Colour Of A Graphic In A Specific Movie In A Specific Frame

Mar 31, 2006

i need to change the colour of a graphic in a specific movie in a specific frame. if i have a movie clip instance-named "sidetext" thats 15 frames long, and i want a graphic in the movie, called "letterp" to change to one of four colours that i want it to randomly at frame 10 and stay that colour uintil frame 15, how can i do this?

View 2 Replies

Flash 10 :: Export Specific Frames Not All Frame - Specific Timeline

Sep 15, 2010

how do i export specific frames not all frame. ex: if flash has 1 to 200 frames. here i want to export 51 to 150 frames as a movie. if there is any command or plugin to export movie like this.

View 0 Replies

Target A Specific Frame In Specific Movie Clip?

Dec 3, 2009

I have been doing really well figuring everything out up until now.[code]How it stands, what is this link pointing to? Can I make it target a specific frame in a specific movie clip?And if someone would be so kind and explain what this is saying in 3rd grader terms.

View 3 Replies

ActionScript 3.0 :: Load Specific SWF At Specific Frame By Default?

Sep 21, 2009

Basically once my animation loads I want to pull in an external SWF at a specific frame, basically like the "home page" swf that will display first. Underneath that I will have "About Us, Contact, etc..." and those will each load an external SWF into my movie clip. My movieclip right now is called mcHolder. Here is the code I am currently using for the buttons:

Code:
//About Us Button
function test2(evt:Event):void{

[code].....

View 1 Replies

ActionScript 1/2 :: Specific Frame On A Specific Movieclip?

Sep 1, 2010

I'm trying to get the following movieclip smallbutton to link to frame 5 on movieclip cont.The way the timeline is built is as so:content_mc > cont > (more mcs) > smallbuttonThis seems to be an issue from every answer I've tried so far since the movieclip "cont" is not being called in the main timeline; first there's content_mc and then comes cont.How would I go about getting the movieclip "smallbutton" to link to the 5th frame of movieclip "cont"?This is for AS 2.0So far I'm at:on (release) {  _root.gotoAndPlay("cont");  _root.smallbutton.gotoAndPlay(5);

View 7 Replies

ActionScript 3.0 :: Create A Frame Label On A Specific Frame?

Aug 6, 2009

if its possible, via AS3, to create a frame label in a movieclip on a specific frame.

Obviously I can do it by manually by setting up labels on the timeline within the target movieclip, but I would rather use an array so I can loop through it, creating a label name on a the specific frame each time?

so for example I would end up with:
myLabelOne on frame 10
myLabelTwo on frame 25
myLabelThree on frame 115
etc

View 3 Replies

ActionScript 3 :: Possible To Have Variable With Specific Class Reference Type?

Feb 14, 2011

Coming from a Delphi background, I am used to be able to have class references/pointers of a specific superclass, example:
#!pas
var
niceVar: class of TClassOne; // Delphi style
badVar: class; // Only? allowed AS3 style to the best of my knowledge
begin
niceVar := x;
badVar := x;
niceVar.staticMethodSpecificToTClassOne;
TClassOne(badVar).staticMethodSpecificToTClassOne;
end;

What this means is that I don't have to cast my variables to a specific class; they are of the correct Class beforehand. This also means that compile-time checking can be performed to make sure proper members are being accessed and I don't have to check that niceVar is in fact of class TClassOne if niceVar was passed to a method.
[Code] .....

So just like a variable storing an object can be for a specific type and only objects of that class or subclasses of it are accepted, so to does "class of AClass" allow for variables of a specific class to be limited to references to a certain class or those inherited from it. I hope that makes sense somehow; I don't know of specific nomenclature for the whole "class of SuperClass" thing. So I'd like to do the same in AS3 as having variables/properties/parameters of type Class does not cut the mustard; its kind of like having all object variables/properties/parameters simply being Object instead of their proper, specific type.

What I'd like to be able to do
public function set recordClass(aRecordClass: TRecordClass): void {
_recordInstance = new aRecordClass(this); // Compiler will know that I am creating a TRecord
}

View 2 Replies

ActionScript 2.0 :: Go To A Specific Frame Or Frame Label?

Nov 1, 2004

I am loading a swf into an empty MC with this code:

on(release) {
loadMovie("movie.swf", _root.container);
}

what I want to do is also go to a specific frame or frame label in that loaded movie. I thought I could do it by adding something like this:

_root.containter.gotoAndPlay("frame");

View 9 Replies

ActionScript 3.0 :: Get The Frame Label Of A Specific Frame?

Jun 3, 2011

Is there a way to get the frame label on a specific frame, without it being the current frame?

I've tried accessing it through:

this.scenes[0].labels but it doesn't allow me to check a specific point on the timeline.

View 2 Replies

ActionScript 3.0 :: Stop Inside Frame Not Working When Loaded Inside SWf

Mar 1, 2011

I have a flash code where i am loading an AS 2 SWF inside AS 3. The thing is if i put the AS 2 SWF on same domain its working fine but if i put AS 2 SWF on different domain it loads the SWF properly but the "stop()" written inside the AS 2 frame doesnt work... and it keeps on playing all the frames continuously...

[Code]...

View 9 Replies

ActionScript 2.0 :: MX04 Link From Frame To A Frame Inside Movie Clip?

Apr 30, 2009

is it possible to link a frame inside a movie clip from main time line?

View 4 Replies

ActionScript 2.0 :: Reference Something Inside Movieclip

Jul 21, 2009

I've looked all over the web, including this forum and can't seem to find a solution to my problem. I have the following:A main movie (root) that loads external swf files as needed. These external swf files have movieclips within them I want to reference. So I have the following code in the main movie (root).[code]Everything up to the point of tracing through the loaded movieclip works fine. When the movie is tested, it does not seem to want to trace through all child information of the loaded movieclip.Essentially I'm doing this to see what is inside the loaded movieclips (though I know 'cause I can look at the fla file); however I need actionscript to be able to see into the loaded movieclips so that I can adjust another movieclip within the loaded movieclip as necessary.

View 2 Replies

ActionScript 2.0 :: XML: Count Specific Tags Inside XML?

Dec 3, 2009

How do I count a specific group of tags inside my XML document? I want to count the <group> tags in the example below. Example:

Code:
<my_document>
<title>Hello</title>
<group>this is a group</group>

[Code].....

View 1 Replies

ActionScript 2.0 :: Buttons Inside MovieClip More Specific

Aug 17, 2006

I need to know how to make several buton inside a MovieClip to link URL's, or something else (besides onRelease)? The Movie Clip has already onRollOver and onRollOut states in it. This is the .fla file [URL].

View 1 Replies

Php :: Pass Values By Reference Inside A For Each Construct?

Jan 12, 2011

How do I pass values by reference inside a for each construct in AS3? Basically, I want something equivalent to the following code in PHP:

foreach ($array as &$v) {
$v = $v + 1;
}

This would allow me to change all elements of the collection $array through a single loop.

View 3 Replies







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