Loading movie through button from child clip
I have a portfolio page with several trailer thumbnails (a portfolio list). If you click on each, the page changes and you see the trailer in a video player, plus more info about the film. I used two frames in the timeline: the first frame has the clip with the thumbnails (port_list). The second frame has a movie clip container and the video player. The idea is that pressing the respective button from port_list will load the details of that movie and the movie into the video player. I am using this script:
ZSQ_but.onRelease = function (){
_parent.gotoAndStop("por_details");
_parent.myplayer.contentPath = "videos/ZSQ.flv";
_parent.por_details_cont.attachMovie("ZSQ_details","ZSQ_de tails",0);
Even though the script looks alright (and works alright if at the root level), it will not work from the child clip. What am I doing wrong?? Please see the attached fla file. Somone hinted that the AS for loading the player and the container is not on the frame where the player and the container are. If that is the reason, how can I address this issue?
if 'movie' is just a layer on the timeline you do not need to
reference it in your path.
Just use _root.chapters.gotoAndPlay(2);
paths only need to reference nested levels of
movieclips
Similar Messages
-
Controlling main timeline from loaded movie
I have loaded an external movie onto the main movie in a
movie clip called "mainholder" - In the main timeline on the main
movie there is a "stop" command on frame 1. From the loaded movie,
I want to control the main timeline and tell it to go to frame 2.
Can someone tell me the actionscripting to do this, I have tried
several commands and getting frustrated. ;-)
Thanksmovies are loaded into levels. The main movie is always
considered level0 a.k.a _root in the AS. When you load a movie into
another, the main movie is also considered the parent of that
loaded movie a.k.a. this._parent in AS where this refers to the
loaded movie. If you want something in the loaded movie to control
the main timeline you could call it like this...
_root.gotoAndStop(2); or _root.gotoAndPlay(2); depending on
what you want.
but because of the parent/child relationship, it can also be
done like this....
this._parent.gotoAndStop(2); or this._parent.gotoAndPlay(2)
Although the first method is less to remember, the second
method proves the most friendly and re-usable. Let me explain...
Say that you did something like this....
[MAIN MOVIE]
[LOADED MOVIE]
{Loaded Movie with buttons to control LOADED MOVIE}
Your main movie loads a movie and when this loaded movie
reaches it's 10th frame, it loads another movie where the buttons
reside for controlling that clip. If you used _root in the button
movie, it would cause the main movie (_root) to be called and not
the LOADED MOVIE as you had intended during its design prior to
trying to make this new main movie (and it would work as intended
if you opened the LOADED MOVIE's fla file and exported). If you use
this._parent in the button movie, it will always make it's calls to
the LOADED MOVIE's timeline and not the main clips timeline.
Sorry if this confuses you but it's important to
understand. -
Loaded movie communicating back to the loader
Hi,
We have got a swf which loads another swf. everything works
fine, we can change things in the loaded movie through the loader.
But now we need the buttons in the loaded movie calling a method or
trigging an event in the loader. We have been doing that by using
LocalConnection, but now we need another approach.
How to do that?
CheersHi Kglad,
Thanks for helping,
you are right, we have been using LocalConnection because we
had two separeted SWF.
But now we have got another project where we will have one
SWF loaded into it by loadMovie();
As we are new to Flash and ActionScript, what we really would
like to know is how could we call a method in a movie clip located
in the loader SWF, say mc_loader. We have created a new class
(extended from MovieClip) and inserted a new method on it called
dispatch(pValue:String).
then, from the loaded SWF we have tried, as you said,
_level0.mc_loader.dispatch("Test");
and also:
_level0.dispatch("Test"), but the method/function is not
being called.
Thanks very much -
Moving buttons from project to project
I have a button where the selected state and highlighted states took me a long time to create a long time ago.
I copy to the clipboard the button, paste into a new project and none of the attibutes, selected state or highlighted states work. whats more, the "selected Shape' shows "not set'
How do you correctly move a button from project to project????
Thanks
dvdsp 3Right click on the button, and elect "create button style" not specific to the project.
Name it and save it self contained. -
Change loaded movie from child
Hi,
I am new to AS3. Here I want to ask how to change the loaded movie from child?
Here is my working code, but it doesn't works...
Root:
var contentMovie:MovieClip = new mcMain;
contentMovie.name="content_mc";
addChild(contentMovie);
Child Content:
changecontent_btn.addEventListener(MouseEvent.CLICK,LoadContent);
function LoadContent(event:MouseEvent):void
parent.contentMovie = mcNew;
When I try to run, Flash shows the error "1119: Access of possibly undefined property contentMovie through a reference with static type flash.display:DisplayObjectContainer."use:
var contentMovie:MovieClip = new mcMain();
contentMovie.name="content_mc";
addChild(contentMovie);
Child Content:
changecontent_btn.addEventListener(MouseEvent.CLICK,LoadContent);
function LoadContent(event:MouseEvent):void
// the next line doesn't make any sense but if it did, this is how it should be written
MovieClip(parent).contentMovie = mcNew; -
Controll the ROOT timeline from externally loaded movie clip?
does anyone know how to controll the root timeline from an
externally loaded movie clip?
I have loaded a movie clip, which has buttons on it that I
would like to controll the main original website timeline with.
something like this.parent.parent?
thanks a lot
harkyfeedmeapples <[email protected]> wrote:
> does anyone know how to controll the root timeline from
an externally
> loaded movie clip?
>
> I have loaded a movie clip, which has buttons on it that
I would like
> to controll the main original website timeline with.
>
> something like this.parent.parent?
_root.doStuff;
Freundliche Grüße,
Franz Marksteiner -
I have FCE 4.0.1 and running OS x 10.7.5 when i burn my movie the audio from my movie clips don't come through . My Sound effects and music can be heard. First I export to Quicktime movie, make it self contained then open IDVD for an intro and burn it. everything sounds great in preview but then ( once again)I lose my audio from my movie clips.
Try Mixing Down the audio before export.
This info may help;
https://discussions.apple.com/message/1060680?messageID=1060680&%3b#1060680
Also serch this forum for Mix Down you should find lots of info.
Al -
How to load movie clip internal in .fla file
Hi - How do I load a movie clip inside a .fla file?........I
know the script to load a .swf file but I do not know the script to
load a movie clip (New symbo l= movie clip) made in the same .fla
file.
I have a series of movie clips I woud like to load with a
button - can anyone please guide me in the right direction with a
script or some info.....
Thanks
steenDo you mean loading clips that are in the library?
Use MovieClip.attachMovie();
Dan Mode
--> Adobe Community Expert
*Flash Helps*
http://www.smithmediafusion.com/blog/?cat=11
*THE online Radio*
http://www.tornadostream.com
*Must Read*
http://www.smithmediafusion.com/blog
"Jean Bang" <[email protected]> wrote in
message
news:ef88kj$c10$[email protected]..
> Hi - How do I load a movie clip inside a .fla
file?........I know the
> script to
> load a .swf file but I do not know the script to load a
movie clip (New
> symbo
> l= movie clip) made in the same .fla file.
> I have a series of movie clips I woud like to load with
a button - can
> anyone
> please guide me in the right direction with a script or
some info.....
>
> Thanks
>
> steen
> -
Controlling parent movie from a loaded movie
> This message is in MIME format. Since your mail reader
does not understand
this format, some or all of this message may not be legible.
--B_3264494197_595630
Content-type: text/plain;
charset="US-ASCII"
Content-transfer-encoding: 7bit
Hi!
I have a swf file which I call "Stage" and it contains 3
scenes.
In scene 1 of Stage, I have another swf- "Info1." loaded on
level 10. I know
how to get Info1 to unload and load Info2 but what I am
trying to accomplish
is when I click on Info1, it loads Info2 and it also go to
Scene 2 of Stage.
Is there anyway I can do this?
I appreciate any input.
Thank you.
K.
--B_3264494197_595630
Content-type: text/html;
charset="US-ASCII"
Content-transfer-encoding: quoted-printable
<HTML>
<HEAD>
<TITLE>Controlling parent movie from a loaded
movie</TITLE>
</HEAD>
<BODY>
<FONT FACE=3D"Arial"><SPAN
STYLE=3D'font-size:12.0px'>Hi!<BR>
<BR>
I have a swf file which I call "Stage" and
it contains 3 scenes. =
<BR>
<BR>
In scene 1 of Stage, I have another swf-
"Info1." loaded on level=
10. I know how to get Info1 to unload and load Info2 but
what I am trying t=
o accomplish is when I click on Info1, it loads Info2 and it
also go to Scen=
e 2 of Stage. Is there anyway I can do this? <BR>
<BR>
I appreciate any input. <BR>
<BR>
Thank you.<BR>
<BR>
K. </SPAN></FONT>
</BODY>
</HTML>
--B_3264494197_595630--Never mind - I was doing something very stupid and wasn't
calling the function as a method of a movie clip. I was simply
calling checkTarget(event) rather than
event.currentTarget.checkTarget(event); which seems to work. -
Load .mov from my Nikon to FCX
when I load .mov files from my Nikon The windows show only a small part of the frame. If I bring the frame to full screen it is all there. Both browser and clip windows.
Files are 1920 x 1080 H264 - 29.07hz Set up is Apple inter codec 1920x1080i60
Runnubg Mavrick 10.9.1 FCE 4.0.1
How do I load these files so they appear properlu and can be edited.
I tried converting to mp4 but got the same result.
ThanksSet the scale of the viewer and canvas windows to "Fit to Window":
MtD -
Here's my problem, I have navigation buttons on the root
timeline that load different swf's into a target movieclip.
Example:
loadMovie("Videos2.swf", Target_mc);
Is there a way I can tell the the loaded movie Videos2.swf to
go to a certain frame and play from the root timeline?
I can adjust all the parameters of Target_mc, _x, _y and
_alpha but Target_mc.gotoAndPlay(50) doesn't work, neither does
Target_mc.play(). Any help would be greatly appreciated.
Thanks in advanceyou must wait until loading is complete (use preloader code
or use the onLoadInit() method of the moviecliploader class
listener) before trying to direct the loaded swf to its frame
50. -
Load Movie from XML attribute Problem
Hi:
This is strange. My code works when Testing Movie, but it
doesnt work when its Published. Would be so grateful for help.
Im loading a subnav button and a link for that button from an
XML doc.
Maybe this is wrong, but since the button attribute in the
XML element is a link, I inserted a MovieLoaderClass test within
the XML.OnLoad to be sure the button loads first . Once it's
initiated loading, then I can proceed to assign a LoadMovie link to
the button such as "loadMovie(Cliplinks[0], holderclip)"
This is working in test movie. But when I Publish, the Button
appears but it is unclickable. The button should be responding to
the "loadMovie(Cliplinks[0],holderclip)"
Can someone be so kind a to help me determine what Im doing
wrong?
Thanks much!
Ryanvar rootNode, i;
rootNode = XML_Object.firstChild;
rootNode = rootNode.firstChild;
for(i = 0; i < rootNode.childNodes.length; i ++)
var personObj
bject = new Object();
personObj.name = rootNode.childNodes
.attributes.name;
personObj.inwhat =
rootNode.childNodes.attributes.inwhat;
personAry.push(personObj);
But, I think your XML file is incorrect.
<name="joe smith" inwhat="honor" />
should be... something like..
<person name="joe smith" inwhat='honor" /> -
Loading movie in new level from variable
What I'm trying to do is load a movie in another level wich
is defined by a variable (i)
On level 0 there is this piece of code
i = 10;
loadMovie("Home.swf", 10); (I've entered 10 instead of i
because otherwise I wouldn't get anything at all)
Now every time I go to another 'chapter' it has to load a
movie into the next level
From Home.swf I click the button to the next chapter wich
contains:
on (release) {
unloadMovie(_level0.i)
i++
loadMovie("chapter01.swf", _level0.i);
This obviously doesn't work otherwise I wouldn't be posting
here :p This whole thing does absolutely nothing :s
Anyone any idea?
Thanks in advanceur code works for me only if i use loadMovieNum instead of
loadMovie......if u r using levels to load movie then use
loadMovieNum and unloadMovieNum.....u use loadMovie when u ve to
load a movie on a movieClip and loadMovieNum when u want to load on
some level..try this m sure it ll help u -
How to load date and time from text file to oracle table through sqlloader
hi friends
i need you to show me what i miss to load date and time from text file to oracle table through sqlloader
this is my data in this path (c:\external\my_data.txt)
7369,SMITH,17-NOV-81,09:14:04,CLERK,20
7499,ALLEN,01-MAY-81,17:06:08,SALESMAN,30
7521,WARD,09-JUN-81,17:06:30,SALESMAN,30
7566,JONES,02-APR-81,09:24:10,MANAGER,20
7654,MARTIN,28-SEP-81,17:24:10,SALESMAN,30my table in database emp2
create table emp2 (empno number,
ename varchar2(20),
hiredate date,
etime date,
ejob varchar2(20),
deptno number);the control file code in this path (c:\external\ctrl.ctl)
load data
infile 'C:\external\my_data.txt'
into table emp2
fields terminated by ','
(empno, ename, hiredate, etime, ejob, deptno)this is the error :
C:\>sqlldr scott/tiger control=C:\external\ctrl.ctl
SQL*Loader: Release 10.2.0.1.0 - Production on Mon May 31 09:45:10 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Commit point reached - logical record count 5
C:\>any help i greatly appreciated
thanks
Edited by: user10947262 on May 31, 2010 9:47 AMload data
infile 'C:\external\my_data.txt'
into table emp2
fields terminated by ','
(empno, ename, hiredate, etime, ejob, deptno)Try
load data
infile 'C:\external\my_data.txt'
into table emp2
fields terminated by ','
(empno, ename, hiredate, etime "to_date(:etime,'hh24:mi:ss')", ejob, deptno)
this is the error :
C:\>sqlldr scott/tiger control=C:\external\ctrl.ctl
SQL*Loader: Release 10.2.0.1.0 - Production on Mon May 31 09:45:10 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Commit point reached - logical record count 5
C:\>
That's not an error, you can see errors within log and bad files. -
Hi I have 2 apple id's one which has pulled through everything into icloud except my calendars and one which has pulled through just my calendars. How do I move my calendars from one apple id to another so that I can see everything in icloud with one apple id?
Having read some other posts I think I have answered my question. If I was somehow able to terminate my old (unwanted) account and Apple ID I would no longer be able to access the material I bought with that ID- so I'm stuck. I have to learn how to manage that situation.
This is unfortunate for Apple consumers. Life is complicated for families these days and this "rule" although it is in place to prevent cheating and fraud makes things unnnecessarily difficult for me and my family as in my niaevity (sic) with the online world I bumbled into this situation. Not everyone is out to rip off Apple - one of the worlds richest corporations- or the entertainers who market their work through iTunes.I would just like to be able to enjoy the entertainment I pay for where and when I like to on whichever computer is available to me. And I'm not terribly computer literate.
It would have been nice to have had the opportunity to speak just once to a real person in the employ of Apple to explain my situation to them.
Maybe you are looking for
-
when trying to send a photo via email, I am prompted to setup an email account even though email is already setup. What would cause this? Better yet, how do I fix it?
-
Set parameter just for SAP account of Administrator
Dears, 1. Due to system audit that demand to set some special rules of password just for administrators in SAP system. for example, we need set password's expiration, length, complexity and so on. I know we could set parameters like 'login/passwd_exp
-
Not possible to edit Comm. Structure or Activate transfer rule
Hello Experts, Do you know what is causing the problem in development box we facing? We are neither able to edit Comm. Structure nor activate transfer rule for myself data mast data sources in BW. Basically, it doesn't let us go in edit mode when we
-
Where do I go online to get the manual for the iphone 4
-
Java.lang.IllegalArgumentException error using PARAM
Ok, I got my pagination to work on my jsp, but now if I leave that page and come back I get the 500 error above here's my pagination code: <%--Pagination --%> <c:out value="Page: "/> <c:forEach begin="1" end="${lmdao.pageCount}" var="i">