Keyboard Commands Don't Work In Loaded Swf
I have a Game swf that uses keyboard Listeners. They work just fine when the swf's played directly. HOWEVER, after the Game's been loaded into a parent Preloader swf - which is playing from an html - , the keyboard Listeners don't function at all.
In the Keyboard Listeners do I have to reference the parent? If so, how? Any help would be greatly appreciated!
KirupaForum > Flash > ActionScript 3.0
Posted on: 09-24-2008, 03:46 PM
View Complete Forum Thread with Replies
Sponsored Links:
Keyboard Commands Don't Work In Loaded Swf
I have a Game swf that uses keyboard Listeners. They work just fine when the swf's played directly. HOWEVER, after the Game's been loaded into a parent Preloader swf - which is playing from an html -, the keyboard Listeners don't function at all.
In the Keyboard Listeners do I have to reference the parent? If so, how? Any help would be greatly appreciated!
View Replies !
View Related
Keyboard Commands Don't Work In Loaded Swf
I have a Game swf that uses keyboard Listeners. They work just fine when the swf's played directly. HOWEVER, after the Game's been loaded into a parent Preloader swf - which is playing from an html - , the keyboard Listeners don't function at all.
In the Keyboard Listeners do I have to reference the parent? If so, how? Any help would be greatly appreciated!
View Replies !
View Related
Keyboard Commands...
ok, there is Car1 and Car2
i am using flash 4, because this is a school project, and that is all the school has.
how would i make it so nothing happens unless someone presses key "A" which would make Car1 go foward, and key "L" which would make Car2 go foward, if they unpress it, it does nothing, how do i do this?
i am a noob :P
View Replies !
View Related
Keyboard Commands
Please forgive my complete lack of flash know-how. I have set up two text fields, and a button on my main timeline. However I cannot tab from field to field. Also for some reason the spacebar is what submits the button, rather than the enter key.
Basically I want it to work like any other webform. Can someone point me in the right direction?
View Replies !
View Related
Keyboard Commands In Flash
Hello, I'm wondering if it is possible to have various keyboard commands in flash. I know you can do the left, right, up and down keys. I thought it would be cool if you could do things by pressing a certain letter or number on your keyboard to make things happen. Is this possible, and what code would I need.
Thanks
George
View Replies !
View Related
Moving Two MC's At The Same Time With Keyboard Commands
I have two MC's and i wan't to move them both at the same time.
I tried putting the code on a button inside the MC but I still can't make both paddles one controled with W and S and the other controled with 8 and 5 to move in unison.
The code for the paddles is
on (keyPress "w") {
currentY = this._y;
this._y = currentY - 8;
}
on (keyPress "s") {
currentY = this._y;
this._y = currentY + 8;
}
Please help
let the afro guide you
View Replies !
View Related
Video Takes Over Fullscreen Projector And Keyboard Commands
I build presentation files using Flash and am transitioning to ActionScript 3.0.
Often my method of building the presentation is to put all the "slides" in a timeline, one frame each, with stop actions, enabling advancement with a mouse click or keyboard command.
This has worked perfectly in AS 2.0 for video as well. In other words, Frame 1 might have a graphic, Frame 2 a video, and Frame 3 another graphic. On advancing to Frame 3, the video in Frame 2 goes away and everything works great.
In AS 3.0, the same approach works great until the projector goes full screen, and then the video takes over and keeps control of the screen. In this case I was using keyboard commands to try to advance.
Thinking this has something to do with the display list or other new concept in AS 3.0.
The basic question is -- how do I overcome video takeover in a presentation like this, so when I advance to the next frame--- a) the keyboard command is recognized and b) the video on the screen goes away.
Thanks in advance!
View Replies !
View Related
Commands To A Loaded Swf
I know there's a simple solution to this, but it's escaping me.
I'm loading an external swf into a clip in another swf. To load I've got
Code:
clip.loadMovie("external_swf");
So far, so good. Now, as soon as "external_swf" is loaded, I'd like it to jump to frame 5 and begin playing. Help, please? Many thanks in advance!
View Replies !
View Related
Mutliple AS Commands, That Seem Not To Work.
Whel....
I want to be able to play the timeline back to frame 1 of the same scene, then have the following code executed:
ActionScript Code:
_root.contents.loadMovie("welcome.swf")
Im sure you AS gurus can conjure some crazy code to let this happen, all ways i have tried have failed, without me being able to see the problem. Maybe this simply cannot be done.
Either way, help appreciated
Thanks,
Ian
View Replies !
View Related
Mutliple AS Commands, That Seem Not To Work.
Whel....
I want to be able to play the timeline back to frame 1 of the same scene, then have the following code executed:
ActionScript Code:
_root.contents.loadMovie("welcome.swf")
Im sure you AS gurus can conjure some crazy code to let this happen, all ways i have tried have failed, without me being able to see the problem. Maybe this simply cannot be done.
Either way, help appreciated
Thanks,
Ian
View Replies !
View Related
Sending Commands To A Loaded Movie
Here is what I'm trying to do, but I'm not sure if it is posible. I have my main movie loading an exteral movie into it. When you click on a button in the original movie, I want it to play the loaded movie. This is the code I've tried but doesn't work...
loadMovie("external.swf",_root.container);
then for the button
on (release) {
_root.container.gotoAndPlay("play");
}
Is there a seperate function to send the "gotoAndPlay("play")" function, or is it just not posible for the movies to interact back and forth.
Thank you in advace for you help.
View Replies !
View Related
Grid Component In Flash -HELP- What Commands Work?
Hello there,
once more i need help... i'm using the grid component in flash. am loading data from a csv file and it works till there.... then i try to make the last two rows unsortable and the last two alligned to right too.... but no command seems to work... please help me....
i tried using getcolumnAt or something similar but its not working....
Thanks in advance for your help,
liam
PS :: please find the flash file and CSV file at http://www.portughes.com/flashfiles.zip ... if you run it it will work.. i just need the disable sorting and allignment to work...
View Replies !
View Related
[F8] MC's With Externally Loaded Images Won't Accept OnEvent Commands
I have a photo gallery that uses a series of movie clips for the thumbnails. The thumbnails are externally loaded jpegs. They load just fine, but once loaded they will not accept any onEvent handlers. Does anybody have any idea why this is happening? I am wondering if when the image is loaded, it wipes out the instance name of the movie clip. My code to call out the event handler is this:
this.e1.onRollOver=function() {this.e1._alpha=100};
this.e1.onRollOut=function() {this.e1._alpha=50};
this.e1.onPress=function() {
_root.myVar = e1;
_root.myLargeImage.gotoAndPlay(2);
}
I am using a loop statement for all the movie clips, but for testing purposes I am putting in e1 in the code above.
View Replies !
View Related
Is There A Keyboard Accessibility Work Around?
I am having problems with Flash and keyboard accessibility.
Yes even MX.
The guidelines that I must adhere to state that web pages developed must be accessible via a keyboard.
This is fine on Flash only sites, but when mixed in with HTML the keyboard control is lost as soon as it "comes across" Flash.
E.G.
Take any HTML page with a bit of Flash on it.
Press the tab key to jump through the links on the page.
As soon as the tab hits the Flash object it stops the page access via the Tab key.
Does anyone know of a work around? or even if one is possible?
I have seen Flash menus that respond well to keyboard control but never seen one that exits the Flash object to continue the tab order beyond.
Any help or suggestions would be appreciated.
mike 2kool2
we slack so you don't have to.
View Replies !
View Related
Keyboard Interactions Don't Work
I have a training module that is basically a Flashed up Powerpoint. I have a continue button that advances the timeline to the next fram when clicked or when spacebar is pressed. I also have a previous button that goes back a "slide" when clicked or on left arrow press. Things have worked great but I have experienced a problem when trying to make use of the Text Area component to load XML and CSS.
When I put the text area component on the stage and publish the file, the spacebar and arrow key functionality are not working. If I take the component off the stage, but it is still in my library, it still doesn't work. In order to get the keyboard functionality back, I must remove the component from the stage AND the library. I found this particularly strange and came up with a different method of placing my text.
I have found that this same thing happens with almost all components with the exception of the Scroll Pane Component. I started building the Flash file in Flash MX, that is where I began using the Scroll Pane Component. I have upgraded to CS3 now but still writing in AS2. Any ideas on why this might happen?
Thanks,
Luke
View Replies !
View Related
Keyboard Doesn't Work
Keyboard control doesn't seem to work in my code, can anyone help me out? I can't debug it because it doesn't appear to work with Flex SDK and senocular's Output trace doesn't seem to work with mxml.
EspCanvas.as
Code:
package
{
import flash.display.*;
import flash.utils.*;
import flash.events.*;
import mx.core.UIComponent;
public class EspCanvas extends UIComponent
{
private var TIMER_SPEED:int = 10;
private var player:Sprite = new Sprite();
private var vspeed:Array = new Array();
private var hspeed:Array = new Array();
private var up:Boolean = false;
private var left:Boolean = false;
private var right:Boolean = false;
private var down:Boolean = false;
private var click:Boolean = false;
private var ticker:Timer;
public function init():void // START
{
// set up player
player.graphics.beginFill(0xff0000);
player.graphics.drawCircle(50, 50, 16);
player.graphics.endFill();
vspeed[0] = 0;
hspeed[0] = 0;
addChild(player);
// create input events
addEventListener(KeyboardEvent.KEY_DOWN, keyDown);
addEventListener(KeyboardEvent.KEY_UP, keyUp);
addEventListener(MouseEvent.MOUSE_DOWN, mouseDown);
addEventListener(MouseEvent.MOUSE_UP, mouseUp);
// create a Timer object, tell it to call our onTick method, and start it
ticker = new Timer(10);
ticker.addEventListener(TimerEvent.TIMER, onTick);
ticker.start();
}
public function onTick(e:TimerEvent):void // TICK
{
player.x += hspeed[0];
player.y += vspeed[0];
}
public function keyDown(e:KeyboardEvent):void
{
switch(e.keyCode)
{
case 37:
left = true;
hspeed[0] = -10;
break;
case 38:
up = true;
vspeed[0] = -10;
break;
case 39:
right = true;
hspeed[0] = 10;
break;
case 40:
down = true;
vspeed[0] = 10;
break;
}
}
public function keyUp(e:KeyboardEvent):void
{
switch(e.keyCode)
{
case 37:
left = false;
break;
case 38:
up = false;
break;
case 39:
right = false;
break;
case 40:
down = false;
break;
}
}
public function mouseDown(e:MouseEvent):void
{
click = true;
}
public function mouseUp(e:MouseEvent):void
{
click = false;
}
}
}
Main.mxml
Code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
styleName = "plain"
xmlns="*"
layout="absolute"
creationComplete="initApp()">
<mx:Script>
<![CDATA[
public function initApp():void
{
canvas.init();
}
]]>
</mx:Script>
<EspCanvas id="canvas" width="100%" height="100%" themeColor="#000000" />
</mx:Application>
View Replies !
View Related
Getting Ctrl+a Keyboard To Work
Last edited by faruq : 2005-03-23 at 14:33.
I'm doing an e-learning project where I need students to type special characters such as ć (that is keycode 230) apparantly it's an old english charecter. I can get the character to display ok. I was thinking of getting to get the character to appear if the user presses 'ctrl' and 'a' at the same time.
My code isn't working because my line
ActionScript Code:
if(Key.isDown(17)==true && Key.isDown(65)==true ){
doesn't work as you need to press the 'a' then 'ctrl' in that sequence (even if you swap the keycodes in the code) to get it to work which is not the way normal people type.
According to moock you need two seperate if statements but how should I arrange them? Here is my original code
ActionScript Code:
keyListner=new Object;
keyListner.onKeyDown=function(){
if(Key.isDown(17)==true && Key.isDown(65)==true ){
trace("ctrl+a");
}
}
Key.addListener(keyListner);
View Replies !
View Related
Keyboard Focus On Swf When Swf Is Loaded
I've got a text field within a movieclip that's got the keyboard focus set to it when the swf runs.
Selection.setFocus(userWords.displaySend);
This works fine in that the default text in the text field is selected when it appears. But though keyboard focus is on the text field, it's not on the .swf within the context of the browser window. I have to click on the .swf to get that. But when I click on the .swf, the text field loses focus unless I click on the text field itself.
That's in Firefox, actually. It's a bit different in IE6, but that requires user activity, too.
Is it possible to set things up so that the user can start typing immediately into the text field without having to "activate" the .swf first?
View Replies !
View Related
Making Buttons Work From Keyboard
Hi!
I've been trying to figure out how to make a button work from keyboard pressed keys.
I've tried the following script on the main timeline but it doesn't seem to be able to target the button
stop();
button01.Key.SPACE = function () {
gotoAndPlay(5);
}
I've also tried assigning the actions to the button itself with this:
on (Key.ENTER) {
_root.gotoAndPlay(5);
}
But nothing happens.
Could anyone help me with this?
I am making a sort of flash presentation that you can move to the different frames but pressing the spacebar or enter or some other keys on the keyboard.
Thank you!
View Replies !
View Related
Keyboard Shortcuts For Timeline Don't Work
Hello All,
None of the Timeline keyboard shortcuts for "Move Keyframe" (Up, Down, Left, Right) nor "Select Frame" (Left, Right, Above, Below) work for me. Period and comma move the playhead, and I can copy/paste frames, but I cannot select additional frames and cannot move them up, down, or over with the built-in commands. Other keyboard shortcuts work just fine for me.
I've used the default settings, made my own, tried using combinations that don't use the ctrl, alt, or shift keys for the shortcut... nothing seems to help. I've also used two different keyboards with different drivers, and have reinstalled Flash - nothing fixes it.
WinXP Pro sp2, 1.8 GHz Athlon Processor, 1 G RAM, 500+ Gb drives with plenty of extra space. Flash 8 Pro installed on a drive other than C:.
I have searched the forum and the knowledge index on and off for a few weeks now, but haven't seen anything about this issue.
Thanks to anyone who can give me some insight into this.
View Replies !
View Related
[AS3] Keyboard Event Wont Work :(
I decided to pick up a copy of O'reilly Actionscript 3 Cookbook today, and I have been going through. One of the first examples it has for keyboard events is:
Code:
package {
import flash.display.Sprite;
import flash.events.KeyboardEvent;
public class ExampleApplication extends Sprite {
public function ExampleApplication( ) {
stage.focus = this;
addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
}
private function onKeyDown(event:KeyboardEvent):void {
trace("key down: " + event.charCode);
}
}
}
But for some reason it will not work. According to the book stage.focus = this; is all you need for keyboard events to work, am i doing something wrong?
View Replies !
View Related
Making Buttons Work From Keyboard - Flash MX
Hi!
I've been trying to figure out how to make a button work from keyboard pressed keys.
I've tried the following script on the main timeline but it doesn't seem to be able to target the button
stop();
button01.Key.SPACE = function () {
gotoAndPlay(5);
}
I've also tried assigning the actions to the button itself with this:
on (Key.ENTER) {
_root.gotoAndPlay(5);
}
But nothing happens.
Could anyone help me with this?
I am making a sort of flash presentation that you can move to the different frames but pressing the spacebar or enter or some other keys on the keyboard.
Thank you!
View Replies !
View Related
.swf File Is Fine But Keyboard Doesn´t Work In IE
I finish a videogame and within Flash 8 Professional everything is working fine, when I test the animation the characters respond to the keyboard interactivity but when I try to test the .swf in Internet Explorer there is no connection between the keyboard actions and the animation. This is my first one and I was happy that everything was working just fine until I tried to use it in Explorer 7.0 Please, need help. Any clue?
The animation is in http://www.fitnesselsalvador.com/videojuegos/index_videojuegos.html
Edited: 11/17/2008 at 11:15:35 AM by spinning_panda
View Replies !
View Related
Keyboard Events Don't Work In Player Or Projector
I need to trap keyboard events. My code works OK in test mode (ctrl + enter), but not when I run the swf or projector directly on the desktop. My project is going on CD, not in a browser, and the only thing on the stage is an instance of the FLVplayback component.
And while I'm at it....does anyone know the code to simulate clicking the windows Restore button? That's what the keypress is for. My client doesn't want the video running in real full-screen; they want their users to click the Maximize button, so they'll see the title bar, then press Esc to restore the window, again.
Attach Code
import flash.events.KeyboardEvent;
import flash.display.Stage;
import flash.display.MovieClip;
import flash.events.*;
import flash.system.fscommand;
fscommand("trapallkeys", "true");
stage.addEventListener(KeyboardEvent.KEY_UP, pressThis);
function pressThis(event:KeyboardEvent):void {
if (event.keyCode == Keyboard.ESCAPE){
trace("you pressed esc");
}
if (event.keyCode == Keyboard.F12){
trace("you pressed F12");
}
}
View Replies !
View Related
Setup Loaded Movies To Work Loaded Or Standalone
Hi Guys
How do I get a movie to work as a standalone movie - when i'm building it - and also work as a loaded movie in a parent movie that loadMovie or loadMovieNum this movie.
It just get annoying having to always change paths after I finish building my sub-movies because half the time I get it wrong - it might take me a couple of hours to get the move working as a standalone, but then i can take more hours to get it working as loaded.
any ideas??
thx
View Replies !
View Related
Loaded Swf Won't Work The Second Time It's Loaded.
I'm using the great flip book code from iparigrafika.hu
I have an odd bug when loading the 'PageFlip' swf into by base swf.
It loads into level10 using the 'loadmovie' action.
It loads the swf and works perfectly but if you load a different swf and the reload the 'PageFlip' swf, all the page turning functions don't work???
the 'FlipPage' is at this link ---> http://www.iparigrafika.hu/
By the way it's a fantastic bit of coding and well worth playing with, if unlike me you know what your doing!!!
View Replies !
View Related
Keyboard Domination - Best Tricks To Hear All Possible Keyboard Shortcuts
I'm looking to recreate a keyboard shortcut quiz in flash much like this example that's been done in javascript.... (Note: the example seems to only really work well on Windows - I'm hoping mine proves to be more compatible?). a timer counts down while it waits for you to correctly perrform the shortcut on the keyboard.
I've successfully implemented a key combination listener such as is detailed in a tutorial here. I've gotten it to parse my list of shortcuts from a delimited txt file, correctly analyze user combination held & advance/score if correct, drive score based on countdown time remaining, manage "pass" to skip tough ones, etc.
You can see my progress here.
http://www.realitytheory.com/clients...indexTest.html
However I've still got several things that don't work even though I'm using fscommand("trapallkeys", "true"); (does that even matter when used within browser plugin?)
1) Ctrl key doesn't register on Macs (tried Safari & Ffox) but Cmd key does. This is odd since it works fine when previewing in Flash via Ctrl-Enter (and having enable keyboard shortcuts disabled in that player). Not a showstopper as client's cool if it's windows only.
2) Any shortcuts that utilize the Alt key - seems flash doesn't detect a key event when I hit that key. I've seen another thread here intimating that Flash can't hear code #18 (alt) even though javascript can it certainly seems true in flash player. Is this true? Can it be somehow "pressed" by javascript via a JS key handler?
3) Any that conflict with browser default actions e.g. Ctrl-P, Ctrl-S. Before saying there's no way, note that somehow the JS on the example link *do* block those (on IE/Ffox Win anyways). Does anyone have a clue what part? Will disabling the browser's default actions mean Flash receives the input or will flash not hear them either?
Any help will I'm sure benefit anyone looking to listen for key combos.
View Replies !
View Related
AttachMovie From Loaded .swf Does Not Work
According to one tutorial I made a movie which load pictures as a separate clips from another movie library.swf. The script si simple:
placeHolder.loadMovie("library.swf");
if (Number(_framesloaded)>=Number(_totalframes)) {
gotoAndPlay (3);
}
loads the library movie and waits until its loaded.
Then there si something like this:
placeHolder.attachMovie("obr1", "myobr1", 1);
placeHolder.myobr1._x = -121;
placeHolder.myobr1._y = -70;
To attach clips to specific position.
The problem is, that it works perfectly on my local machine (and it does not matter, whether I acces the movie directly or via internet server), but when I place it to remote web server, to external clips simply do not appear.
Does anybody have an idea, where the problem might be?
Thanks for any help!
View Replies !
View Related
Why Won't This Code Work When Loaded?
Why won't this code work when the movie containing it is loaded into a level of another?!?
onClipEvent (mouseMove) {
myPoint = new Object();
myPoint.x = this._x;
myPoint.y = this._y;
_root.volSlide.globaltolocal(mypoint);
_root.play.mySound.setvolume(1*mypoint.x*5);
updateAfterEvent(mouseMove);
}
Thanks in advance
Ol
View Replies !
View Related
Buttons On Loaded Swf Don't Work
I searched this forum high and low for the answer to this questions but couldn't find anything. Any hints/tips/suggestions would be greatly appreciated
When I load an swf into an MC instance on my main movie:
ActionScript Code:
function openMovie(whichmc) {
loadMovie(whichmc, _root.contentbox1);}
...the swf opens but it's buttons don't work. Actually, they do work when I program them manually with rollover stuff (editing up/over/down/hit properties) but the actionscript events do not work:
ActionScript Code:
_root.topbutton.onRelease = function() {
clearInterval(scroller);
quickie();
};
Is there any easy solution for this? I have seem some mention of "paths" or "levels" although I could quite figure out if this was the problem. Does my secondary swf need some further pathing to execute the actionscript properly? I built it as if it was a standalone swf.
Thanks,
Cheez
View Replies !
View Related
SetInterval In Loaded Swf Does Not Work
Hi folks, I am loading a *.swf into an mc instance via loadMovie().
main movie:
ActionScript Code:
function openMovie(whichmc) {
loadMovie("myMovie.swf", _root.contentbox1);}
I use a setInterval function in some button script in "myMovie.swf" that does not work when loaded into the _root.contentbox1. (thanks CyanBlue for the diagnosis )
external swf:
ActionScript Code:
this.topbutton.onRelease = function() {
clearInterval(scroller);
quickie();}
function quickie() {
scroller = setInterval(moveHome, 5);
}
Any obvious reasons why?
Thanks,
Cheez
*link to original thread http://www.actionscripts.org/forums/...threadid=22307
View Replies !
View Related
LoadMovie : My Loaded Swf Won't Work
Hi Everyone:
I have a problem when loadind a clock swf into a MC. The clock that works fine on itself , won't work when loaded into the MC. To clarify, the hierarchy of my site is like this:
Main Fla>
page1MC>
clock.swf(loaded into an EmptyMC created inside page1MC).
The code is as follows inside the page1MC timeline:
this.createEmptyMovieClip("newClock", 10);
newClock._x=300;
newClock._y=-20;
newClock._xscale=newClock._yscale=50;
newClock.loadMovie("clock.swf","newClock");
This code loads the clock.swf movie just fine but...the clock doesn't work. Why is this?. Is it because in the original clock.fla I referenced the _root timeline to get the time and date...?.
How can I solve this?. I have the same problem loading another swf that loads jpgs dinamically into it....
Thanks for your help in advance.
Txusm
View Replies !
View Related
XML Loaded In Container =no Work
Hi all,
I`m trying to load a XML mc into a container mc. It works fine when I simply load the xml mc into the a different level, butit won`t when I use a container file.... e.g.
_root.loader.loadMovie("menu.swf"); // loader is the container mc
any ideas?
thanks,
m.
View Replies !
View Related
Swf Loaded In Container Won't Work
Hi all,
I built a variation of Comic Geeks easing menu system (http://www.actionscript.org/resource...tem/Page1.html) which works fine just by itself.
After loading it into a Container of my main movie, the buttons refuse to function though.
Since I'm not a pro my best guess is that it might have to do with the actionscript?
Most likely the _root reference or the coordinates of the loaded movie don't work, but it doesn't react at all.
I'd apreciate any help on this.
Here's the code from the loaded movie:
//during the time the movie loads, we set the current
//position of the content at 0,0; thus showing the
//HOME section of the site.
onClipEvent (load) {
_x = 0;
_y = 0;
div = 5; //This value just determines the speed
//the transistions.
}
//Here we constantly check for new values of
// _x and _y. These values are determined by endX and endY.
//We divide the difference by div to have an value that
//continues to change until the equation is true.
//Try changing the 'enterFrame' with 'Load' to see the
//difference. You would then have to click on a button
//several times before the transistion completes.
onClipEvent (enterFrame) {
_x += (endX-_x)/div;
_y += (endY-_y)/div;
//We then use the onRelease method to determine the
//new values of endX and endY. This is a new feature
//in Flash MX.
_root.home.onRelease = function() {
endX = 0;
endY = 0;
};
_root.works.onRelease = function() {
endX = -700;
endY = 0;
};
_root.skills.onRelease = function() {
endX = -1400;
endY = 0;
};
Many thanks!
View Replies !
View Related
Loaded Swf With Lockroot Does Not Seem To Work...
I have a swf that is being loaded into another swf without a "container" clip (which i am not quite sure how to implement). The loaded swf has _root references so in the very first line of script i placed this:
----
this._lockroot = true;
----
and then followed up with this:
----
_root.menuleftopen1 = false;
_root.menuleftopen2 = false;
_root.menuleftopen3 = false;
_root.menuleftopen4 = false;
_root.menuleftopen5 = false;
_root.menuleftopen6 = false;
_root.menuleftopen7 = false;
_root.menuleftopen8 = false;
_root.menuleftopen9 = false;
_root.menuleftopen10 = false;
_root.menuleftopen11 = false;
_root.menuleftopen12 = false;
_root.menuleftopen13 = false;
;
function setMenuClose() {
for (z=0; z<14; z++) {
if (eval("/:menuleftopen"+z) == true) {
eval("menu.menu"+z).gotoAndPlay("Swoop Up");
}
}
}
stop();
----
I also have embedded MC that refer to this _root script. So my problem is that the swf loads but the script which is supposed to close a menu when one menu is opened does not work, they just all stay open when i click other menus. Any suggestion on how to resolve this would be greatly appreciated. Thank you.
View Replies !
View Related
Loaded .swf Won`t Work Correctly
Tried to load one .swf file into another using loadClip method:
var MCL:MovieClipLoader = new MovieClipLoader();
MCL.loadClip("1.swf", "loader");
The .swf file is loaded but controls inside it won`t work (i have some buttons and stuff in it). Separately everything works just fine..
Also, what is the difference in loadClip usage between AS 2 and 3? The code above generates some compiler error messages in AS 3 mode, like "1180: Call to a possibly undefined method MovieClipLoader" and "1046: Type was not found or was not a compile-time constant: MovieClipLoader."
Any help?
View Replies !
View Related
Movie Loaded On Level1 No Work
OK. I have a movie that acts as a visual base in _level0, which calls another .swf on _level1 from its first frame. The second movie appears to load fine, but it doesn't find the _droptarget I've set inside it. Mind you, the swf that's loaded into _level1 works F-I-N-E on its own. This must be a path problem, right?!@
Here's my code (I think lines 3, 4, and 5 of the On release are the important ones):
on (press) {
startDrag (getProperty(_x, _y));
this.swapDepths(_root.currentTop);
++_root.currentTop;
//_level0.feedback = "yellow";
//trace (_level0.feedback);
}
on (release) {
stopDrag ();
if (_droptarget eq _level1.yellowbay) {
tellTarget (_level1.yellowbay) {
gotoAndPlay (2);
}
tellTarget ("/text") {
gotoAndStop (65);
}
tellTarget ("/drop") {
gotoAndPlay (2);
}
tellTarget ("/response") {
gotoAndPlay (63);
}
_root.score = _root.score + 1;
gotoAndStop (2);
} else {
setProperty ("", _x, OrgX);
setProperty ("", _y, OrgY);
tellTarget ("/response") {
gotoAndPlay (33);
}
tellTarget ("/honk") {
gotoAndPlay (2);
}
}
}
Note: when I look at my objects in the output window, the path to the yellowbay is Target="_level1.yellowbay". Arrgh.
Thanks,
Rick
View Replies !
View Related
Cant Get 'Movie Loaded' Routine To Work. Please Help.
Im working on a movie that loads a second movie that contains a series of images. The first movie then processes, resizes and displays the images on the second. Within this first movie there is a simple routine that checks the bytes loaded, etc. and is supposed to loop until the image movie is done loading.
It works fine offline but when I first load the movie online it shows that the image movie (i.e. its bytes) have been loaded but it wont display. Apparently, it continues the script before it's finished loading. If I refresh, the images are cached and it works fine.
Any help would be appreciated. If someone is willing to take the time, I could send them what I have if my description here isn't enough.
Also, I know I could easily set up a pre-loader at the beginning of each image movie that talks to the first but id like to avoid it if i can since I plan on having several image movies.
Please help,
-Joe http://www.indivision.net (see for yourself at what happens! goto ART-->FINE ART, then refresh... hehe)
View Replies !
View Related
My Loaded Movie Wont Work?
hey can any one help
I have a music.swf that that I cant get to play when I load the movie into an index.swf
The music.swf runs with code:
s = new Sound( );
s.attachSound("mysound");
s.setVolume(100);
s.start( 0 , 50000 );
I named my .aif sound file 'mysound' using the linkage panel.
When I export the music.swf thge sound plays, but when I use the load movie command and try to play it from my index.swf it doesnt?
any ideas?
View Replies !
View Related
Loaded Movie Into MC & Now Actions Don't Work
Ok this is my problem:
I have two movies A & B, both are realy entire movies with button actions, preloaders, and everything.
Now I press a button in movie A which loads movie B into a invisible MC (the invisible MC is one of those pseudo pop-up window designed in flash).
So movie B loads perfectly into the MC, everything is fine. But now none of the actions in movie B work, e.g. button anctions, preloaders, ect.
What am I doing wrong?
Very perplexed,
~ch33z
View Replies !
View Related
Caption Flags Don't Work When Swf Is Loaded Into Swf.
I have a main swf with a button that calls up a menu swf into a containerMC. The menu swf works fine with it's flags poping up over the buttons saying what that button will play/do when this swf is loaded alone in a browser. The problem accurs when the main swf is loaded, and the menu swf is loaded into the containerMC. Then, the menu swf attatches to the mouse, and it won't let go. Sliding around the main swf as it it were the caption flag it's self and the main swf was the button.
Here is the link to the menu fla. There is no action scripting associated with this menu swf on the main fla.
http://www.justinsteiger.com/flash/sliderOpenBeta.fla
On my site the menu works, with out the caption flags. That url is listed in my signature. (juststeiger.com)
I also originaly used _root in all the scripting but it was suggested to try _level0 but that came up with identical results.
Thanks in advance,
Justin
View Replies !
View Related
|