Flash Reacting With Html
Hey all, Okay I am trying an experment using flash and HTML. Basically what I want to do is have one swf movie on my web page but when you click on a button a square changes but the flash doesn’t re-load even though it goes to a new html page.(I know I can make it work with frame but I don’t want to use frames) Any insight would help.
Cheers.
FlashKit > Flash Help > Flash ActionScript
Posted on: 07-30-2004, 12:53 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Reacting To PHP
HI all...
I was wondering how I'd be able to make my flash navigation movie (the long bar at the top of the page at http://www.magic2k.com ) react to a PHP variable.
At the moment it's done with different versions of the same movie, but i'd like it to be the same one, but react to a php variable, which then moves the time line dynamically.
Any idea how to do this?
like an onload command or something?
Thanks.
Movieclips Reacting To Each Other
Hi Guys
Can anyone please help me or point me to a tutorial that can help me!
On my main stage, I have a navigation MC named NAV. Depending on where you click, the NAV MC loads various SWF files of varying widths (rectangles) into the main stage. What I want to do is get the loaded SWF files to move/reposition the NAV MC along the x axis in relation to the SWF size and then when unloaded the NAV MC must go back to its initial position. The thing is that I want the NAV to 'slide' into its new position, decelerate and then stop. Please see attached visual.
Any help will be greatly appreciated.
MovieClips Reacting Off One Another...
hey guys...
PLEASE HELP!!
I have a mc named NAV that I am using as my navigation... it loads various sized swf's... what I am trying to do is get the NAV mc to reposition itself in relation to the physical size of the loaded swf and then move back to its original position. I want the NAV mc to move as if it is being repelled by the loaded swf like two positives on a magnet, and then come to a gradual stop. Is this possible? Can anyone help me out??
Please see
Thanks guys
Mc Not Reacting To OnRollover
hello
if you put a movie clip by hand on stage and give it an instance name you can easely rollover it but it seems not to work with a dynamicly created mc
This is what i'm trying to do (code below):
1) creating a movieclip instance on the stage (no problem)
2) loading an image in this movie clip (no problem)
3) having it react like a button with onRollover
and this where it does not work .
Code:
this.attachMovie ("thumb_mc", "newThumb_mc" , 1)
//newThumb_mc = this ["newThumb_mc" + i];
//trace (this ["newThumb_mc" + i])
newThumb_mc.loadMovie ("images/small/flo_doelac_0001.jpg");
newThumb_mc._x = 20
newThumb_mc._y = 20
newThumb_mc.onRollOver = function (){
trace("touch it")
}
Thhanks for any help
Regards
Reacting To An External XML String
Hello all.. humble designer here posting a question as my technical pal is on leave...
Next week we're adapting a demo of ours.. the change is to react when the attractor loop receives an XML string from an external feed. Currently the attractor loops until a user clicks the screen, then the demo branches off; now we want it to also jump out when the XML string is sent over. Unsure of the technology being used to send it .. or anything technical really..sorry
Is this possible
Huge thanks everyone !!!
Ed
MC Reacting To Mouse Movement... Please Help
Hi guys
Please go here: www.utr.co.za.
I am trying to get that effect where the mc's move subtly in opposite directions to the mouse's movement.
Can some please help me find a SIMPLE script or example that a novice like me can follow. Pleeeeeeease. I have flash MX ver 6.
[MX] Please Help With My Script - MC Reacting To Mouse
Hi Guys, please help a newbie out.
I want to do this: www.utr.co.za ( the way the mc's react to the mouse)
and my script looks like this but it aint working:
onClipEvent (enterFrame) {
myRadians = Math.atan2(_root._ymouse-this._y, _root._xmouse-this._x);
myDegrees = Math.round((myRadians*0/Math.PI));
_root.yChange = Math.round(_root._ymouse-this._y);
_root.xChange = Math.round(_root._xmouse-this._x);
_root.yMove = Math.round(_root.yChange/-1000);
_root.xMove = Math.round(_root.xChange/-1000);
this._y += _root.yMove;
this._x += _root.xMove;
this._rotation = myDegrees += 0;
}
I have attached my fla for you to look at.
Any help would be greatly appreciated!
Please Help With My Script - MC Reacting To Mouse
Hi Guys, please help a newbie out.
I want to do this: www.utr.co.za ( the way the mc's react to the mouse)
and my script looks like this but it aint working:
onClipEvent (enterFrame) {
myRadians = Math.atan2(_root._ymouse-this._y, _root._xmouse-this._x);
myDegrees = Math.round((myRadians*0/Math.PI));
_root.yChange = Math.round(_root._ymouse-this._y);
_root.xChange = Math.round(_root._xmouse-this._x);
_root.yMove = Math.round(_root.yChange/-1000);
_root.xMove = Math.round(_root.xChange/-1000);
this._y += _root.yMove;
this._x += _root.xMove;
this._rotation = myDegrees += 0;
}
I have attached my fla for you to look at.
Any help would be greatly appreciated!
Reacting To Stage Resize?
Is it possible for me to execute events once the stage is resized to below a certain width and/or height when my flash movie fills the browser 100%?
I know its possible. I've seen it done. Resize the browser smaller here and watch what happens:
http://ff0000.com/
Granted, these are the geniuses at Red Interactive, but I figure that part can't be too difficult can it?
I took Lee Brimelow's tutorial here:
http://www.gotoandlearn.com/player.php?id=31
and tried to adapt it a bit, improvising my own code but its not working, obviously (with apologies to Mr. Brimelow...).
function ahem() {
if (Stage.width<=300 || Stage.height<=200) {
setProperty(this.ahem, _visible, true);
} else {
setProperty(this.ahem, _visible, false);
}
}
ahem();
var stageL:Object = new Object();
stageL.onResize = function() {
ahem();
picture._x = Stage.width/2;
picture._y = Stage.height/2;
};
Stage.addListener(stageL);
Is this the right way to go about this? I completely new to listeners, so maybe its just something that I'm unaware of?
Not Reacting To Keyboard Event..
Ive had some succes now, learning AS3.
But i cant figure out why this code is not letting my keydown function execute.
I do this in the FLASH ide, I use a document class as my main class. Which then creates a instance of a Player class, where it has a keyboard eventlistener, but when i press a key nothing happens.
Code:
package classes
{
import flash.display.MovieClip;
import flash.events.Event;
import flash.events.KeyboardEvent;
public class Player extends MovieClip
{
public function Player()
{
trace("Hero!");
addEventListener(KeyboardEvent.KEY_DOWN,checkKeysDown);
//this.setFocus();
}
private function checkKeysDown(event:KeyboardEvent):void
{
this.x++;
trace("kgkl");
trace("You pressed key: "+event.keyCode);
}
}
}
I have disabled the keyboard shortcuts in the flash player, but it is not reacting at all :.
I'd really appreciate it if someone can tell me what is going on here.
Animation Reacting On Sound
Hi, i'm trying to make an animation that reacts on sound-input (sort of like an equalizer), but i have no idea where to start. is it possible to have 'live'-soundinput as a source for this animation? how can i process the different soundlevels of different frequencies of for example music coming in from the line-in?
thanks alot in advance!
Slow Reacting Rollovers
View the attached SWF. I used kirupa's telltarget tutorial. When you roll your mouse over the rollovers too fast, they don't play the roll-off animation. while using a slow mouse speed, they work. How do I fix this?
Animation Reacting On Sound
Hi, i'm trying to make an animation that reacts on sound-input (sort of like an equalizer), but i have no idea where to start. is it possible to have 'live'-soundinput as a source for this animation? how can i process the different soundlevels of different frequencies of for example music coming in from the line-in?
thanks alot in advance!
Buttons Reacting Randomly.
This is not something I'm trying to do, but rather something that is happening for some reason, which I don't want to happen.
Here is a link to the file:
http://sharkfart.pandhosting.com/doo...toGallery.html
In the bottom, you will see 5 squares with different colors, when you click those colors you will see the backgrounds for the different squares changes. For some reason, you have to double click on some, and some not. Here is the code that controls those buttons:
ActionScript Code:
//*** Main Function ***
function convertColorString(colorName) {
if (colorName == "Red") {
myColor = "Re";
return myColor;
} else if (colorName == "Orange") {
myColor = "Or";
return myColor;
} else if (colorName == "Grey") {
myColor = "Gy";
return myColor;
} else if (colorName == "Blue") {
myColor = "Bl";
return myColor;
} else if (colorName == "Green") {
myColor = "Gr";
return myColor;
}
}
function transferColors(color) {
firstColor = convertColorString(_root.bg_mc.blueBg_mc.currentColor);
secondColor = convertColorString(color);
var colorFrame:String = firstColor+secondColor;
_root.bg_mc.blueBg_mc.gotoAndPlay(colorFrame);
_root.PG_mc.PGsub1_mc.blueBg_mc.gotoAndPlay(colorFrame);
_root.PG_mc.PGsub2_mc.blueBg_mc.gotoAndPlay(colorFrame);
_root.PG_mc.PGsub3_mc.blueBg_mc.gotoAndPlay(colorFrame);
_root.PG_mc.PGmain_mc.blueBg_mc.gotoAndPlay(colorFrame);
}
//--- Red ---
CMred_mc.invis_btn.onRelease = function() {
transferColors("Red");
};
//--- Green ---
CMgreen_mc.invis_btn.onRelease = function() {
transferColors("Green");
};
//--- Grey ---
CMgrey_mc.invis_btn.onRelease = function() {
transferColors("Grey");
};
//--- Orange ---
CMorange_mc.invis_btn.onRelease = function() {
transferColors("Orange");
};
//--- Blue ---
CMblue_mc.invis_btn.onRelease = function() {
transferColors("Blue");
};
Reacting To Events Problem
G'day
I am trying to build a learning game for my final assessment and have hit a big snag.
I have enemy moving randomly on stage (in a confined space), I have a player who must move past the enemy (defence) to score a try (touchdown) when the player touches a defender the defender will then give chase.
The problem is only one defender is recognized and it only chases when the player is in actual contact. This is due to it being within the hit test function but I have tried reason to place the function then tried it everywhere with no success.
As you see the enemy is attached in a for loop set to a variable I thought if I target the variable all would be affected, wrong. I would have been happy if they were all affected, even though my goal was to affect them individualy.
Can anyone help.
Code:
base = this;
var numOfItems:Number = 8;
//---------------------------SETTING UP THE ENEMY ON THE FIELD AND SETTING THEM TO MOVE RANDOMLY-----------------------------------------
function getdistance(x, y, x1, y1) {
var run, rise;
run = x1-x;
rise = y1-y;
return (_root.hyp(run, rise));
//trace("this is" +_root.hyp);
}
function hyp(a, b) {
return (Math.sqrt(a*a+b*b));
}
MovieClip.prototype.reset = function() {
//specify the width and height of the movie
width = 300;
height = 280;
//-------------------
var dist, norm;
this.x = this._x;
this.y = this._y;
this.speed = Math.random()*.5+1;
this.targx = 200+Math.random()*width;
this.targy = 20+Math.random()*height;
dist = _root.getdistance(this.x, this.y, this.targx, this.targy);
norm = this.speed/dist;
this.diffx = (this.targx-this.x)*norm;
this.diffy = (this.targy-this.y)*norm;
};
MovieClip.prototype.move = function() {
if (_root.getdistance(this.x, this.y, this.targx, this.targy)>this.speed) {
this.x += this.diffx;
this.y += this.diffy;
} else {
this.x = this.targx;
this.y = this.targy;
if (!this.f) {
this.f = getTimer();
}
if (getTimer()-this.f>1000) {
this.reset();
this.f = 0;
}
}
this._x = this.x;
this._y = this.y;
//trace("this"+this._x);
/*if (t.hitTest(oz)) {//this has unusual results
trace("you hit the oz");
delete move();
}*/
};
for(i=0;i<numOfItems;i++) {
var t = this.attachMovie("enemy","enemy"+i,i+1);
t._x = Math.random()*200;
t._y = Math.random()*100;
t.onEnterFrame = move;
}
onEnterFrame = function() {
if (t.hitTest(oz)) {
delete t.onEnterFrame;
chase(t, oz._x, oz._y, 0.01);
trace("you hit the oz");
}
}
//--------------------------PUTTING OZ ON FIELD AND CONTROL OF MOVEMENT-----------------------------------------
var speed = 5;
var oz = this.attachMovie("player", "player", this.getNextHighestDepth(), {_x: Stage.width-40, _y: Stage.height/2});
oz.onEnterFrame = function() {
if (Key.isDown(Key.RIGHT)) {
this.play();
this._rotation = 90;
this._x+= speed;
}
if (Key.isDown(Key.LEFT)) {
this.play();
this._rotation = 270;
this._x-= speed;
}
if (Key.isDown(Key.UP)) {
this.play();
this._rotation = 0;
this._y-= speed;
}
if (Key.isDown(Key.DOWN)) {
this.play();
this._rotation = 180;
this._y+= speed;
}
if (Key.isDown(key.RIGHT) && Key.isDown(Key.UP)) {
this._rotation = 45;
}
if (Key.isDown(Key.LEFT) && Key.isDown(Key.UP)) {
this._rotation = 315;
}
if (Key.isDown(Key.RIGHT) && Key.isDown(Key.DOWN)) {
this._rotation = 135;
}
if (Key.isDown(Key.LEFT) && Key.isDown(Key.DOWN)) {
this._rotation = 225;
}
}
//------------------------------------SETTING UP THE CHASE & kill OF ENEMY ON OZ---------------------------------------
function chase(mc, xPos, yPos, speed) {
targetx = xPos;
targety = yPos;
xdif = targetx-(mc)._x;
ydif = targety-(mc)._y;
if (xdif>=-1 && xdif<=1) {
(mc)._x = targetx;
} else {
(mc)._x += xdif*speed;
}
if (ydif>=-1 && ydif<=1) {
(mc)._y = targety;
} else {
(mc)._y += ydif*speed;
}
}
function endGame(mc, xPos, yPos, speed) {
targetx = xPos;
targety = yPos;
xdif = targetx-(mc)._x;
ydif = targety-(mc)._y;
if (xdif>=-1 && xdif<=1) {
(mc)._x = targetx;
} else {
(mc)._x += xdif*speed;
}
if (ydif>=-1 && ydif<=1) {
(mc)._y = targety;
} else {
(mc)._y += ydif*speed;
}
}
Thanks Easy
Stacked Instances Reacting Independently: How?
One remaining conceptual/technique question which I think will get me most of the way through a project...my deepest gratitude to anyone who can help.
I have multiple, mixed instances that are layered (stacked), one on top of the other. I'm having trouble getting them each to react to mouse events.
For example, I have a button instance that reacts normally to a mouseOver event. When I put another, different button instance (or a movie clip) over the first one, the first one no longer reacts to the mouseOver event. Now, only the second (topmost) instance reacts.
Is there a way to tell them *both* to react to the mouseOver event?
I thought perhaps the (enterFrame) code might work, but again, can you apply the "enterFrame hit test" to multiple movie clip instances that are stacked (layered) one on top of the other?
Conceptually, it's the "multilayered" thing I'm having trouble with.
Could I simply instantiate (name) each button or movie clip instance, then refer to those named objects in an enterFrame script?
I feel like I'm circling around this problem, possibly close to getting it, but still not there!
Thanks,
Scott
Movieclip Reacting To Another Movie Clip.
I have a scene in my flash movie where the user has to click on a "forward" button to move the character across the screen: fwd_btn.onPress = function(){
knight_mc._x +=15;
};
we also have a continue button to switch the user to another frame that contains a scene.
cont_btn.onPress = function() {
gotoAndStop (4);
};
My question is, is it possible to get rid of the continue button (keep the forward button) and replace it with a blank movieclip?
Id like to have the knight_mc move with the forward button but once it touches the blank movie clip gotoAndStop(4). Anyone know the code on how to do this? Help would be extremely awesome.
X+Y Axis Scroll, Reacting To Mouse?
Hi there
To make a long story short, i have a scene, with a huge movieclip on it, lets say that movieclip is called "box". Now i want to be able to navigate around with my mouse... Not by clicking, or dragging scrollbars or the actual movieclip, but like any other scrolling image gallery, when i move my mouse to the left of center, the movieclip moves to the right. If i move up, the movieclip moves down.
I am able to make this work on either the Y or the X axis, but when i try to combine those two, i doesnt work as intended.
If you dont know what i mean, here is a link of the behavior i want
http://www.flashimagegallery.com/pics/artwork/
Click on the sketch of a guy who is number two, in the second row.
Actually it moves the wrong way when you move the mouse, but that should be easy to change with some minus characters.
Can anyone help me out figuring this code out? Ive searched for days, trying to find what im looking for, and ive even posted on 2 other forums before i found this one, but i havent got a reply yet, which im hoping to get here, cause this forum seems to be a bit more pro, that the others ive used.
Thanks in advance
Menu With Submenu Reacting On Mouse
Hi guys, can someone point me how the menu of this site is done? http://www.richhonour.com/ go to the what we do section and you will see what im talking about, it reacts on mouse mouse and has a submenu, i really need this kind of menu and no clue where to start, thnx anyway
Reacting To Events In The Browser Window
Hi all,
I know how to send & receive data between flash & PHP, but only for events that come within flash itself. Is it possible to listen for events outside of flash that occur in links/buttons on the browser page & make flash react to them? I just need to know what subject areas I need to be learning & a few links to get me started would be really helpful.
Thanks,
PMF
Menu With Submenu Reacting On Mouse
Hi guys, can someone point me how the menu of this site is done? http://www.richhonour.com/ go to the what we do section and you will see what im talking about, it reacts on mouse mouse and has a submenu, i really need this kind of menu and no clue where to start, thnx anyway
Flex Reacting To MOUSE_MOVE Outside App's Boundaries
I'm finding that when adding a MOUSE_MOVE event handler at the root level of a script in the mxml file that mouse events aren't generated when the mouse is moved outside the application area, even if the flash app still has the focus.
For example, a custom vertical scroll bar. Dragging the scroll bar is fine, but a small horizontal shift of the mouse, taking the cursor outside the flash app's boundaries, will cease movement until the mouse is brought back in.
It doesn't appear to work this way when adding the MOUSE_MOVE event to the Stage when I tried it in Flash CS3.
Should I be prefixing the addEventListener with a different object?
Help-buttons Not Reacting Until Reverse Completed
Hey everyone,
I'm a newbie and am having a problem getting my buttons to do what I want them to. You can view the actual SWF at:
http://home.comcast.net/~jasonschaeffer/
What I want is for the knobs to rotate on rollover, tell the lcd to display whatever that button is for, and rotate back on rollout. They work fine except for they have to finish rotating back until they are reactive again.
I'd like them to be reactive at any point in their rotation.
I am using invisible buttons to call up the MovieClips. The MovieClips instance name is: knob1. Frame 1 of it's timeline has a stop command, as well as it's last frame.
The LCD is also a Moviclip (instance name: LCD) that is instructed by the invisible buttons to navigate to different frame labels to display different words.
Here is the script that I have assigned to the invisible button over the first knob.
ActionScript Code:
on (rollOver) {
knob1.play();
tellTarget ("LCD") {
gotoAndPlay("band");
}
}
on (rollOut) {
knob1.onEnterFrame = function() {
if (knob1._currentframe>1) {
knob1.prevFrame();
tellTarget ("LCD") {
gotoAndPlay("sonic");
}
} else {
knob1.onEnterFrame = null;
}
};
}
Thanks to all in advance, any help is greatly appreciated.
Reacting To Sound Output Via SoundMixer.computeSpectrum()
I wanted to design a pesudo-visualizer of sorts, so I looked up the computeSpectrum method...
I can get a ByteArray out of it, but I don't know how to read the data out of it properly (I know the format 512 bianary numbers, but I don't know exactly what I should do with them...
Movie Clip Reacting To Mouse Distance
Hi There.. i want to create an effect so that if the mouse is 100 pixels or more away to the left (_x >100) a MC goes to frame 5 whilst animating towards the mouse but when it gets to within 30 pixels (_x >30) it goes to frame 4, then when it is matching the _x of the mouse + or - 5px it will goto frame 3.
I kinda have some garbled code which i kinda understand:
This sets the motion when in a 2 frame loop only for the X:
setProperty (eval("myMC"), _x, myMC_x+((getProperty(eval("myMC"), _x)-myMC_x)/1.2));
///////then this tells it that if its within 5 pixels gotoAndStop(3);
if ((myMC_x-eval("myMC")._x)<5 and (myMC_x-eval("myMC")._x)>-5) {
eval("myMC").gotoAndStop(3);
}
///////and if its within 30 pixels gotoAndStop(3);
else{
if ((myMC_x-eval("myMC")._x)<30){
eval("myMC").gotoAndStop("4");
}
}
/////////////////////////////////////////////
but nothing happens do i need to define something else??
Cheers for any help and if you need anything let me know.
Cheers. Rob.
Attaching A Movieclip And Reacting To A Mouse Click. Once So Easy - Now Not So Much.
This is my first as3 project and it's fairly simple: read in values from an xml file (love that), and then loop through the results. For each result, I want to:
1. Attach a movieclip
2. Change the text in the clip to match the text in the xml
3. Be able to click on the clip and have it echo back the text I just added.
I've got this code so far
[php]
function boxClick(event:MouseEvent):void {
trace("box clicked");
}
function onLoaded(e:Event):void
{
xml = new XML(e.target.data);
var slideList:XMLList = xml.slides.slide;
var newX:int = 50;
var newY:int = 25;
var slide1:XMLList = slideList[0].options;
//for (var i:int = 0; i < slide1.length(); i++) {
//trace(slide1.option.optionlabel.text());
//}
for (var i:int = 0; i <slide1.option.length(); i++) {
var box:mcAvatar = new mcAvatar();
box.x = newX;
addChild(box);
newX += 100;
trace(slide1.option[i].optionlabel.text());
box.gender.text = slide1.option[i].optionlabel.text();
trace(box.gender.text);
box.addEventListener(MouseEvent.CLICK, boxClick);
}
}</PHP>
but, although I draw the boxes out and I get the right value in each box's test field, it won't respond to any mouse clicks. What am I doing wrong?
Flash Over Html, Hide Flash Access Html After Flash Movie Ends
We've got a green screened video playing in a flash movie over top of our html content.
when the movie ends, flash uses external interface .api to call a javascript function which swaps the flash movie out with a 5 x 5 pixel flash movie (rewrites the <div>).
this works and you can interact with the html content after the flash movie in all browsers except firefox...!
anyone know of any work-arounds or is there a better way of handling flash over html in this fashion?
any input would be greatly appreciated!
New To Flash Newer To Html How Do I Test Flash-html Links?
im making a site but becuase of file size restrictions my flash has to be split up and put on html pages bit by bit, now i need my menu to link to html pages and so not frames in flash anymore. So far i realise that id need for example getURL "croject/project/news'_blank'"
however i want to test my html with the links on my PC as it is not server side yet i cant replace THIS
getURL"croject/project/news'_blank'"
WITH THIS
getURL"http://www.blahblahblah/news.htm" because it looks for a web page not there yet as it isnt actually uploaded or existing yet, so how do i test my flash-html link?
um that sounds complex, but is there a quick flash fix, which lets u put in say _something/news which allows it to work as C: drive and/or www. prefixes?
Be greatful for any help
Flash MX - HTML Parsing Problem: Custom Extension File Won't Parse As HTML
I am using Flash MX.
The problem is, I have a movieclip in my main timeline. This movieclip has a main key and a refresh key, which updates the dynamic textfield's contents with a loaded variable named content. The variable content is stored within a file named readme.ifh. When I load the variable in the textfield, it shows me the source of the HTML, not the rendered version.
What's wrong (and yes, I do have the "Render as HTML" option checked)?
URGENT: Flash Navigation Embedded In Html That Link To Frameset Content In Html
Hi all,
I want to build a website that consists of a menu navigation (made in flash but embedded in a topframe in dreamweaver. On the left site, there would be some flash animations (images etc.)embedded in the leftframe and in the right/main frame, there would be either flash content or html content (depending on the content). The menu bar is made of 7 buttons; when you mouse over a button, you get a scrolling menu with different items, those buttons items have a rollover effect and when you click on one of this items it will load either a flash or html content in the right/mainframe of my dreamweaver site. My question is what is the best way to build this navigation bar so that when i click on one of this item, it will load the correct content in the right/main.frame.html. When this occurs, i want that the scrolling menu still displays while the content is loading so that when the visitor have seen the content, he just needs to click to another item to load the content (so no ectra step). Please help me with this as it urges.
Be clear in your responses as i am not a pro of actionscrit!
Many thanks, lineda
Getting Flash To Load HTML Pages Into Iframes In A Seperate HTML Page
Hi everybody
Does anybody know how to get Flash to load HTML pages into a seperate HTML page?
I'm currently running an animation within a webpage, and my client would like to be able to have some captions in HTML on the page that go with specific parts of the animation.
He wants the captions done in seperate HTML pages so that they can be changed into different languages at a later date.
I am loading these captions (HTML pages) into <iframes> on the page.
So far so good..... however...
I need to be able to get flash to load the HTML pages into the <iframes>, in certain points within the animation.
So... Does anybody know how to get Flash to load HTML pages into a seperate HTML page?
I'm guessing getURL is used somewhere, but I don't know the exact code.
Hope you can help!
Deadhands
Getting Flash To Load HTML Pages Into Iframes In A Seperate HTML Page
Hi everybody
Does anybody know how to get Flash to load HTML pages into a seperate HTML page?
I'm currently running an animation within a webpage, and my client would like to be able to have some captions in HTML on the page that go with specific parts of the animation.
He wants the captions done in seperate HTML pages so that they can be changed into different languages at a later date.
I am loading these captions (HTML pages) into <iframes> on the page.
So far so good..... however...
I need to be able to get flash to load the HTML pages into the <iframes>, in certain points within the animation.
So... Does anybody know how to get Flash to load HTML pages into a seperate HTML page?
I'm guessing getURL is used somewhere, but I don't know the exact code.
Hope you can help!
Deadhands
Passing HTML Form And Hidden Variables From Flash To Html Page
Hi,
I have a html/flash site now, http://www.zachariack.com.
i access email from my site itself by giving the userid and pwd text box which i copied from the actual website hosting my email access. i copied the entire
<form...></form> tag to my page and thus was able to put the name and pwd in my home page only and access the email in a separate window.
now i have redesigned my webpage using only flash. i would like to know how i can implement the same using flash. as i have not much experience using action scripting i am a bit stuck about how you pass the hidden form variables. the below is the the exact form syntax:
<form name="form1" action="http://www.accudatanet.com/mail/msglist.php" method=post>
<input type="hidden" name=sid value="E9697301F704A0CE947DEF42CF86636A">
<input type=text size=15 name=f_user value="">
<input type=hidden name=six value=0>
<input type=password size=15 name="f_pass">
<input type=submit name=submit value="Login >>" class="button">
</form>
how do i implement the above using action scripting. thanks.
regards,
vasant
Dynamic HTML Textbox Won't Display Flash Generated HTML?
I'll TRY to keep this simple... Keep in mind that the Hand Coded HTML works. It's the HTML that Flash writes that doesn't....
How I create the file:
------------------------
1st, I created a movie in Flash that has a HTML formated input box. So when I type things into that field, Flash automatically generates the HTML into the variable for the input box.
Next, I take that variable and display the HTML code in a dynamic text field. Then I copy and paste it into a text file, assign it a variable (myText=....), then I save it to my harddrive.
Got me so far?
The Problem
-------------------------
I have another movie that is just supposed to load the txt file and display the code in an Dynamic HTML text field. However... Flash can't seem to read the HTML that it creates? But it can read the HTML that I simplify and hand write. Does anyone know what I can do to use the Flash generated HTML?
Here is the code in the movie
----------------------------------------------
Code:
loadVarsText = new loadVars();
// load the text file
loadVarsText.load("scroller.txt");
// function which fires when the data is loaded:
loadVarsText.onLoad = function(success) {
if (success) {
// activate html
scroller.html = true;
// myText is var to put in the textfile
scroller.htmlText = this.myText;
} else {
trace("not loaded, try again!");
}
};
Below is what i'm loading into my movie. It's the HTML that Flash Generates from the input box, and below that is the HTML that I hand coded. HOWEVER I CAN'T GET THIS TO DISPLAY THE HTML CODE
FLASH CODE
-----------------------------
myText=<TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="_sans" SIZE="12" COLOR="#000000"></FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="_sans" SIZE="12" COLOR="#000000">* A hospital-acquired infection caused by methicillin-resistant Staphylococcus aureus or vancomycin-resistant Enterococcus can double the time a patient stays in the hospital</FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="_sans" SIZE="12" COLOR="#000000"></FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="_sans" SIZE="12" COLOR="#000000">* Infections in burn wounds account for 3 to 7of all infections in patients with burns, occurring most frequently in children, followed by the elderly</FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="_sans" SIZE="12" COLOR="#000000"></FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="_sans" SIZE="12" COLOR="#000000">* An analysis of post-surgical wound infections following head and neck surgery demonstrated an increase in the average hospitalization period from 14 days when wounds healed without complication, to 24 days when the wounds became infected.</FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="_sans" SIZE="12" COLOR="#000000"></FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="_sans" SIZE="12" COLOR="#000000">* In a survey of 96 English hospitals, surgical site infections led to an additional hospital stay of 6.5 days, and the hospital costs were doubled.</FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="_sans" SIZE="12" COLOR="#000000"></FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="_sans" SIZE="12" COLOR="#000000">* About 59of diabetic lower extremity amputations are proceeded by an infected foot ulcer; among people with diabetes (150 million globally), 15will experience a foot ulcer in their lifetime</FONT></P></TEXTFORMAT>
MY CODE
----------------------------------------------
myText=* A hospital-acquired infection caused by methicillin-resistant Staphylococcus aureus or vancomycin-resistant Enterococcus can double the time a patient stays in the hospital<br><br>* Infections in burn wounds account for 3 to 7% of all infections in patients with burns, occurring most frequently in children, followed by the elderly<br><br>* An analysis of post-surgical wound infections following head and neck surgery demonstrated an increase in the average hospitalization period from 14 days when wounds healed without complication, to 24 days when the wounds became infected.<br><br>* In a survey of 96 English hospitals, surgical site infections led to an additional hospital stay of 6.5 days, and the hospital costs were doubled.<br><br>* About 59% of diabetic lower extremity amputations are proceeded by an infected foot ulcer; among people with diabetes (150 million globally), 15% will experience a foot ulcer in their lifetime
Thanks in advance for any help you can give
Frequent-C
http://www.Freq-Fest.com
[Edited by Frequentc on 06-10-2002 at 05:06 PM]
Passing HTML Form And Hidden Variables From Html To Flash
Hi
I need some help passing a html code to flash code. Maybe you guys can set some light on the subject.
<html>
<script>
function Dimensiones()
{
document.getElementById("tamx").value= document.getElementsByTagName('body')[0].clientHeight;
document.getElementById("tamy").value= document.getElementsByTagName('body')[0].clientWidth;
}
</script>
<body ONLOAD="Dimensiones();" ONRESIZE="Dimensiones();">
<form method="Post"
action="http://Validation link.asp">
<input type ="hidden" name="tamx">
<input type ="hidden" name="tamy">
<input type ="hidden" name="url_return" value ="http://Link.asp">
<input type ="hidden" name="url_ot" value = "http://Validation link.asp">
Nombre <input type="text" name="UserName" value="" size="20">
Password <input type="password" name="UserPass" size="20">
<INPUT type="submit" value="Enviar">
</form>
</body>
</html>
I'm having a real hard time passing the function Dimensiones() and dealing with the hidden variables. Can you guys help me with this? Thanks
Full Screen Flash Over HTML - Access Underlying HTML?
Im pretty sure this is done with JS somehow - but does anyone have any insight? I have a full screen transparent movie that overlays the html content below. The problem is, none of the html below (links, rollovers, etc) are accessible. How can I fix this?
Thanks in advance.
M
Passing HTML Form And Hidden Variables From Html To Flash
Hi
I need some help passing a html code to flash code. Maybe you guys can set some light on the subject.
<html>
<script>
function Dimensiones()
{
document.getElementById("tamx").value= document.getElementsByTagName('body')[0].clientHeight;
document.getElementById("tamy").value= document.getElementsByTagName('body')[0].clientWidth;
}
</script>
<body ONLOAD="Dimensiones();" ONRESIZE="Dimensiones();">
<form method="Post"
action="http://Validation link.asp">
<input type ="hidden" name="tamx">
<input type ="hidden" name="tamy">
<input type ="hidden" name="url_return" value ="http://Link.asp">
<input type ="hidden" name="url_ot" value = "http://Validation link.asp">
Nombre <input type="text" name="UserName" value="" size="20">
Password <input type="password" name="UserPass" size="20">
<INPUT type="submit" value="Enviar">
</form>
</body>
</html>
I'm having a real hard time passing the function Dimensiones() and dealing with the hidden variables. Can you guys help me with this? Thanks
HTML Code In Flash To Load An HTML Page In A Frame
Hello.
I have an existing website built in html, with three frames. One on the top for the banner, one on the left for navigation, and a larger window to the right of the navigation for the main content. I want to replace the content in my navgation frame with a flash built navgation menu, and when my menu items are selected, it will load a new page in the content frame.
I currently have this working fine in html. I can make my buttons link to a URL no problem in flash, but how do I tell it to load the content into the other frame? I haven't started this process yet, and figured I'd ask first to get any ideas.
Thanks.
Movie Clip Inside A Movie Clip Not Reacting When Pressed
Hi,
I am a beginner and I don't know how to make a movie clip that I attached to another movie clip become activated. I am not sure if it has to do with the depth issue, which I don't completely understand.
But this is what I want. I have placed a movie clip (a rectangle shape) on the stage and linked that movie clip to an actions script file. In that file (Button_group.as) I dynamillycally place another movie clip (Email_btn) which is linked to another actionscript file called "Email_btn.as" inside the area of the rectange movie clip (Button_group).
Inside the "Email_btn.as" class I specfied an "onPress " function that prints something. Now when I play the movie and I press inside the "Email_btn" movie clip nothing happens.
So the question is how do I specify that I am "pressing" the "Email_btn" (inside clip) area and not the parent "Button_group" area?
This is snippet of the code of Button_group that dynamically places the inside movieclip "Email_btn":
class com.macromedia.flashvideogallery.Button_group extends MovieClip
{
var email;
function Button_group()
{
init();
}
private function init():Void
{
trace ("MALENA");
this._alpha = 0;
email = attachMovie("Email_btn", "Email_btn1", this.getNextHighestDepth(), {_x: _parent._x , _y: _parent._y } );
email._visible = false;
//_parent.email_btn.onPress = function () {
//trace ("send email");
//}
}
thank you
-Malena
Tabs In Html? (html-txt Loaded Into Flash)
Id like to format the text that I load into a textbox in flash (html-enabled).
Specifically I would like to know how to make tabs, so I can form neat columns.
Generally, perhaps someone has a list of commands that you find useful for formatting html-type text in flash and you can share?
Thanks,
Daniel
Sending A Variable From Html To Html From Flash
Hi guys...
Ok...here's the situation. I'm making a Flash site for a tri-weekly comic. The site I'm making has five pages: Home, News, Comic, Archive, and Contact Us. THe Home, News, Archive, and Contact Us pages are all apart of the same swf and are on the main timeline. The comic, however, needs to be a different swf (and therefore html page) because of size differences, etc.
Here's the problem: I need to know how to make the seperate swfs communicate with each other. For example: when viewing the archive the viewer clicks to see a certain comic, which triggers the loading of the html page with the Comic.swf on it. Somehow the Comic.swf needs to know what comic was clicked on in the archive so it loads the correct comic. Keep in mind this communication needs to be from html page to html page.
Any ideas?
Thanks!
HTML + Flash (html Title Changes On LoadMovie)
Hi
i have my main.swf file embedded in html page.
The swf file conatins 4-5 movieclip. On the click of a particular movieclip a new swf file is loaded in my main.swf file.
The problem is when i click on a particular movieclip to load swf file the html page title changes to # sign.
Pls help
Thanks in advance.
Flash Transparent Over Html, How To Click On Html?
Hi!
I have a flash menu that "drops down" over the html. I did it with flash transparent mode.
The problem is that the html under the flash contains input text and a left menu, that are not clickable.
I resolved it with a javascript that try to resize the divs:
<script language="JavaScript1.2" type="text/javascript">
function setFlashHeight(divid, newH) {
document.getElementById(divid).style.height = newH+"px";
}
function closeFlashMenu(){
setFlashHeight('header',412);
return "close"
}
function openFlashMenu(){
setFlashHeight('header',600);
return "close"
}
</script>
<div id="header" style="z-index:1; position:absolute; left: 0px; top:0px;" onMouseOver="openFlashMenu();"
onMouseOut="closeFlashMenu();">
This works in explorer, but not in Firefox.
Any suggestion?
Thanx
Alberto
Flash In Html To Html In Html?
I am using frames in my site.
In the main frame, i am having a flash intro, which on completion, i want to unload, and then load the html content [which is a seperate html doc anyway]
At the end of the movie it will say "load site" which when they click, will load the html [i will use _self as the target]
Firstly this is possible right?
But i know NO action script, so i hope someone can help me with the code i should paste into the box
Thanks all.
How? Flash Links To Html Window Inside Html Window
Hi, at this site, www.jerrycantrell.com, he has flash buttons and when you click on one it changes the content in a small scroll bar window of the page but doesnt reload the whole page, this looks slick. but it is dealing with html, so this question doesnt completely have to do with flash. but i assume the linking commands in flash have most to do with this, all im able to do is change the page entirely with a link, and when i'm only changing somthing in one window its not as quick and because it reloads the whole page just for that one thing it doesnt look as slick because there's a blank white screen between loading the new page.. only for a second, but you get the just of it. anyone know how to do this? much thanks
-randy
Flash Button In "html Frame1" Triggers Stuff In "html Frame2"
Subject: flash button in "html frame1" triggers stuff in "html frame2"
I have a framebased html site...
I have a flash menu/buttons inserted in my topframe.
When you press one of these buttons a new page should appear in the
mainframe.
Is that possible, and if, how?
thanks
|