Making the main stage timeline play in reverse.
Hey all thanks for looking. I figured out how to do this with movie clips but I can't seem to get it right with the main stage. Can anyone tell me a simple methood of telling the stage to continue playing in reverse, after a button is clicked, until it reaches a keyframe that will tell it to stop? I'm trying to make it so buttons will tell the stage to play a transition from beginning to end and then have it play in reverse when the "back" button is pressed. I'm currently searching online to find an answer but I haven't had any luck yet. Thanks for the help!
KgIad -- tried to use this code but I am getting
TypeError: Error #2007: Parameter listener must be non-null.
Which appears to be caused by the changeTimelineF not being recognized. If I create it as
private function changeTimelineF(e:Event) {
if(startFrame<endFrame){
e.currentTarget.mc.nextFrame();
} else {
e.currentTarget.mc.prevFrame();
if(e.currentTarget.mc.currentFrame==e.currentTarget.endFrame){
e.currentTarget.removeEventListener(Event.ENTER_FRAME,changeTimelineF);
Then it is recognized--but the variables (e.g. startFrame and endFrame) are no longer valid.
What am I missing?
Thanks
Mike
Similar Messages
-
How do I return playback to the main stage timeline from a symbol?
In trying to learn Edge, is there a way to return playback (play from) once an animation is complete within a symbol?
For instance, I have the main timeline that shows a symbol animation on creationcomplete, but when the animation is finished in the symbol and I hide the symbol, the main timeline is no longer playing. What would I need to do to return playback control to resume playback of the main timeline? I have a label I would like to play from on the main timeline, but I have not found a way to call the main timeline from within the symbol.
This was something common in Flash.
Thanks for your help!Hi escargo,
Say we use two symbols object1 and object2.
The main timeline has an interpolation on object2 from label “mainAnim“. Its autoplay property is set to false : the playhead stops at 0 ms.
A third symbol nested contains the interpolation on object1. Its autoplay property is set to true, so it plays directly.
At the end of this transition, there is a trigger (pseudo-track just below the timeline)
sym = the current symbol nested
sym.getComposition().getStage() = the main timeline (in Edge the stage is a symbol)
sym.getComposition().getStage().play(‘mainAnim’); = play the main timeline from the given label.
You can download the example here : https://app.box.com/s/6svvskydh952dfxbr3xb
Gil
PS : threads with examples for neigboring problems
http://forums.adobe.com/message/5410456#5410456
http://forums.adobe.com/message/5192205#5192205 -
How to structure several scenes (in symbols) on the main stage timeline
Hi,
I'm new to edge animate but have a Flash background and I'm working in Edge Animate on a game which is structured in several scenes. Each scene I did put in a symbol. Now I wonder how to build the main timeline or the "story - controller" so to speak. I have all the scenes but I do not know how to connect them.
In Flash it was possible to add keyframes of scenes one after another (like stairs) and jump forward or backward if needed to load the movie clips. In Edge Animate all scenes (or symbols) are in place from the beginning of the timeline and I cannot move the symbol to a later keyframe. Of course I can move animations in the timeline. The only way I think is to hide the symbols first and make them visible if needed. But this does not seem to be the right way and I don't understand the concept of structuring complex animations yet.
I would like to know how to structure several scenes in Edge Animate properly. Something like a scene loader or unloader would be useful. Highly appriciate any hints to a solution.
Thank you,
JPresdesign wrote:
You can also use edgecommons to load edge composition into another edge composition.
Thank you to your tipp so I try to organize my scenes into compositions. I can successfully load a composition (scene2) into the main container :
EC.loadComposition("scene2.html", sym.getSymbol("mainContainer"));
Now I'm facing another situation. At the end of the loaded composition scene2 is a "Next Scene" button suppose to load scene3.html composition into the main container. "Next Scene" is a nested button inside the loaded composition screen2 symbol. How do I load the next compostion from the current one? This code for On Click of course does not work:
EC.loadComposition("scene3.html", sym.getSymbol("mainContainer"));
I think the refer to the mainContainer is wrong. Is it just a targeting issue or is it the wrong approach in general? -
Access a nested symbol timeline from the main stage
Hi all,
Would love some help on accessing a nested symbol from the main stage please.
To set the scene.....
"Its an autumn day..
no sorry...just joking...
So i have a symbol called "NormalAnatomy" - its not on the main stage, but when a button is clicked it appears in the 'content' box which is just a rectangle on the main stage.
Inside "NormalAnatomy" symbol is another symbol called "Scrub_all" which is an animation
For users to view the animation they use a scrub bar like this lovely lady has invented:
Create Click and Touch Draggable Scrubbers with Edge Animate CC | sarahjustine.com
So for Sarah Justines scrubber to work - the main stage has a lot of actions added to it. Also the "timelinePlay" symbol is on the main stage
Its starts:
var symDur = sym.getSymbol("timelinePlay").getDuration();
var mySymbol = sym.getSymbol("timelinePlay");
var scrubber = sym.$("scrubber");
var bar = sym.$("bar");
sym.$("mobileHit").hide();
var dragme = false;
So I put my "NormalAnatomy" symbol on my main stage to see if the code would work and changed all the relevant details.. and indeed it worked!
var symDur = sym.getSymbol("NormalAnatomy").getSymbol("Scrub_all").getDuration();
var mySymbol = sym.getSymbol("NormalAnatomy").getSymbol("Scrub_all");
var scrubber = sym.getSymbol("NormalAnatomy").$("scrubber");
var bar = sym.getSymbol("NormalAnatomy").$("bar");
sym.getSymbol("NormalAnatomy").$("mobileHit").hide();
var dragme = false;
But i don't want the "NormalAnatomy" symbol to be on the main stage as I want it to appear in the 'content' box only when i hit a btn
So as soon as I took this symbol off the main stage, the scrubber doesn't work. So I click a btn, and the symbol appears in the content box but the scrubber doesn't work.
so I tried in front of the "NormalAnatomy"
getStage().
getStage("content").
getComposition().getStage().
getSymbol("content").
but nothing works
The main problem must be the fact that the NormalAnatomy symbol appears inside a content box so the MainStage actions doesn't know how to find it??
So my question is... what should I put in the main stage actions to make it access the "NormalAnatomy" symbol?
Thanks for your help in advance!On click handler for the symbol use
sym.getComposition().getStage().getSymbol("nameofsymbol").play();
or
sym.getSymbol("nameofsymbol").play();
replace the italics with the literal name of the symbol as it appears in the Elements panel.
Some API details found here (http://www.adobe.com/devnet-docs/edgeanimate/api/current/index.html) in the Work With Symbols section.
Darrell -
iDVD 7.1.2: I am making music instrument instructional DVDs, and I want to include several audio loops that the viewer access from the main menu to play along with
Export the slideshow out of iMovie via the File ➙ Share ➙ File menu option as a 480p Quicktime movie.
Open iDVD, select a theme and drag the exported QT movie file into the open iDVD window being careful to avoid any drop zones.
Follow this workflow to help assure the best quality video DVD:
Once you have the project as you want it save it as a disk image via the File ➙ Save as Disk Image menu option. This will separate the encoding process from the burn process.
To check the encoding mount the disk image, launch DVD Player and play it. If it plays OK with DVD Player the encoding is good.
Then burn to disk with Disk Utility or Toast at the slowest speed available (2x-4x) to assure the best burn quality. Always use top quality media: Verbatim, Maxell or Taiyo Yuden DVD-R are the most recommended in these forums.
OT -
Switching touch events from symbols/classes to the main stage?
For previous threads:
http://forums.adobe.com/thread/864057
http://forums.adobe.com/thread/863566
http://forums.adobe.com/thread/864262
http://forums.adobe.com/thread/863597
Bug ID #2940816
I have an app that wasn't compiling correctly. I sent the bug to Adobe who responded with a workaround. However, I can't figure out how to make their stated workaround work in my code.
I have puzzle pieces on the stage. Each is assigned to a separate class. Inside the class I have touch events defining multiple touch events for each piece.
I have another spot on the stage where, when it is touched, a puzzle piece appears. These are also each linked to a separate class. Inside this class I also have touch events defining multiple touch events for each piece.
Though it works fine on my computer, it wasn't working on an iPad. Adobe said that I needed to switch the touch events so that they were assigned to the main stage instead of to each individual object.
However, the code they gave me didn't really make sense in context and I'm confused how to implement it.
This is the code in the class for each piece that is created when you touch the stage:
public function GeoPiece(): void {
if (PuzzleGlobals.currentLevel == "Name") {
this.gotoAndStop("wholeName");
else if (PuzzleGlobals.currentLevel == "Abbrev") {
this.gotoAndStop("abbrev");
else if (PuzzleGlobals.currentLevel == "Shape") {
this.gotoAndStop("shape");
this.addEventListener(TouchEvent.TOUCH_MOVE, geoPieceBegin);
public function geoPieceBegin (e:TouchEvent): void {
PuzzleGlobals.pieceActive = true;
e.target.startTouchDrag(e.touchPointID, false);
e.target.addEventListener(TouchEvent.TOUCH_END, geoPieceEnd);
e.target.interactionBegin();
MovieClip(this.parent.parent).nameDisplay.gotoAndStop(e.target.abbrev);
PuzzleGlobals.currentPiece = e.target.abbrev;
public function geoPieceEnd (e:TouchEvent): void {
PuzzleGlobals.pieceActive = false;
if (currentObjOver.isLocked == true) {
currentObjOver.gotoAndStop ("Lock");
else {
currentObjOver.gotoAndStop ("Out");
MovieClip(this.parent.parent).nameDisplay.gotoAndStop(PuzzleGlobals.chosenPuzzle);
e.target.stopTouchDrag(e.touchPointID);
if (this.dropTarget.parent is GeoPuzzle) {
if (GeoPuzzle(this.dropTarget.parent).abbrev == e.target.abbrev) {
PuzzleGlobals.statesCompletedUSA++;
GeoPuzzle(this.dropTarget.parent).isLocked = true;
GeoPuzzle(this.dropTarget.parent).gotoAndStop("Lock");
e.target.parent.removeChild(DisplayObject(e.target));
else {
//play BOOP sound indicated wrong drop;
if (PuzzleGlobals.statesCompletedUSA == PuzzleGlobals.TOTAL_NUMBER_USA) {
//play fireworks game
else {
//do nothing
e.target.removeEventListener(TouchEvent.TOUCH_END, geoPieceEnd);
public function interactionBegin () {
if (this.dropTarget != null && this.dropTarget.parent is GeoPuzzle) { //check to make sure it's over a puzzle piece
currentObjOver = GeoPuzzle(this.dropTarget.parent);
currentObjOver.gotoAndStop("Over");
if (lastObjOver != currentObjOver) {
if (lastObjOver.isLocked == true) {
lastObjOver.gotoAndStop("Lock");
else {
lastObjOver.gotoAndStop("Out");
lastObjOver = currentObjOver;
This is the code in the class for each piece that's already on the stage:
public function GeoPuzzle(): void {
if (this.isLocked == true) {
this.gotoAndStop ("Lock");
if (PuzzleGlobals.pieceActive == true) {
this.addEventListener(TouchEvent.TOUCH_BEGIN, geoPuzzleBegin);
public function geoPuzzleBegin (e:TouchEvent): void {
e.target.addEventListener(TouchEvent.TOUCH_END, geoPuzzleEnd);
e.target.gotoAndStop("Over");
MovieClip(this.parent).nameDisplay.gotoAndStop(e.target.abbrev);
public function geoPuzzleEnd (e:TouchEvent): void {
if (e.target.isLocked == false) {
e.target.gotoAndStop("Off");
else if (e.target.isLocked == true) {
e.target.gotoAndStop("Lock");
MovieClip(this.parent).nameDisplay.gotoAndStop(PuzzleGlobals.chosenPuzzle);
e.target.removeEventListener(TouchEvent.TOUCH_END, geoPuzzleEnd);
You can see that each piece (whether it's already locked on the stage or movable) reacts differently to different touch events. However, this is the code that Adobe gave me as a workaround:
this.stage.addEventListener(TouchEvent.TOUCH_BEGIN, onTouchEvent);
this.stage.addEventListener(TouchEvent.TOUCH_MOVE, onTouchEvent);
this.stage.addEventListener(TouchEvent.TOUCH_END, onTouchEvent);
var beginCount:uint=0;
var moveCount:uint=0;
var endCount:uint=0;
function onTouchEvent(event:TouchEvent):void{
switch (event.type){
case TouchEvent.TOUCH_BEGIN:
trace("BEGIN")
beginCount++;
square.x = event.stageX;
square.y = event.stageY;
square.startTouchDrag(event.touchPointID, false);
break;
case TouchEvent.TOUCH_MOVE:
trace("MOVE")
moveCount++;
break;
case TouchEvent.TOUCH_END:
trace("END")
endCount++;
square.stopTouchDrag(event.touchPointID);
break;
trace("begin: "+beginCount+" move: "+moveCount+" end: "+endCount);
// countText.text = "begin: "+beginCount+" move: "+moveCount+" end: "+endCount;
This doesn't make any sense to me because it seems that it would only work if touching the stage had to react in just a single way. I have multiple pieces that need to each react differently.
1. The pieces that are locked to the stage need to highlight when touched and display their name.
2. These pieces also need to keep themselves highlighted and their names displayed when the touch is dragged off of them instead of just removed.
3. Each piece needs to be created when touching the Puzzle Piece button the stage. As these pieces are dragged, they need to highlight the pieces underneath them and unhighlight them when they are dragged off. They also need to display their own names, and lock into place when they are dragged over the correct piece.
My questions are:
1. Why don't touch events work in the compiler?
2. How can I translate my current working code's touch events to all be directly linked to the stage instead of their objects?
Thanks so much!
AmberI am going to copy and paste this answer into all of the forums I've asked this question in case some noob like me comes along and needs the answer.
I found the problem! After 3 months I finally figured out what was wrong and why my app was working in Device Central when exported as Flash 10.1 and not on my iPad when exported as AIR for iOS.
The problem is that in the Flash runtime, if a line of code returns a bug, the flash runtime says "Error, shmerror, try again next time." So I had one if, else statement that was executing when it wasn't supposed to be - only once, at the very beginning of the program. It was throwing an error. When I exported as Flash, flash didn't care, and still executed the code later when it was supposed to. But Apple won't let their programs crash. So instead of just trying that code again, Apple decided, after the first error was thrown, that it would then COMPLETELY IGNORE that line of code. So the error was in the line where the states would unhighlight themselves. Apple just shut down that line of code, that's why it wouldn't execute properly.
I ended up changing this line of code
if (lastObjOver != null && lastObjOver.isLocked == true)
which threw an error when the piece was FIRST dragged over the puzzle, to to this
if (lastObjOver.parent != null && lastObjOver.isLocked == true)
which wouldn't throw the error.
Problem solved!
If anyone else is having this problem, I suggest you do what I did. Change all your touch events to mouse events so you can run the program in the adc debugger. That's when I discovered the error being thrown. -
Problem with access into the main stage
hi, how are you guys ,, i hope you fine
here is my problem
i have file fla called "game.fla" and there are alot of frames in the main stage i wanna move it from
class called "admin" in the library but how??
i tried to this
parent.gotoAndStop(39);
but it doesn.t work i dont know why
and this is the error message
C:\Users\win7\Desktop\game1\admin1.as, Line 902 1061: Call to a possibly undefined method gotoAndStop through a reference with static type flash.display:DisplayObjectContainer.ahh sorry "
I could be more help if I had some code to look at"
here this is all the admin code
package{
import flash.display.MovieClip;
import flash.events.MouseEvent;
import flash.events.Event;
import flash.media.Sound;
import flash.media.SoundChannel;
public class admin1 extends MovieClip
var moves:Boolean;
var points:Number;
var SCREAMING:screaming
var SOUNDCHANNEL:SoundChannel
var vx:Number;
var EATING:eating;
var CHIDORI:chidori
var WIND:wind;
public function admin1(){
addEventListener(Event.ADDED_TO_STAGE,onAddedToStage)
public function onAddedToStage(event:Event):void
stop()
if (currentFrame ==20)
gotoAndStop(1)
WIND = new wind;
SOUNDCHANNEL = WIND.play(0,1000)
CHIDORI = new chidori
EATING = new eating
SCREAMING = new screaming
SOUNDCHANNEL = new SoundChannel
score.restrict = "0-9";
burger1.enabled = false;
fireball1.enabled = false;
burger1.alpha = .5;
fireball1.alpha = .5;
points=0;
hero1.stop();
quizz.stop();
animal1.stop();
evil1.stop();
addEventListener(Event.ENTER_FRAME, onEnterFrame);
fireball1..addEventListener(MouseEvent.CLICK, onfireball1);
burger1.addEventListener(MouseEvent.CLICK, onburger1);
b1.visible = false
b2.visible = false
b3.visible = false
c1.visible = false
c2.visible = false
c3.visible = false
d1.visible = false
d2.visible = false
d3.visible = false
e1.visible = false
e2.visible = false
e3.visible = false
f1.visible = false
f2.visible = false
f3.visible = false
a1.addEventListener(MouseEvent.CLICK, onmouseclicka1);
a2.addEventListener(MouseEvent.CLICK, onmouseclicka2);
a3.addEventListener(MouseEvent.CLICK, onmouseclicka3);
b1.addEventListener(MouseEvent.CLICK, onmouseclickb1);
b2.addEventListener(MouseEvent.CLICK, onmouseclickb2);
b3.addEventListener(MouseEvent.CLICK, onmouseclickb3);
c1.addEventListener(MouseEvent.CLICK, onmouseclickc1);
c2.addEventListener(MouseEvent.CLICK, onmouseclickc2);
c3.addEventListener(MouseEvent.CLICK, onmouseclickc3);
d1.addEventListener(MouseEvent.CLICK, onmouseclickd1);
d2.addEventListener(MouseEvent.CLICK, onmouseclickd2);
d3.addEventListener(MouseEvent.CLICK, onmouseclickd3);
e1.addEventListener(MouseEvent.CLICK, onmouseclicke1);
e2.addEventListener(MouseEvent.CLICK, onmouseclicke2);
e3.addEventListener(MouseEvent.CLICK, onmouseclicke3);
f1.addEventListener(MouseEvent.CLICK, onmouseclickf1);
f2.addEventListener(MouseEvent.CLICK, onmouseclickf2);
f3.addEventListener(MouseEvent.CLICK, onmouseclickf3);
addEventListener(Event.REMOVED_FROM_STAGE, onRemovedFromStage);
public function onRemovedFromStage(event:Event):void
//Remove the onEnterFrame event if
//this object is removed from the stage
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
removeEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
removeEventListener(Event.REMOVED_FROM_STAGE, onRemovedFromStage);
trace("Dungeon removed");
public function onEnterFrame(event:Event):void
if (points == 0 ){
fireball1.alpha = .3;
fireball1.enabled = false;
burger1.alpha = .3;
burger1.enabled = false;
if (points == 1 ){
fireball1.alpha = .3;
fireball1.enabled = false;
burger1.alpha = 1;
burger1.enabled = true;
if (herobar.width == 80){
hero1.gotoAndStop(1);}
if (herobar.width == 60){
hero1.gotoAndStop(2);}
else if (herobar.width == 40){
hero1.gotoAndStop(3);}
else if (herobar.width == 20){
hero1.gotoAndStop(4);}
else if (herobar.width == 0){
hero1.gotoAndStop(5);}
if(evilbar.width == 40)
evil1.gotoAndStop (2)
else if (evilbar.width == 0){
evil1.gotoAndStop(3);}
public function onmouseclicka1 (event:MouseEvent):void
points--
if (points == 1 ){
burger1.enabled = true;
burger1.alpha = 1;
if ( points == 2 || points == 3 || points == 4 || points == 5 || points == 6){
burger1.enabled = true;
fireball1.enabled = true;
burger1.alpha = 1;
fireball1.alpha = 1;
else if (points==0){
burger1.enabled = false;
fireball1.enabled = false;
burger1.alpha = .3;
fireball1.alpha = .3;
else if (points==1){
fireball1.alpha = .3;
fireball1.enabled = false;
score.text = String(points);
if (score.text < "0" ){
score.text = "0";}
if (points< 0){
points = 0;
trace(points)
removeEventListener (MouseEvent.CLICK,onmouseclicka1)
quizz.gotoAndStop(2);
animal1.gotoAndStop(2);
removeChild(a1)
removeChild(a2)
removeChild(a3)
b1.visible = true
b2.visible = true
b3.visible = true
herobar.width -= 20;
play();
SOUNDCHANNEL = CHIDORI.play();
public function onmouseclicka2 (event:MouseEvent):void
points++
if (points == 1 ){
burger1.enabled = true;
burger1.alpha = 1;
if ( points == 2 || points == 3 || points == 4 || points == 5 || points == 6){
burger1.enabled = true;
fireball1.enabled = true;
burger1.alpha = 1;
fireball1.alpha = 1;
else if (points==0){
burger1.enabled = false;
fireball1.enabled = false;
burger1.alpha = .3;
fireball1.alpha = .3;
score.text = String(points);
if (score.text < "0" ){
score.text = "0";}
if (points< 0){
points = 0;
trace(points)
removeEventListener (MouseEvent.CLICK,onmouseclicka2)
quizz.gotoAndStop(2);
animal1.gotoAndStop(2);
removeChild(a1)
removeChild(a2)
removeChild(a3)
b1.visible = true
b2.visible = true
b3.visible = true
herobar.width -= 20;
SOUNDCHANNEL = CHIDORI.play();
public function onmouseclicka3 (event:MouseEvent):void
points--
if (points == 1 ){
burger1.enabled = true;
burger1.alpha = 1;
if ( points == 2 || points == 3 || points == 4 || points == 5 || points == 6){
burger1.enabled = true;
fireball1.enabled = true;
burger1.alpha = 1;
fireball1.alpha = 1;
else if (points==0){
burger1.enabled = false;
fireball1.enabled = false;
burger1.alpha = .3;
fireball1.alpha = .3;
score.text = String(points);
if (score.text < "0" ){
score.text = "0";
if (points< 0){
points = 0;
removeEventListener (MouseEvent.CLICK,onmouseclicka3)
quizz.gotoAndStop(2);
animal1.gotoAndStop(2);
removeChild(a1)
removeChild(a2)
removeChild(a3)
b1.visible = true
b2.visible = true
b3.visible = true
herobar.width -= 20;
SOUNDCHANNEL = CHIDORI.play();
public function onmouseclickb1 (event:MouseEvent):void
points--
if (points == 1 ){
burger1.enabled = true;
burger1.alpha = 1;
if ( points == 2 || points == 3 || points == 4 || points == 5 || points == 6){
burger1.enabled = true;
fireball1.enabled = true;
burger1.alpha = 1;
fireball1.alpha = 1;
else if (points==0){
burger1.enabled = false;
fireball1.enabled = false;
burger1.alpha = .3;
fireball1.alpha = .3;
else if (points==1){
fireball1.alpha = .3;
fireball1.enabled = false;
score.text = String(points);
if (score.text < "0" ){
score.text = "0";}
if (points< 0){
points = 0;
trace(points)
quizz.frame.gotoAndStop(3);
animal1.gotoAndStop(3);
removeChild(b1)
removeChild(b2)
removeChild(b3)
c1.visible = true
c2.visible = true
c3.visible = true
herobar.width -= 20;
SOUNDCHANNEL = CHIDORI.play();
public function onmouseclickb2 (event:MouseEvent):void
points++
if (points == 1 ){
burger1.enabled = true;
burger1.alpha = 1;
if ( points == 2 || points == 3 || points == 4 || points == 5 || points == 6){
burger1.enabled = true;
fireball1.enabled = true;
burger1.alpha = 1;
fireball1.alpha = 1;
else if (points==0){
burger1.enabled = false;
fireball1.enabled = false;
burger1.alpha = .3;
fireball1.alpha = .3;
score.text = String(points);
if (score.text < "0" ){
score.text = "0";}
if (points< 0){
points = 0;
trace(points)
quizz.gotoAndStop(3);
animal1.gotoAndStop(3);
removeChild(b1)
removeChild(b2)
removeChild(b3)
c1.visible = true
c2.visible = true
c3.visible = true
herobar.width -= 20;
SOUNDCHANNEL = CHIDORI.play();
public function onmouseclickb3 (event:MouseEvent):void
points--
if (points == 1 ){
burger1.enabled = true;
burger1.alpha = 1;
if ( points == 2 || points == 3 || points == 4 || points == 5 || points == 6){
burger1.enabled = true;
fireball1.enabled = true;
burger1.alpha = 1;
fireball1.alpha = 1;
else if (points==0){
burger1.enabled = false;
fireball1.enabled = false;
burger1.alpha = .3;
fireball1.alpha = .3;
score.text = String(points);
if (score.text < "0" ){
score.text = "0";
if (points< 0){
points = 0;
quizz.gotoAndStop(3);
animal1.gotoAndStop(3);
removeChild(b1)
removeChild(b2)
removeChild(b3)
c1.visible = true
c2.visible = true
c3.visible = true
herobar.width -= 20;
SOUNDCHANNEL = CHIDORI.play();
}public function onmouseclickc1 (event:MouseEvent):void
points--
if (points == 1 ){
burger1.enabled = true;
burger1.alpha = 1;
if ( points == 2 || points == 3 || points == 4 || points == 5 || points == 6){
burger1.enabled = true;
fireball1.enabled = true;
burger1.alpha = 1;
fireball1.alpha = 1;
else if (points==0){
burger1.enabled = false;
fireball1.enabled = false;
burger1.alpha = .3;
fireball1.alpha = .3;
else if (points==1){
fireball1.alpha = .3;
fireball1.enabled = false;
score.text = String(points);
if (score.text < "0" ){
score.text = "0";}
if (points< 0){
points = 0;
trace(points)
quizz.gotoAndStop(4);
animal1.gotoAndStop(4);
removeChild(c1)
removeChild(c2)
removeChild(c3)
d1.visible = true
d2.visible = true
d3.visible = true
herobar.width -= 20;
SOUNDCHANNEL = CHIDORI.play();
public function onmouseclickc2 (event:MouseEvent):void
points++
if (points == 1 ){
burger1.enabled = true;
burger1.alpha = 1;
if ( points == 2 || points == 3 || points == 4 || points == 5 || points == 6){
burger1.enabled = true;
fireball1.enabled = true;
burger1.alpha = 1;
fireball1.alpha = 1;
else if (points==0){
burger1.enabled = false;
fireball1.enabled = false;
burger1.alpha = .3;
fireball1.alpha = .3;
score.text = String(points);
if (score.text < "0" ){
score.text = "0";}
if (points< 0){
points = 0;
trace(points)
quizz.gotoAndStop(4);
animal1.gotoAndStop(4);
removeChild(c1)
removeChild(c2)
removeChild(c3)
d1.visible = true
d2.visible = true
d3.visible = true
herobar.width -= 20;
SOUNDCHANNEL = CHIDORI.play();
public function onmouseclickc3 (event:MouseEvent):void
points--
if (points == 1 ){
burger1.enabled = true;
burger1.alpha = 1;
if ( points == 2 || points == 3 || points == 4 || points == 5 || points == 6){
burger1.enabled = true;
fireball1.enabled = true;
burger1.alpha = 1;
fireball1.alpha = 1;
else if (points==0){
burger1.enabled = false;
fireball1.enabled = false;
burger1.alpha = .3;
fireball1.alpha = .3;
score.text = String(points);
if (score.text < "0" ){
score.text = "0";
if (points< 0){
points = 0;
quizz.gotoAndStop(4);
animal1.gotoAndStop(4);
removeChild(c1)
removeChild(c2)
removeChild(c3)
d1.visible = true
d2.visible = true
d3.visible = true
herobar.width -= 20;
SOUNDCHANNEL = CHIDORI.play();
}public function onmouseclickd1 (event:MouseEvent):void
points--
if (points == 1 ){
burger1.enabled = true;
burger1.alpha = 1;
if ( points == 2 || points == 3 || points == 4 || points == 5 || points == 6){
burger1.enabled = true;
fireball1.enabled = true;
burger1.alpha = 1;
fireball1.alpha = 1;
else if (points==0){
burger1.enabled = false;
fireball1.enabled = false;
burger1.alpha = .3;
fireball1.alpha = .3;
else if (points==1){
fireball1.alpha = .3;
fireball1.enabled = false;
score.text = String(points);
if (score.text < "0" ){
score.text = "0";}
if (points< 0){
points = 0;
trace(points)
quizz.gotoAndStop(5);
animal1.gotoAndStop(5);
removeChild(d1)
removeChild(d2)
removeChild(d3)
e1.visible = true
e2.visible = true
e3.visible = true
herobar.width -= 20;
SOUNDCHANNEL = CHIDORI.play();
public function onmouseclickd2 (event:MouseEvent):void
points++
if (points == 1 ){
burger1.enabled = true;
burger1.alpha = 1;
if ( points == 2 || points == 3 || points == 4 || points == 5 || points == 6){
burger1.enabled = true;
fireball1.enabled = true;
burger1.alpha = 1;
fireball1.alpha = 1;
else if (points==0){
burger1.enabled = false;
fireball1.enabled = false;
burger1.alpha = .3;
fireball1.alpha = .3;
score.text = String(points);
if (score.text < "0" ){
score.text = "0";}
if (points< 0){
points = 0;
trace(points)
quizz.gotoAndStop(5);
animal1.gotoAndStop(5);
removeChild(d1)
removeChild(d2)
removeChild(d3)
e1.visible = true
e2.visible = true
e3.visible = true
herobar.width -= 20;
SOUNDCHANNEL = CHIDORI.play();
public function onmouseclickd3 (event:MouseEvent):void
points--
if (points == 1 ){
burger1.enabled = true;
burger1.alpha = 1;
if ( points == 2 || points == 3 || points == 4 || points == 5 || points == 6){
burger1.enabled = true;
fireball1.enabled = true;
burger1.alpha = 1;
fireball1.alpha = 1;
else if (points==0){
burger1.enabled = false;
fireball1.enabled = false;
burger1.alpha = .3;
fireball1.alpha = .3;
score.text = String(points);
if (score.text < "0" ){
score.text = "0";
if (points< 0){
points = 0;
quizz.gotoAndStop(5);
animal1.gotoAndStop(5);
removeChild(d1)
removeChild(d2)
removeChild(d3)
e1.visible = true
e2.visible = true
e3.visible = true
herobar.width -= 20;
SOUNDCHANNEL = CHIDORI.play();
}public function onmouseclicke1 (event:MouseEvent):void
points--
if (points == 1 ){
burger1.enabled = true;
burger1.alpha = 1;
if ( points == 2 || points == 3 || points == 4 || points == 5 || points == 6){
burger1.enabled = true;
fireball1.enabled = true;
burger1.alpha = 1;
fireball1.alpha = 1;
else if (points==0){
burger1.enabled = false;
fireball1.enabled = false;
burger1.alpha = .3;
fireball1.alpha = .3;
else if (points==1){
fireball1.alpha = .3;
fireball1.enabled = false;
score.text = String(points);
if (score.text < "0" ){
score.text = "0";}
if (points< 0){
points = 0;
trace(points)
quizz.gotoAndStop(6);
animal1.gotoAndStop(6);
removeChild(e1)
removeChild(e2)
removeChild(e3)
f1.visible = true
f2.visible = true
f3.visible = true
herobar.width -= 20;
SOUNDCHANNEL = CHIDORI.play();
public function onmouseclicke2 (event:MouseEvent):void
points++
if (points == 1 ){
burger1.enabled = true;
burger1.alpha = 1;
if ( points == 2 || points == 3 || points == 4 || points == 5 || points == 6){
burger1.enabled = true;
fireball1.enabled = true;
burger1.alpha = 1;
fireball1.alpha = 1;
else if (points==0){
burger1.enabled = false;
fireball1.enabled = false;
burger1.alpha = .3;
fireball1.alpha = .3;
score.text = String(points);
if (score.text < "0" ){
score.text = "0";}
if (points< 0){
points = 0;
trace(points)
quizz.gotoAndStop(6);
animal1.gotoAndStop(6);
removeChild(e1)
removeChild(e2)
removeChild(e3)
f1.visible = true
f2.visible = true
f3.visible = true
herobar.width -= 20;
SOUNDCHANNEL = CHIDORI.play();
public function onmouseclicke3 (event:MouseEvent):void
points--
if (points == 1 ){
burger1.enabled = true;
burger1.alpha = 1;
if ( points == 2 || points == 3 || points == 4 || points == 5 || points == 6){
burger1.enabled = true;
fireball1.enabled = true;
burger1.alpha = 1;
fireball1.alpha = 1;
else if (points==0){
burger1.enabled = false;
fireball1.enabled = false;
burger1.alpha = .3;
fireball1.alpha = .3;
score.text = String(points);
if (score.text < "0" ){
score.text = "0";
if (points< 0){
points = 0;
quizz.gotoAndStop(6);
animal1.gotoAndStop(6);
removeChild(e1)
removeChild(e2)
removeChild(e3)
herobar.width -= 20;
SOUNDCHANNEL = CHIDORI.play();
public function onmouseclickf1 (event:MouseEvent):void
points--
if (points == 1 ){
burger1.enabled = true;
burger1.alpha = 1;
if ( points == 2 || points == 3 || points == 4 || points == 5 || points == 6){
burger1.enabled = true;
fireball1.enabled = true;
burger1.alpha = 1;
fireball1.alpha = 1;
else if (points==0){
burger1.enabled = false;
fireball1.enabled = false;
burger1.alpha = .3;
fireball1.alpha = .3;
else if (points==1){
fireball1.alpha = .3;
fireball1.enabled = false;
score.text = String(points);
if (score.text < "0" ){
score.text = "0";}
if (points< 0){
points = 0;
trace(points)
quizz.gotoAndStop(7);
animal1.gotoAndStop(7);
removeChild(f1)
removeChild(f2)
removeChild(f3)
herobar.width -= 20;
SOUNDCHANNEL = CHIDORI.play();
public function onmouseclickf2 (event:MouseEvent):void
points++
if (points == 1 ){
burger1.enabled = true;
burger1.alpha = 1;
if ( points == 2 || points == 3 || points == 4 || points == 5 || points == 6){
burger1.enabled = true;
fireball1.enabled = true;
burger1.alpha = 1;
fireball1.alpha = 1;
else if (points==0){
burger1.enabled = false;
fireball1.enabled = false;
burger1.alpha = .3;
fireball1.alpha = .3;
score.text = String(points);
if (score.text < "0" ){
score.text = "0";}
if (points< 0){
points = 0;
trace(points)
quizz.gotoAndStop(7);
animal1.gotoAndStop(7);
removeChild(f1)
removeChild(f2)
removeChild(f3)
herobar.width -= 20;
SOUNDCHANNEL = CHIDORI.play();
public function onmouseclickf3 (event:MouseEvent):void
points--
if (points == 1 ){
burger1.enabled = true;
burger1.alpha = 1;
if ( points == 2 || points == 3 || points == 4 || points == 5 || points == 6){
burger1.enabled = true;
fireball1.enabled = true;
burger1.alpha = 1;
fireball1.alpha = 1;
else if (points==0){
burger1.enabled = false;
fireball1.enabled = false;
burger1.alpha = .3;
fireball1.alpha = .3;
score.text = String(points);
if (score.text < "0" ){
score.text = "0";
if (points< 0){
points = 0;
quizz.gotoAndStop(7);
animal1.gotoAndStop(7);
removeChild(f1)
removeChild(f2)
removeChild(f3)
herobar.width -= 20;
SOUNDCHANNEL = CHIDORI.play();
public function onfireball1(event:MouseEvent):void{
if ( points >= 2 ){
points -= 2
evilbar.width -=40
SOUNDCHANNEL = SCREAMING.play();
parent.gotoAndPlay(39)
score.text = String(points);
if (score.text < "0" ){
score.text = "0";
if (points< 0){
points = 0;
public function onburger1(event:MouseEvent):void{
if (points == 1 ){
burger1.alpha = .3;
fireball1.alpha = .3;
burger1.enabled = false;
fireball1.enabled = false;
herobar.width +=20
SOUNDCHANNEL = EATING.play()
points--
if ( points >= 2 ){
burger1.enabled = true;
fireball1.enabled = true;
burger1.alpha = 1;
fireball1.alpha = 1;
herobar.width +=20
points--
SOUNDCHANNEL = EATING.play()
else if (points==0){
burger1.enabled = false;
fireball1.enabled = false;
burger1.alpha = .3;
fireball1.alpha = .3;
if (herobar.width >= 80){
herobar.width = 80}
score.text = String(points);
if (score.text < "0" ){
score.text = "0";
if (points< 0){
points = 0; -
Targeting A MovieClip on the main Stage....Scope Issue
main stage------>MC1------>MC2
on MC2's timeline I want to target objects on the main stage. Not sure on how to write that without using root. I've been trying deviations of
MovieClip(parent).MovieClip(parent).mcName.
ThanksWhy can't you just use root?
And you can just put your code in the main timeline as suggested - just dispatch an event when you want your code to run and listen for it.
So, in your clip, on whatever frame do something like:
dispatchEvent(new Event("runMyAnim"));
And in the main timeline:
someClip.someClip.addEventListener("runMyAnim", runIt, false, 0, true);
function runIt(e:Event){
//your code goes here -
Bug fix requires switching touch events from symbols/classes to the main stage?
Also posted in Mobile Development, I'm still not sure which forum I should be in.
For previous threads:
http://forums.adobe.com/thread/864057
http://forums.adobe.com/thread/863566
http://forums.adobe.com/thread/864262
http://forums.adobe.com/thread/863597
Bug ID #2940816
I have an app that wasn't compiling correctly. I sent the bug to Adobe who responded with a workaround. However, I can't figure out how to make their stated workaround work in my code.
I have puzzle pieces on the stage. Each is assigned to a separate class. Inside the class I have touch events defining multiple touch events for each piece.
I have another spot on the stage where, when it is touched, a puzzle piece appears. These are also each linked to a separate class. Inside this class I also have touch events defining multiple touch events for each piece.
Though it works fine on my computer, it wasn't working on an iPad. Adobe said that I needed to switch the touch events so that they were assigned to the main stage instead of to each individual object.
However, the code they gave me didn't really make sense in context and I'm confused how to implement it.
This is the code in the class for each piece that is created when you touch the stage:
public function GeoPiece(): void {
if (PuzzleGlobals.currentLevel == "Name") {
this.gotoAndStop("wholeName");
else if (PuzzleGlobals.currentLevel == "Abbrev") {
this.gotoAndStop("abbrev");
else if (PuzzleGlobals.currentLevel == "Shape") {
this.gotoAndStop("shape");
this.addEventListener(TouchEvent.TOUCH_MOVE, geoPieceBegin);
public function geoPieceBegin (e:TouchEvent): void {
PuzzleGlobals.pieceActive = true;
e.target.startTouchDrag(e.touchPointID, false);
e.target.addEventListener(TouchEvent.TOUCH_END, geoPieceEnd);
e.target.interactionBegin();
MovieClip(this.parent.parent).nameDisplay.gotoAndStop(e.target.abbrev );
PuzzleGlobals.currentPiece = e.target.abbrev;
public function geoPieceEnd (e:TouchEvent): void {
PuzzleGlobals.pieceActive = false;
if (currentObjOver.isLocked == true) {
currentObjOver.gotoAndStop ("Lock");
else {
currentObjOver.gotoAndStop ("Out");
MovieClip(this.parent.parent).nameDisplay.gotoAndStop(PuzzleGlobals.c hosenPuzzle);
e.target.stopTouchDrag(e.touchPointID);
if (this.dropTarget.parent is GeoPuzzle) {
if (GeoPuzzle(this.dropTarget.parent).abbrev == e.target.abbrev) {
PuzzleGlobals.statesCompletedUSA++;
GeoPuzzle(this.dropTarget.parent).isLocked = true;
GeoPuzzle(this.dropTarget.parent).gotoAndStop("Lock");
e.target.parent.removeChild(DisplayObject(e.target));
else {
//play BOOP sound indicated wrong drop;
if (PuzzleGlobals.statesCompletedUSA == PuzzleGlobals.TOTAL_NUMBER_USA) {
//play fireworks game
else {
//do nothing
e.target.removeEventListener(TouchEvent.TOUCH_END, geoPieceEnd);
public function interactionBegin () {
if (this.dropTarget != null && this.dropTarget.parent is GeoPuzzle) { //check to make sure it's over a puzzle piece
currentObjOver = GeoPuzzle(this.dropTarget.parent);
currentObjOver.gotoAndStop("Over");
if (lastObjOver != currentObjOver) {
if (lastObjOver.isLocked == true) {
lastObjOver.gotoAndStop("Lock");
else {
lastObjOver.gotoAndStop("Out");
lastObjOver = currentObjOver;
This is the code in the class for each piece that's already on the stage:
public function GeoPuzzle(): void {
if (this.isLocked == true) {
this.gotoAndStop ("Lock");
if (PuzzleGlobals.pieceActive == true) {
this.addEventListener(TouchEvent.TOUCH_BEGIN, geoPuzzleBegin);
public function geoPuzzleBegin (e:TouchEvent): void {
e.target.addEventListener(TouchEvent.TOUCH_END, geoPuzzleEnd);
e.target.gotoAndStop("Over");
MovieClip(this.parent).nameDisplay.gotoAndStop(e.target.abbrev);
public function geoPuzzleEnd (e:TouchEvent): void {
if (e.target.isLocked == false) {
e.target.gotoAndStop("Off");
else if (e.target.isLocked == true) {
e.target.gotoAndStop("Lock");
MovieClip(this.parent).nameDisplay.gotoAndStop(PuzzleGlobals.chosenPu zzle);
e.target.removeEventListener(TouchEvent.TOUCH_END, geoPuzzleEnd);
You can see that each piece (whether it's already locked on the stage or movable) reacts differently to different touch events. However, this is the code that Adobe gave me as a workaround:
this.stage.addEventListener(TouchEvent.TOUCH_BEGIN, onTouchEvent);
this.stage.addEventListener(TouchEvent.TOUCH_MOVE, onTouchEvent);
this.stage.addEventListener(TouchEvent.TOUCH_END, onTouchEvent);
var beginCount:uint=0;
var moveCount:uint=0;
var endCount:uint=0;
function onTouchEvent(event:TouchEvent):void{
switch (event.type){
case TouchEvent.TOUCH_BEGIN:
&nbs p; &n bsp; trace("BEGIN")
&nbs p; &n bsp; beginCount++;
&nbs p; &n bsp; square.x = event.stageX;
&nbs p; &n bsp; square.y = event.stageY;
&nbs p; &n bsp; square.startTouchDrag(event.touchPointID, false);
&nbs p; &n bsp; break;
case TouchEvent.TOUCH_MOVE:
&nbs p; &n bsp; trace("MOVE")
&nbs p; &n bsp; moveCount++;
&nbs p; &n bsp; break;
case TouchEvent.TOUCH_END:
&nbs p; &n bsp; trace("END")
&nbs p; &n bsp; endCount++;
&nbs p; &n bsp; square.stopTouchDrag(event.touchPointID);
&nbs p; &n bsp; break;
trace("begin: "+beginCount+" move: "+moveCount+" end: "+endCount);
// countText.text = "begin: "+beginCount+" move: "+moveCount+" end: "+endCount;
This doesn't make any sense to me because it seems that it would only work if touching the stage had to react in just a single way. I have multiple pieces that need to each react differently.
1. The pieces that are locked to the stage need to highlight when touched and display their name.
2. These pieces also need to keep themselves highlighted and their names displayed when the touch is dragged off of them instead of just removed.
3. Each piece needs to be created when touching the Puzzle Piece button the stage. As these pieces are dragged, they need to highlight the pieces underneath them and unhighlight them when they are dragged off. They also need to display their own names, and lock into place when they are dragged over the correct piece.
My questions are:
1. Why don't touch events work in the compiler?
2. How can I translate my current working code's touch events to all be directly linked to the stage instead of their objects?
Thanks so much!
AmberSure!
I haven't changed much. I've been playing around and I think I know where the problem is coming from now. I just can't figure out how to fix it.
This it the only code I've modified:
public function interactionBegin () {
trace ("Current: " + currentObjOver);
trace ("Last: " + lastObjOver);
if (this.dropTarget != null && this.dropTarget.parent is GeoPuzzle) { //check to make sure it's over a puzzle piece
currentObjOver = GeoPuzzle(this.dropTarget.parent); //make "currentObjOver" assigned to the puzzle piece the finger is currently touching
currentObjOver.gotoAndStop("Over"); //highlight the current piece
if (currentObjOver != lastObjOver) { //if your finger moves and you're now touching a different state
if (lastObjOver != null && lastObjOver.isLocked == true) { //if the previous state you were touching has been solved
lastObjOver.gotoAndStop("Lock"); //lock this state into place
else if (lastObjOver != null && lastObjOver.isLocked == false) { //if the previous state you were touching wasn't solved
lastObjOver.gotoAndStop("Off"); //unhighlight that state
lastObjOver = currentObjOver; //assign the current state to be the last state you were touching
lastObjOver and currentObjOver are always assigned the same object. I can't figure out why, I've run it line by line but I can't figure out where I'm going wrong. -
Hello,
I'm new with edge animate, but i fell in love with it.
I'd like to know, is it possible to load different html pages dynamically in the main stage in order to avoid the preloader to be load?
I can figure out how to save all the pages of the site, but i can't merge them in a continuous animated browsing experience.
As sample.
I've got a index.html and home.html, how to switch form index to home without having a clear division between the two pages?
I can place all the animations within a file and this will allow me to have a continuous surfing experience but it won't generate specific and google indexable pages within the site.
Example, index.html will generate www.mysite.com, home will generate www.mysite.com/home. How ho switch dinamically between them and integrate them in a unique fading experience?
Thanks in advance for any help. I'm a newby, but i would like to learn.
Fea.Look into using the Loader class to load the swf files. If you want to have it happen in different frames then you can put the code into the different frames.
-
Horizontal Scrolls on the main Stage
Hi
I am putting 11 movies containing 11 flv files on my main
stage. All those movies have onMouse over and click events attached
with them. As those movies are not going to fit on the main stage
so when i am running the flash file, it is just displaying 5 of the
11 movies and rest are being cut. Is there any way that I can code
so that I will get the horizontal scrolls automatically if the
movies are not going to fit on the screen? I am new to the 'stage'
and AS3 concepts . Please help me out.
All I need is to put 11 movies on the main stage with the
horizontal scrolls.
Thanks in advance for your help
regards
Anujyou can check a similar thread involving a scrolling
movieclip:
http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=15&catid=665&threadid =1324923&enterthread=y -
Changing a boolean inside a movieclip via the main stage.
I have a movieclip and within it is a bit of actionscript and a couple of different movieclips to make it function like the button on a ball point pen (you click it and it stays clicked until you click it again).
var booleanClick:Boolean = false;
var colorTransform:ColorTransform = optBox.transform.colorTransform;
optHitState.addEventListener(MouseEvent.CLICK, onClickHandler);
function onClickHandler(myEvent:MouseEvent){
if (booleanClick == false ) {
colorTransform.color = 0xB5CDE6;
optBox.transform.colorTransform = colorTransform;
booleanClick = true;
} else {
colorTransform.color = 0xFFFFFF;
optBox.transform.colorTransform = colorTransform;
booleanClick = false;
I have thirty-some-odd of these ball point pen movieclips on my main stage.
I want to be able to "clear" all the movieclips so that the optbox color is white and the booleanClick is false with a button that is on my main stage. Currently I've got it working for the optbox color, but when i try to trace out my boolean - it gives me nothing (not even an error).
var cClear:ColorTransform;
var optionArray = new Array ( mc1, mc2, mc3, mc4, mc5, mc6 ); // all my ball point pen movieclips are in this array.
clearButtons.addEventListener(MouseEvent.CLICK, goClear);
function goClear(e:MouseEvent):void {
for (var i:int = 0; i < optionArray.length; i++) {
cClear = optionArray[i].optBox.transform.colorTransform;
cClear.color = 0xFFFFFF;
optionArray[i].optBox.transform.colorTransform = cClear;
trace(optionArray[i].booleanClick + i);
optionArray[i].booleanClick = false;
trace(optionArray[i].booleanClick + i);
I don't want to get deeper into this monster of a project without making sure this is working first. Is my boolean working and just my trace statements aren't worded right or is my method to change the boolean wrong?I'm not sure what you are trying to trace (boolean + number?), but try changing it to...
trace(optionArray[i].booleanClick, i);
and see if that's more like what you are expecting -
Managing multiple movies on the main stage
Hello,
i just started using actionscript. i don't understand how to
write or organize the coding for this:
first, i have 3 movie clips on the main timeline. the first
movie clip is a series of buttons (the main navigation) within a
movie clip that when rolled over, will jump to specific frame
labels to change its look. no down or hit states. i got this to
work.
secondly, i'd like for this rollover function to display the
2nd movie clip, which contains 8 different movie clips
(thumbnails).
thirdly, i'd i'm trying to make the movie clip thumbnails act
as buttons that when the onRelease occurs, it activates the final
movie clip, (a Container movie clip), which will show about 15
different movie clips, each containing about 3 frames to display
once clicked.
i know this is kind of drawn out, but if anyone can get me
started it would be a big help. the only actions i currenly have
are stop(); actions. Other than that i'm lost.you can check a similar thread involving a scrolling
movieclip:
http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=15&catid=665&threadid =1324923&enterthread=y -
How to structure several scenes (in symbols) on the main stage
I have this main scene with four buttons, each will call a different composition.
These compositions will be loaded with Edge Commons's composition Loader inside Symbols ( I call it content) created with createChildSymbols.
That works. But I seem to be missing the right size relationship in between the Symbols size and the compostions it will received. It seems somehow smaller.
The wrapper Main Composition adaptes itself to the size of the display. But the compostition loades does not adapt, or worst. It does... sometimes....
I just don't understand...
any help ?resdesign wrote:
You can also use edgecommons to load edge composition into another edge composition.
Thank you to your tipp so I try to organize my scenes into compositions. I can successfully load a composition (scene2) into the main container :
EC.loadComposition("scene2.html", sym.getSymbol("mainContainer"));
Now I'm facing another situation. At the end of the loaded composition scene2 is a "Next Scene" button suppose to load scene3.html composition into the main container. "Next Scene" is a nested button inside the loaded composition screen2 symbol. How do I load the next compostion from the current one? This code for On Click of course does not work:
EC.loadComposition("scene3.html", sym.getSymbol("mainContainer"));
I think the refer to the mainContainer is wrong. Is it just a targeting issue or is it the wrong approach in general? -
Method to determine whether or not the main clip is playing
Is there an AS3 method that will return whether or not the swf has been paused? I tried to google this but I'm not getting anything.
I have no familiarity with Captivate. Isn't there any ability for the captivate button to indicate that the pause has been executed? Maybe you should try posting in the Captivate forum.
Maybe you are looking for
-
Can't Boot From Install Disc 1 ?
Holding down "C" at Start Up isn't working. Most of the time I can't get Preferences > Start-Up to even "see" my Disc 1. When I can get it to show up in Start-Up, and Select it, and Lock it ... it Still Won't Start Up from the Install Disc 1 ... and
-
I have a Multiple lines of text field with Append Changes to Existing Text checked and I need to edit the history. There has to be a way!! Thanks! David L. Crooks
-
I just had to "wipe" my MacBook Pro because of malware infestation. I reloaded data from G drive Time-machine but am missing several e-Books. How can I retrieve them?
-
FM to fetch BUOM and PUOM for catcha weight materials
Hi, Any body know the FMs to fetch BUOM(Base unit of measure) Quantity and PUOM(Parllel unit of measure) quantity. Please pass it to me. Thanks in advance, Sada
-
Hi there, Since installing OS X Mavericks v10.9.2 Update yesterday, I can't unmute sound output in my system preferences. Can you help? Thanks!