Solved

Flash clickTAG undefined

Posted on 2007-04-09
4
2,743 Views
Last Modified: 2009-07-29
I am building a flash banner and the site that is going to run it has some instructions that says that I should use getURL(clickTAG1,"_blank") for the links. So I have created a layer at the bottom of my flash file and converted into a movieclip. I have then written:

on (release) {
      getURL(clickTAG1,"_blank");
}
in the action script for the movie clip. I also have a clickTAG2 that gets active after half of the movie. The html looks like this:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>dibanner_live_sv</title>
</head>
<body bgcolor="#ffffff">
<!--url's used in the movie-->
<!--text used in the movie-->
<!-- saved from url=(0013)about:internet -->
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="140" height="175" id="dibanner_live_sv" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="dibanner_live_sv.swf?clickTAG1=http://www.iflexfx.com&clickTAG2=http://www.interactivesignals.se" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="dibanner_live_sv.swf?clickTAG1=http://www.iflexfx.com&clickTAG2=http://www.interactivesignals.se" quality="high" bgcolor="#ffffff" width="140" height="175" name="dibanner_live_sv" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</body>
</html>

When I click on the banner I get the text /undefined at the end which tells me that the clickTAG variables does not get populated. If I write an URL instead of the clickTAG variable in the flash code it works fine but it seems as if I can not pass the variables from the html to the flash. Can anyone see what I am doing wrong?
0
Comment
Question by:Steverino541
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 34

Expert Comment

by:Aneesh Chopra
ID: 18875702
actually you are placing button inside movieClip, but variables clickTAG1 and clickTAG2 are on _root.

to fix this issue..

use following :
---------
on (release) {
      getURL(_root.clickTAG1,"_blank");
}
---------

and

---------
on (release) {
      getURL(_root.clickTAG2,"_blank");
}
---------

- Aneesh Chopra


0
 

Author Comment

by:Steverino541
ID: 18875892
I have written it this way now:
on (release) {
      getURL(_root.clickTAG1,"_blank");
}

Now though a new window does not open. When I click on the banner nothings happens.
0
 
LVL 34

Expert Comment

by:Aneesh Chopra
ID: 18877111
try this:

on (release) {
      getURL(_level0.clickTAG1,"_blank");
}
0
 
LVL 4

Accepted Solution

by:
Blixtsystems earned 500 total points
ID: 18882234
You should be using FlashVars in the embed code instead of adding it as an URL string:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>dibanner_live_sv</title>
</head>
<body bgcolor="#ffffff">
<!--url's used in the movie-->
<!--text used in the movie-->
<!-- saved from url=(0013)about:internet -->
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="140" height="175" id="dibanner_live_sv" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="dibanner_live_sv.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="FlashVars" value="clickTAG1%3Dhttp%3A%2F%2Fwww.iflexfx.com%26clickTAG2%3Dhttp%3A%2F%2Fwww.interactivesignals.se" />
<embed src="dibanner_live_sv.swf" quality="high" bgcolor="#ffffff" width="140" height="175"
FlashVars="clickTAG1%3Dhttp%3A%2F%2Fwww.iflexfx.com%26clickTAG2%3Dhttp%3A%2F%2Fwww.interactivesignals.se"
name="dibanner_live_sv" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</body>
</html>
0

Featured Post

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question